00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ACE_NAME_SPACE_H
00014 #define ACE_NAME_SPACE_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 #include "ace/SString.h"
00025 #include "ace/Unbounded_Set.h"
00026
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029 typedef ACE_Unbounded_Set<ACE_NS_WString> ACE_WSTRING_SET;
00030
00031
00032
00033
00034
00035
00036 class ACE_Export ACE_Name_Binding
00037 {
00038 public:
00039
00040
00041 ACE_Name_Binding (const ACE_NS_WString &n,
00042 const ACE_NS_WString &v,
00043 const char *t);
00044
00045
00046 ACE_Name_Binding (void);
00047
00048
00049 ACE_Name_Binding (const ACE_Name_Binding &);
00050
00051
00052 void operator= (const ACE_Name_Binding &);
00053
00054
00055 ~ACE_Name_Binding (void);
00056
00057
00058 bool operator == (const ACE_Name_Binding &s) const;
00059
00060
00061 ACE_NS_WString name_;
00062
00063
00064 ACE_NS_WString value_;
00065
00066
00067 char *type_;
00068 };
00069
00070 typedef ACE_Unbounded_Set<ACE_Name_Binding> ACE_BINDING_SET;
00071 typedef ACE_Unbounded_Set_Iterator<ACE_Name_Binding> ACE_BINDING_ITERATOR;
00072
00073 typedef ACE_Unbounded_Set<ACE_NS_WString> ACE_PWSTRING_SET;
00074 typedef ACE_Unbounded_Set_Iterator<ACE_NS_WString> ACE_PWSTRING_ITERATOR;
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 class ACE_Export ACE_Name_Space
00086 {
00087 public:
00088
00089
00090
00091 virtual ~ACE_Name_Space (void);
00092
00093
00094 virtual int bind (const ACE_NS_WString &name_in,
00095 const ACE_NS_WString &value_in,
00096 const char *type_in = "") = 0;
00097
00098
00099
00100
00101
00102
00103
00104 virtual int rebind (const ACE_NS_WString &name_in,
00105 const ACE_NS_WString &value_in,
00106 const char *type_in = "") = 0;
00107
00108
00109
00110 virtual int unbind (const ACE_NS_WString &name_in) = 0;
00111
00112
00113
00114 virtual int resolve (const ACE_NS_WString &name_in,
00115 ACE_NS_WString &value_out,
00116 char *&type_out) = 0;
00117
00118
00119
00120 virtual int list_names (ACE_WSTRING_SET &set_out,
00121 const ACE_NS_WString &pattern_in) = 0;
00122
00123
00124
00125 virtual int list_values (ACE_WSTRING_SET &set_out,
00126 const ACE_NS_WString &pattern_in) = 0;
00127
00128
00129
00130 virtual int list_types (ACE_WSTRING_SET &set_out,
00131 const ACE_NS_WString &pattern_in) = 0;
00132
00133
00134
00135
00136
00137
00138 virtual int list_name_entries (ACE_BINDING_SET &set,
00139 const ACE_NS_WString &pattern) = 0;
00140
00141
00142
00143
00144
00145
00146 virtual int list_value_entries (ACE_BINDING_SET &set,
00147 const ACE_NS_WString &pattern) = 0;
00148
00149
00150
00151
00152
00153
00154 virtual int list_type_entries (ACE_BINDING_SET &set,
00155 const ACE_NS_WString &pattern) = 0;
00156
00157
00158 virtual void dump (void) const = 0;
00159 };
00160
00161 ACE_END_VERSIONED_NAMESPACE_DECL
00162
00163 #include "ace/post.h"
00164
00165 #endif