VR-Forces 4.0.4 Class Documentation
include/vrfutil/rwForces.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2007 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: rwForces.h,v $ $Revision: 1.7 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 
00018 
00019 
00020 #ifndef DtRwForces_H_
00021 #define DtRwForces_H_
00022 
00023 #include <vlpi/disEnums.h>
00024 #include "vrfutil/rdrWritr.h"
00025 #include <vector>
00026 
00027 
00028 class DtReaderWriterRegistry;
00029 
00033 #include "vrfutil/vrfutilDefines.h"
00034 class DT_DLL_vrfutil DtRwForces : public DtReaderWriter
00035 {
00036 public:
00038    DtRwForces(const DtString& name = DtString::nullString(),
00039       DtReaderWriterRegistry* parentRegistry = NULL);
00040 
00041    DtRwForces(const DtSymbolString& name,
00042       DtReaderWriterRegistry* parentRegistry = NULL);
00043 
00045    DtRwForces(const DtRwForces & orig);
00046 
00048    DtRwForces & operator=(const DtRwForces & orig);
00049 
00051    DtRwForces& operator=(const std::vector<DtForceType>& orig);
00052 
00053    virtual ~DtRwForces();
00054 
00055 
00057 
00058    virtual const std::vector<DtForceType>& value() const;
00059    virtual void setValue(const std::vector<DtForceType>& value);
00060 
00061    virtual void addForce(DtForceType t);
00062    virtual void removeForce(DtForceType t);
00063 
00064    virtual void putData(FILE* fp, int indentLevel = 0);
00065    virtual DtlObjPtr getData(DtlObjPtr args, const DtFilename& searchPath,
00066       const DtVariableBindingsList& variableBindings);
00067 
00071    virtual const char* readerWriterType() const;
00072 
00073    virtual bool operator==(const DtRwForces&) const;
00074    virtual bool operator!=(const DtRwForces&) const;
00075 
00076    bool hasForce(const DtForceType&) const;
00077 
00080 
00081    DtForceType& operator[](int);
00082    const DtForceType operator[](int) const;
00084    int size() const;
00085    bool empty() const;
00086    void clear();
00087 
00088 protected:
00089    std::vector<DtForceType> myValue;
00090 };
00091 
00092 inline int DtRwForces::size() const
00093 {
00094    return myValue.size();
00095 }
00096 
00097 inline bool DtRwForces::empty() const
00098 {
00099    return myValue.empty();
00100 }
00101 
00102 inline void DtRwForces::clear()
00103 {
00104    myValue.clear();
00105 }
00106 
00107 #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)