In This Topic
#ifndef _CardinalityLib_CardinalityLib_CMyRootObject_h
#define _CardinalityLib_CardinalityLib_CMyRootObject_h
#include "../CardinalityLib/AComplexMandatoryElement.h"
#include "../CardinalityLib/AComplexOptionalElement.h"
#include "../CardinalityLib/AComplexCollectionElementCol.h"
#include "../CardinalityLib/AComplexCollectionElement.h"
namespace CardinalityLib { class CClassFactory; };
namespace CardinalityLib
{
class CardinalityLib_DLL CMyRootObject : public CInstanceMonitor
, public virtual CardinalityLib::CXmlCommonBase
{
public:
static CardinalityLib::CMyRootObjectPtr CreateInstance(LPCTSTR lpctElementName=_T("MyRootObject"));
protected:
CMyRootObject(LPCTSTR lpctElementName=_T("MyRootObject"));
virtual ~CMyRootObject();
friend class CardinalityLib::CClassFactory;
virtual void Init();
virtual void AccessProperty(int iPropertyIndex, bool read, LtXmlLib20::LtVariant& rValue);
virtual LtXmlLib20Data::CParentElementInfo* GetClassInfo() const;
virtual LtXmlLib20Data::CElementInfo** GetClassElementInfo() const;
virtual LtXmlLib20Data::CAttributeInfo** GetClassAttributeInfo() const;
static void CleanMetaData();
void Cleanup();
virtual void OnEvent(LtXmlLib20::CXmlObjectBase* pMsgSource, LtXmlLib20::IEventSink::MsgType eMsgType, void* pData);
public:
std::tstring GetASimpleStringMandatoryElement() const;
void SetASimpleStringMandatoryElement(std::tstring val);
protected:
std::tstring m_ASimpleStringMandatoryElement;
public:
LtXmlLib20::CDateTime GetASimpleDateMandatoryElement() const;
void SetASimpleDateMandatoryElement(LtXmlLib20::CDateTime val);
protected:
LtXmlLib20::CDateTime m_ASimpleDateMandatoryElement;
public:
CardinalityLib::CAComplexMandatoryElementPtr GetAComplexMandatoryElement() const;
void SetAComplexMandatoryElement(CardinalityLib::CAComplexMandatoryElement* value);
protected:
CardinalityLib::CAComplexMandatoryElementPtr m_AComplexMandatoryElement;
public:
std::tstring GetASimpleStringOptionalElement() const;
void SetASimpleStringOptionalElement(std::tstring val);
bool IsValidASimpleStringOptionalElement() const;
void SetValidASimpleStringOptionalElement(bool val);
protected:
bool m_IsValidASimpleStringOptionalElement;
std::tstring m_ASimpleStringOptionalElement;
public:
LtXmlLib20::CDateTime GetASimpleDateOptionalElement() const;
void SetASimpleDateOptionalElement(LtXmlLib20::CDateTime val);
bool IsValidASimpleDateOptionalElement() const;
void SetValidASimpleDateOptionalElement(bool val);
protected:
bool m_IsValidASimpleDateOptionalElement;
LtXmlLib20::CDateTime m_ASimpleDateOptionalElement;
public:
CardinalityLib::CAComplexOptionalElementPtr GetAComplexOptionalElement() const;
void SetAComplexOptionalElement(CardinalityLib::CAComplexOptionalElement* value);
protected:
CardinalityLib::CAComplexOptionalElementPtr m_AComplexOptionalElement;
public:
LtXmlLib20::CstringColPtr GetASimpleStringCollectionElement() const;
protected:
LtXmlLib20::CstringColPtr m_ASimpleStringCollectionElement;
public:
LtXmlLib20::CdateColPtr GetASimpleDateCollectionElement() const;
protected:
LtXmlLib20::CdateColPtr m_ASimpleDateCollectionElement;
public:
CardinalityLib::CAComplexCollectionElementColPtr GetAComplexCollectionElement() const;
protected:
CardinalityLib::CAComplexCollectionElementColPtr m_AComplexCollectionElement;
public:
virtual CardinalityLib::CMyRootObjectPtr Clone() const;
virtual std::tstring GetTargetNamespace() const;
virtual std::tstring GetNamespace() const;
virtual LtXmlLib20::CXmlObjectBase* GetBase();
// Internal data for XML serialization
private:
static LtXmlLib20Data::CParentElementInfo* ms_pParentElementInfo;
static LtXmlLib20Data::CElementInfo** ms_ppElementInfo;
static LtXmlLib20Data::CAttributeInfo** ms_ppAttributeInfo;
};
};
#endif