00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ACE_ADDR_H
00014 #define ACE_ADDR_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "ace/ACE_export.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00025
00026
00027
00028
00029
00030
00031
00032 class ACE_Export ACE_Addr
00033 {
00034 public:
00035
00036
00037 ACE_Addr (int type = -1, int size = -1);
00038
00039
00040 virtual ~ACE_Addr (void);
00041
00042
00043
00044
00045 int get_size (void) const;
00046
00047
00048 void set_size (int size);
00049
00050
00051
00052
00053 int get_type (void) const;
00054
00055
00056 void set_type (int type);
00057
00058
00059 virtual void *get_addr (void) const;
00060
00061
00062 virtual void set_addr (void *, int len);
00063
00064
00065
00066 bool operator == (const ACE_Addr &sap) const;
00067
00068
00069 bool operator != (const ACE_Addr &sap) const;
00070
00071
00072 void base_set (int type, int size);
00073
00074
00075 static const ACE_Addr sap_any;
00076
00077
00078
00079 virtual unsigned long hash (void) const;
00080
00081
00082 void dump (void) const;
00083
00084
00085 ACE_ALLOC_HOOK_DECLARE;
00086
00087 protected:
00088
00089 int addr_type_;
00090
00091
00092 int addr_size_;
00093 };
00094
00095 ACE_END_VERSIONED_NAMESPACE_DECL
00096
00097 #if defined (__ACE_INLINE__)
00098 #include "ace/Addr.inl"
00099 #endif
00100
00101 #include "ace/post.h"
00102
00103 #endif