VR-Forces 4.0.4 Class Documentation
include/vrftasks/adminContent.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: adminContent.h,v $ $Revision: 1.3 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00013 
00014 #ifndef adminContent_h
00015 #define adminContent_h
00016 
00017 #include "tdbutil/translation.h"
00018 #include "vrftasks/vrftasksDefines.h"
00019 #include "vrftasks/adminContentFactory.h"
00020 #include "tdbutil/tdbUnits.h"
00021 
00027 class DT_DLL_vrftasks DtAdminContent 
00028 {
00029 protected:
00032 
00034    DtAdminContent();
00035 
00037    DtAdminContent(const DtAdminContent & orig);
00038 
00040    const DtAdminContent & operator=(const DtAdminContent & orig);
00041 
00042 public:
00043 
00045    virtual ~DtAdminContent();
00046 
00049    virtual bool init();
00050 
00053    virtual int type() const = 0;
00054 
00059    virtual DtAdminContent * clone() const = 0;
00060 
00065    virtual DtString stringRep() const = 0;
00066 
00067    virtual char* netRep();
00068 
00073 
00074 
00075 
00076    virtual int netRepSize() const;
00077 
00080    virtual bool setFromNet(const char* contentBuffer,
00081       unsigned contentSize);
00082 
00085    virtual bool setToNet();
00087 
00091    static DtAdminContent * createAdminContent(int requestType);
00092 
00093    static void addAdminContentCreatorFcn(const DtString & contentName,
00094       int contentType, DtAdminContentCreatorFcn fcn);
00095 
00096    static void setFactory(DtAdminContentFactory * factory);
00097    static DtAdminContentFactory * factory();
00098 
00099    static bool getAdminContentNameFromAdminContentType(int contentType,
00100       DtString& contentName);
00101    static bool getAdminContentTypeFromAdminContentName(const DtString& contentName,
00102       int& contentType);
00103 
00104 protected:
00105    virtual char* createNetworkBuffer();
00106 
00107 protected:
00108    char*     myNetRep;
00109 
00110 protected:
00111    static DtAdminContentFactory * myFactory;
00112 };
00113 
00114 namespace DtBufferSerialize
00115 {
00118    DT_DLL_vrftasks int getSize(const DtAdminContent* const&  contentPtr);
00119 
00124    DT_DLL_vrftasks char *encode(const DtAdminContent* const& adminContentPtr, char *buffer);
00125 
00134    DT_DLL_vrftasks const char *decode(DtAdminContent*& adminContentPtr, const char *buffer);
00135 }
00136 
00137 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)