Go to the documentation of this file.00001 #ifndef QMF_DATA_H
00002 #define QMF_DATA_H
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qmf/exceptions.h"
00027 #include "qpid/types/Variant.h"
00028 #include <string>
00029 
00030 namespace qmf {
00031 
00032 #ifndef SWIG
00033     template <class> class PrivateImplRef;
00034 #endif
00035 
00036     class DataImpl;
00037     class Schema;
00038     class SchemaId;
00039     class DataAddr;
00040     class Agent;
00041 
00042     class QMF_CLASS_EXTERN Data : public qmf::Handle<DataImpl> {
00043     public:
00044         QMF_EXTERN Data(DataImpl* impl = 0);
00045         QMF_EXTERN Data(const Data&);
00046         QMF_EXTERN Data& operator=(const Data&);
00047         QMF_EXTERN ~Data();
00048 
00049         QMF_EXTERN Data(const Schema&);
00050         QMF_EXTERN void setAddr(const DataAddr&);
00051         QMF_EXTERN void setProperty(const std::string&, const qpid::types::Variant&);
00052         QMF_EXTERN void overwriteProperties(const qpid::types::Variant::Map&);
00053         QMF_EXTERN bool hasSchema() const;
00054         QMF_EXTERN bool hasAddr() const;
00055         QMF_EXTERN const SchemaId& getSchemaId() const;
00056         QMF_EXTERN const DataAddr& getAddr() const;
00057         QMF_EXTERN const qpid::types::Variant& getProperty(const std::string&) const;
00058         QMF_EXTERN const qpid::types::Variant::Map& getProperties() const;
00059         QMF_EXTERN bool hasAgent() const;
00060         QMF_EXTERN const Agent& getAgent() const;
00061 
00062 #ifndef SWIG
00063     private:
00064         friend class qmf::PrivateImplRef<Data>;
00065         friend struct DataImplAccess;
00066 #endif
00067     };
00068 
00069 }
00070 
00071 #endif