00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00029
00030
00031
00032 #ifndef Pegasus_ObjectPath_h
00033 #define Pegasus_ObjectPath_h
00034
00035 #include <Pegasus/Common/Config.h>
00036 #include <Pegasus/Common/Linkage.h>
00037 #include <Pegasus/Common/String.h>
00038 #include <Pegasus/Common/CIMName.h>
00039 #include <Pegasus/Common/Array.h>
00040 #include <Pegasus/Common/Exception.h>
00041
00042 PEGASUS_NAMESPACE_BEGIN
00043
00044 class CIMObjectPath;
00045 class CIMKeyBindingRep;
00046 class CIMObjectPathRep;
00047 class CIMValue;
00048
00053 class PEGASUS_COMMON_LINKAGE CIMKeyBinding
00054 {
00055 public:
00056
00061 enum Type
00062 {
00064 BOOLEAN,
00066 STRING,
00068 NUMERIC,
00070 REFERENCE
00071 };
00072
00076 CIMKeyBinding();
00077
00084 CIMKeyBinding(const CIMKeyBinding& x);
00085
00092 CIMKeyBinding(const CIMName& name, const String& value, Type type);
00093
00124 CIMKeyBinding(const CIMName& name, const CIMValue& value);
00125
00129 ~CIMKeyBinding();
00130
00137 CIMKeyBinding& operator=(const CIMKeyBinding& x);
00138
00143 const CIMName& getName() const;
00144
00149 void setName(const CIMName& name);
00150
00155 const String& getValue() const;
00156
00161 void setValue(const String& value);
00162
00167 Type getType() const;
00168
00173 void setType(Type type);
00174
00182 Boolean equal(CIMValue value);
00183
00184 private:
00185
00186 CIMKeyBindingRep* _rep;
00187
00188 friend class CIMObjectPath;
00189 };
00190
00198 PEGASUS_COMMON_LINKAGE Boolean operator==(
00199 const CIMKeyBinding& x,
00200 const CIMKeyBinding& y);
00201
00202 #define PEGASUS_ARRAY_T CIMKeyBinding
00203 # include <Pegasus/Common/ArrayInter.h>
00204 #undef PEGASUS_ARRAY_T
00205
00388 class PEGASUS_COMMON_LINKAGE CIMObjectPath
00389 {
00390 public:
00391
00395 CIMObjectPath();
00396
00403 CIMObjectPath(const CIMObjectPath& x);
00404
00415 CIMObjectPath(const String& objectName);
00416
00431 CIMObjectPath(
00432 const String& host,
00433 const CIMNamespaceName& nameSpace,
00434 const CIMName& className,
00435 const Array<CIMKeyBinding>& keyBindings = Array<CIMKeyBinding>());
00436
00440 ~CIMObjectPath();
00441
00448 CIMObjectPath& operator=(const CIMObjectPath& x);
00449
00454 void clear();
00455
00470 void set(
00471 const String& host,
00472 const CIMNamespaceName& nameSpace,
00473 const CIMName& className,
00474 const Array<CIMKeyBinding>& keyBindings = Array<CIMKeyBinding>());
00475
00482 void set(const String& objectName);
00483
00490 CIMObjectPath& operator=(const String& objectName);
00491
00496 const String& getHost() const;
00497
00509 void setHost(const String& host);
00510
00515 const CIMNamespaceName& getNameSpace() const;
00516
00521 void setNameSpace(const CIMNamespaceName& nameSpace);
00522
00527 const CIMName& getClassName() const;
00528
00533 void setClassName(const CIMName& className);
00534
00539 const Array<CIMKeyBinding>& getKeyBindings() const;
00540
00546 void setKeyBindings(const Array<CIMKeyBinding>& keyBindings);
00547
00563 String toString() const;
00564
00573 Boolean identical(const CIMObjectPath& x) const;
00574
00580 Uint32 makeHashCode() const;
00581
00582 private:
00583
00592 String _toStringCanonical() const;
00593
00594 CIMObjectPathRep* _rep;
00595
00596 friend class SQLiteStore;
00597 };
00598
00605 PEGASUS_COMMON_LINKAGE Boolean operator==(
00606 const CIMObjectPath& x,
00607 const CIMObjectPath& y);
00608
00615 PEGASUS_COMMON_LINKAGE Boolean operator!=(
00616 const CIMObjectPath& x,
00617 const CIMObjectPath& y);
00618
00619 #define PEGASUS_ARRAY_T CIMObjectPath
00620 # include <Pegasus/Common/ArrayInter.h>
00621 #undef PEGASUS_ARRAY_T
00622
00623 PEGASUS_NAMESPACE_END
00624
00625 #endif
00626
00627