VR-Forces 4.0.4 Class Documentation
include/vrfutil/rwForceDescriptionList.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: rwForceDescriptionList.h,v $ $Revision: 1.2 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00013 
00014 #ifndef rwForceDescriptionList_h
00015 #define rwForceDescriptionList_h
00016 
00017 #include "vrfutil/rdrWritr.h"
00018 #include "vrfutil/rwInt.h"
00019 #include "vrfutil/rwIntegerList.h"
00020 #include "vrfutil/rwVector.h"
00021 #include "vrfutil/rwBoolean.h"
00022 #include "vrfutil/rwString.h"
00023 #include "vlutil/vlFilename.h"
00024 
00025 #include <list>
00026 
00030 
00031 #include "vrfutil/vrfutilDefines.h"
00032 class DT_DLL_vrfutil DtRwForceDescription : public DtReaderWriter
00033 {
00034 public:
00035    DtRwForceDescription();
00036 
00038    DtRwForceDescription(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
00039 
00040    DtRwForceDescription(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
00041 
00043    DtRwForceDescription(const DtRwForceDescription& orig, DtReaderWriterRegistry* const parentRegistry = NULL);
00044 
00046    DtRwForceDescription & operator=(const DtRwForceDescription & orig);
00047 
00048 
00049    virtual ~DtRwForceDescription();
00050 
00051    //get /set the force ID or DtForceType
00052    virtual void setForceId(int newId);
00053    virtual int forceId();
00054    
00055    //get /set the force name
00056    virtual void setForceName(DtString newName);
00057    virtual DtString forceName();
00058 
00059    //get /set the force color (0..255)
00060    virtual void setForceColor(int r, int g, int b);
00061    virtual DtVector forceColor();
00062 
00063    //get /set whether or not the force should be included in dialogs
00064    virtual void setIncludeInDialogs(bool include);
00065    virtual bool includeInDialogs();
00066 
00067    //sets which forces this force is hostile to
00068    virtual void setHostileToForce(int forceId);
00069    //gets a copy of the list of forces that this force is hostile to
00070    virtual std::list<int> hostileToList();
00071 
00072 protected:
00073    DtRwInt myForceId;
00074    DtRwString myForceName;
00075    DtRwVector myForceColor;
00076    DtRwBoolean myIncludeInDialogs;
00077    DtRwIntegerList myHostileToList;
00078 };
00079 
00083 
00084 class DT_DLL_vrfutil DtRwForceDescriptionList : public DtRwList
00085 {
00086 public:
00088    DtRwForceDescriptionList();
00089 
00091    DtRwForceDescriptionList(const DtString& name, DtReaderWriterRegistry* const 
00092       parentRegistry = NULL);
00093    DtRwForceDescriptionList(const DtSymbolString& name, DtReaderWriterRegistry* const 
00094       parentRegistry = NULL);
00095 
00097    virtual ~DtRwForceDescriptionList();
00098 
00100    DtRwForceDescriptionList(const DtString& name, const DtRwForceDescriptionList& orig, 
00101       DtReaderWriterRegistry* parentRegistry = NULL);
00102 
00103    DtRwForceDescriptionList(const DtSymbolString& name, const DtRwForceDescriptionList& orig, 
00104       DtReaderWriterRegistry* parentRegistry = NULL);
00105 
00107    DtRwForceDescriptionList& operator=(const DtRwForceDescriptionList& orig);
00108 
00110    virtual void addForce(DtRwForceDescription* rwForce);
00111 
00115    virtual void removeForce(DtRwForceDescription* rwForce, DtListItem* listItem);
00116 
00118    void emptyList();
00119 
00120 protected:
00121 
00124    virtual DtlObjPtr getData(DtlObjPtr args, const DtFilename& searchPath,
00125       const DtVariableBindingsList& variableBindings);
00126 
00128    void copyList(const DtRwForceDescriptionList& orig);
00129 };
00130 
00131 #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)