Fixed typos
[ACE_TAO.git] / ACE / ace / UNIX_Addr.h
blobd0851feb3bad88a4e7435ca47d778f26658276a6
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file UNIX_Addr.h
7 * @author Doug Schmidt
8 */
9 //=============================================================================
12 #ifndef ACE_UNIX_ADDR_H
13 #define ACE_UNIX_ADDR_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "ace/ACE_export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
25 #include "ace/Addr.h"
26 #include "ace/Log_Category.h"
27 #include "ace/ACE.h"
28 #include "ace/os_include/sys/os_un.h"
30 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
32 /**
33 * @class ACE_UNIX_Addr
35 * @brief Defines the ``UNIX domain address family'' address format.
37 class ACE_Export ACE_UNIX_Addr : public ACE_Addr
39 public:
40 /// Default constructor.
41 ACE_UNIX_Addr (void);
43 /// Copy constructor.
44 ACE_UNIX_Addr (const ACE_UNIX_Addr &sa);
46 /// Creates an ACE_UNIX_Addr from a string.
47 ACE_UNIX_Addr (const char rendezvous_point[]);
49 /// Creates an ACE_INET_Addr from a sockaddr_un structure.
50 ACE_UNIX_Addr (const sockaddr_un *, int len);
52 /// Creates an ACE_UNIX_Addr from another ACE_UNIX_Addr.
53 int set (const ACE_UNIX_Addr &sa);
55 /// Creates an ACE_UNIX_Addr from a string.
56 int set (const char rendezvous_point[]);
58 /// Creates an ACE_UNIX_Addr from a sockaddr_un structure.
59 int set (const sockaddr_un *, int len);
61 /// Return a pointer to the underlying network address.
62 virtual void *get_addr (void) const;
64 /// Set a pointer to the underlying network address.
65 virtual void set_addr (const void *addr, int len);
67 /// Transform the current address into string format.
68 virtual int addr_to_string (ACE_TCHAR addr[], size_t) const;
70 /// Transform the string into the current addressing format.
71 virtual int string_to_addr (const char addr[]);
73 #if defined (ACE_HAS_WCHAR)
74 /// Creates an ACE_UNIX_Addr from a string.
75 ACE_UNIX_Addr (const wchar_t rendezvous_point[]);
77 /// Creates an ACE_UNIX_Addr from a string.
78 int set (const wchar_t rendezvous_point[]);
79 #endif /* ACE_HAS_WCHAR */
81 /// Compare two addresses for equality.
82 bool operator == (const ACE_UNIX_Addr &SAP) const;
84 /// Compare two addresses for inequality.
85 bool operator != (const ACE_UNIX_Addr &SAP) const;
87 /// Return the path name of the underlying rendezvous point.
88 const char *get_path_name (void) const;
90 /// Computes and returns hash value.
91 virtual u_long hash (void) const;
93 /// Dump the state of an object.
94 void dump (void) const;
96 /// Declare the dynamic allocation hooks.
97 ACE_ALLOC_HOOK_DECLARE;
99 private:
100 /// Underlying socket address.
101 sockaddr_un unix_addr_;
104 ACE_END_VERSIONED_NAMESPACE_DECL
106 #if defined (__ACE_INLINE__)
107 #include "ace/UNIX_Addr.inl"
108 #endif /* __ACE_INLINE__ */
110 #endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */
112 #include /**/ "ace/post.h"
114 #endif /* ACE_UNIX_ADDR_H */