3 //=============================================================================
5 * @file Local_Name_Space.h
7 * @author Prashant Jain (pjain@cs.wustl.edu)
8 * @author Irfan Pyarali (irfan@wuerl.wustl.edu)
9 * @author Douglas C. Schmidt (d.schmidt@vanderbilt.edu).
11 //=============================================================================
13 #ifndef ACE_LOCAL_NAME_SPACE_H
14 #define ACE_LOCAL_NAME_SPACE_H
16 #include /**/ "ace/pre.h"
18 #include "ace/Malloc_T.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
29 * @class ACE_NS_String
31 * @brief This class and ACE_NS_Internal are used as Adapters to work
32 * with the Map_Manager.
34 * In order to work correctly, this class must be able to
35 * convert back and forth with <ACE_NS_WStrings>.
37 class ACE_Export ACE_NS_String
41 /// Default "no-op" constructor.
44 /// Initialization method.
45 ACE_NS_String (ACE_WCHAR_T
*dst
,
46 const ACE_WCHAR_T
*src
,
49 /// Converts an ACE_NS_WString to an ACE_NS_String;
50 ACE_NS_String (const ACE_NS_WString
&);
55 /// Converts an ACE_NS_String to fresh copy of an ACE_NS_WString;
56 operator ACE_NS_WString () const;
58 /// Return the ASCII character representation.
59 char *char_rep () const;
61 /// Matches on substrings.
62 int strstr (const ACE_NS_String
&) const;
64 /// Compare an ACE_NS_String.
65 bool operator == (const ACE_NS_String
&) const;
67 /// Compare an ACE_NS_String.
68 bool operator != (const ACE_NS_String
&) const;
70 /// Returns length of the string
73 /// Returns the underlying representation.
74 ACE_WCHAR_T
*fast_rep () const;
76 /// Returns a hash value for this string.
80 /// Length of the string.
83 /// This actually points into shared/persistent memory.
86 /// Should rep_ be deleted when destructed (only used
87 /// for WString conversions)
92 * @class ACE_NS_Internal
94 * @brief This class and ACE_NS_String are used as Adapters to work
95 * with the Map_Manager.
97 class ACE_Export ACE_NS_Internal
100 /// No-op constructor.
104 ACE_NS_Internal (ACE_NS_String
&value
, const char *type
);
106 /// Compare an ACE_NS_Internal
107 bool operator == (const ACE_NS_Internal
&) const;
110 ACE_NS_String
value ();
116 /// Contains the value of the string.
117 ACE_NS_String value_
;
119 /// Contains the type of the string.
123 ACE_END_VERSIONED_NAMESPACE_DECL
125 // Include the ACE_Local_Name_Space templates stuff at this point.
126 #include "ace/Local_Name_Space_T.h"
128 #include /**/ "ace/post.h"
130 #endif /* ACE_LOCAL_NAME_SPACE_H */