VR-Forces 4.0.4 Class Documentation
include/vrfmsgs/ifModVrfOvl.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2003 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: ifModVrfOvl.h,v $ $Revision: 1.9 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef DtIfModifyVrfOverlay_H_
00013 #define DtIfModifyVrfOverlay_H_
00014 
00015 #include <vrfExtProtocol/ifaceCont.h>
00016 #include <vlutil/vlString.h>
00017 #include <vrfExtProtocol/objType.h>
00018 #include <vlpi/entityIdentifier.h>
00019 
00022 
00023 #define DtModifyOverlayAll          0x00000000
00024 #define DtModifyOverlayColor        0x00000001
00025 #define DtModifyOverlayParent       0x00000002
00026 #define DtModifyOverlayUserData     0x00000004
00027 #define DtModifyOverlayAttachedTo   0x00000008
00028 
00029 struct DtNetIfModifyVrfOverlay
00030 {
00031    DtNetEntityIdentifier  myObjectIdentifier;         
00032    DtNetU32               myColor;                    
00033    DtNetU8                myParentLength;             
00034    DtNetU32               myUserDataLen;              
00035    DtNetU8                myAttachToLength;           
00036    DtNetU8                myKeepExistingAttachment;   
00037    DtNetU8                myModificationFlags;        
00038 };
00039 
00060 #include "vrfmsgs/vrfmsgsDefines.h"
00061 class DT_DLL_vrfmsgs DtIfModifyVrfOverlay : public DtSimInterfaceContent
00062 {
00063 public:
00064 
00066    DtIfModifyVrfOverlay();
00067 
00069    virtual ~DtIfModifyVrfOverlay();
00070 
00072    DtIfModifyVrfOverlay(const DtIfModifyVrfOverlay& orig);
00073 
00075    DtIfModifyVrfOverlay& operator=(const DtIfModifyVrfOverlay& orig);
00076 
00078    virtual DtSimInterfaceContent * clone() const;
00079 
00082    virtual int type() const;
00083 
00085    virtual void setObjectIdentifier(const DtEntityIdentifier& objectIdentifier);
00086    virtual const DtEntityIdentifier & objectIdentifier() const;
00087    
00088    virtual int netRepSize() const;
00089    virtual bool setFromNet(const char* contentBuffer, 
00090       unsigned contentSize);
00091    virtual bool setToNet();
00092 
00093    virtual void setUserData(char* userData, int iLen);
00094    virtual const char* userData() const;
00095    virtual int userDataLen() const;
00096 
00097    virtual char modificationFlags() const;
00098 
00099    bool modifyColor() const;
00100    bool modifyParent() const;
00101    bool modifyUserData() const;
00102    bool modifyAttachedTo() const;
00103 
00104    virtual void printDataToString(DtString& str);
00105 
00106    static DtSimInterfaceContent* creator();
00107 
00108 public:
00113 
00115    virtual void setParentName(const DtString& parentName);
00116    virtual const DtString& parentName() const;
00117 
00119    virtual void setAttachmentInfo(const DtString& attachName, bool keepExisting);
00120    virtual const DtString& attachmentName() const;
00121    virtual bool keepExistingAttachment() const;
00122 
00124    virtual void setColor(int color);
00125    virtual int color() const;
00126 
00127 protected:
00128 
00129    DtEntityIdentifier myObjectIdentifier;
00130 
00131    DtString myParentName;
00132    DtString myAttachmentName;
00133    bool  myKeepExistingAttachment;
00134    int myColor;
00135 
00136    char* myUserData;
00137    int   myUserDataLen;
00138 
00139    char  myModificationFlags;
00140 };
00141 
00142 inline char DtIfModifyVrfOverlay::modificationFlags() const
00143 {
00144    return myModificationFlags;
00145 }
00146 
00147 inline bool DtIfModifyVrfOverlay::modifyColor() const
00148 {
00149    return ((myModificationFlags == DtModifyOverlayAll) ||
00150       ((myModificationFlags & DtModifyOverlayColor) != 0));
00151 }
00152 
00153 inline bool DtIfModifyVrfOverlay::modifyParent() const
00154 {
00155    return ((myModificationFlags == DtModifyOverlayAll) ||
00156       ((myModificationFlags & DtModifyOverlayParent) != 0));
00157 }
00158 
00159 inline bool DtIfModifyVrfOverlay::modifyUserData() const
00160 {
00161    return ((myModificationFlags == DtModifyOverlayAll) ||
00162       ((myModificationFlags & DtModifyOverlayUserData) != 0));
00163 }
00164 
00165 inline bool DtIfModifyVrfOverlay::modifyAttachedTo() const
00166 {
00167    return ((myModificationFlags == DtModifyOverlayAll) ||
00168       ((myModificationFlags & DtModifyOverlayAttachedTo) != 0));
00169 }
00170 
00171 #endif
00172 

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)