[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / Local_Name_Space.h
blobc9606d02bf243b20f294a9f22a55ad606144258c
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Local_Name_Space.h
7 * $Id: Local_Name_Space.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Prashant Jain (pjain@cs.wustl.edu)
10 * @author Irfan Pyarali (irfan@wuerl.wustl.edu)
11 * @author Douglas C. Schmidt (schmidt@cs.wustl.edu).
13 //=============================================================================
15 #ifndef ACE_LOCAL_NAME_SPACE_H
16 #define ACE_LOCAL_NAME_SPACE_H
18 #include /**/ "ace/pre.h"
20 #include "ace/Malloc_T.h"
22 #if !defined (ACE_LACKS_PRAGMA_ONCE)
23 # pragma once
24 #endif /* ACE_LACKS_PRAGMA_ONCE */
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 class ACE_NS_WString;
30 /**
31 * @class ACE_NS_String
33 * @brief This class and ACE_NS_Internal are used as Adapters to work
34 * with the Map_Manager.
36 * In order to work correctly, this class must be able to
37 * convert back and forth with <ACE_NS_WStrings>.
39 class ACE_Export ACE_NS_String
41 public:
42 // = Initialization.
43 /// Default "no-op" constructor.
44 ACE_NS_String (void);
46 /// Initialization method.
47 ACE_NS_String (ACE_WCHAR_T *dst,
48 const ACE_WCHAR_T *src,
49 size_t len);
51 /// Converts an ACE_NS_WString to an ACE_NS_String;
52 ACE_NS_String (const ACE_NS_WString &);
54 /// Destructor
55 ~ACE_NS_String (void);
57 /// Converts an ACE_NS_String to fresh copy of an ACE_NS_WString;
58 operator ACE_NS_WString () const;
60 /// Return the ASCII character representation.
61 char *char_rep (void) const;
63 /// Matches on substrings.
64 int strstr (const ACE_NS_String &) const;
66 /// Compare an ACE_NS_String.
67 bool operator == (const ACE_NS_String &) const;
69 /// Compare an ACE_NS_String.
70 bool operator != (const ACE_NS_String &) const;
72 /// Returns length of the string
73 size_t len (void) const;
75 /// Returns the underlying representation.
76 ACE_WCHAR_T *fast_rep (void) const;
78 /// Returns a hash value for this string.
79 u_long hash (void) const;
81 private:
82 /// Length of the string.
83 size_t len_;
85 /// This actually points into shared/persistent memory.
86 ACE_WCHAR_T *rep_;
88 /// Should rep_ be deleted when destructed (only used
89 /// for WString conversions)
90 bool delete_rep_;
93 /**
94 * @class ACE_NS_Internal
96 * @brief This class and ACE_NS_String are used as Adapters to work
97 * with the Map_Manager.
99 class ACE_Export ACE_NS_Internal
101 public:
102 /// No-op constructor.
103 ACE_NS_Internal (void);
105 /// Constructor.
106 ACE_NS_Internal (ACE_NS_String &value, const char *type);
108 /// Compare an ACE_NS_Internal
109 bool operator == (const ACE_NS_Internal &) const;
111 /// Return value.
112 ACE_NS_String value (void);
114 /// Return type.
115 const char *type (void);
117 private:
118 /// Contains the value of the string.
119 ACE_NS_String value_;
121 /// Contains the type of the string.
122 const char *type_;
125 ACE_END_VERSIONED_NAMESPACE_DECL
127 // Include the ACE_Local_Name_Space templates stuff at this point.
128 #include "ace/Local_Name_Space_T.h"
130 #include /**/ "ace/post.h"
132 #endif /* ACE_LOCAL_NAME_SPACE_H */