VR-Forces 4.0.4 Class Documentation
include/vrfutil/modelSet.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: modelSet.h,v $ $Revision: 1.4 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef DtModelSet_H_
00013 #define DtModelSet_H_
00014 
00017 
00018 #include "vrfutil/rwList.h"
00019 #include "vrfutil/rwInt.h"
00020 #include <vlutil/vlString.h>
00021 #include "vrfutil/vrfutilDefines.h"
00022 
00023 class DtModelSetEntry;
00024 class DtFilename;
00025 class DtObjectType;
00026 
00027 #define LATEST_MODEL_SET_VERSION 1
00028 
00029 class DT_DLL_vrfutil DtModelSet : public DtRwList
00030 {
00031 public:
00032 
00034    DtModelSet();
00035 
00036    DtModelSet(const DtString& name, DtReaderWriterRegistry*  
00037       parentRegistry = NULL);
00038 
00040    virtual ~DtModelSet();
00041 
00043    DtModelSet(const DtModelSet& orig, 
00044       DtReaderWriterRegistry*  parentRegistry = NULL);
00045 
00047    DtModelSet& operator=(const DtModelSet& orig);
00048 
00049    virtual bool load(const DtFilename&);
00050    virtual bool save(const DtFilename&);
00051 
00052    virtual DtModelSetEntry* find(const DtObjectType&) const;
00053    virtual DtModelSetEntry* findMatchingPattern(const DtObjectType&) const;
00054    virtual DtModelSetEntry* findByUniqueID(const DtString&) const;
00055 
00056    virtual void setComment(const DtString&);
00057    virtual const DtString comment() const;
00058 
00059    static DtModelSet* create(const DtString&, DtReaderWriterRegistry* const parentRegistry = NULL);
00060 
00062    DtObjectType objectTypeFor(const DtString& label) const;
00063 
00065    virtual DtModelSetEntry* addModel(DtModelSetEntry*);
00066 
00067    virtual void emptyList();
00068 
00071    virtual void entitiesForObjectType(const DtObjectType& o, std::list<DtString>& list) const;
00072 
00074 
00075    int version() const;
00076 
00078    virtual DtString createUniqueID(const DtModelSetEntry*) const;
00079 
00080 protected:
00083    virtual DtlObjPtr getData(DtlObjPtr args, const DtFilename& searchPath,
00084       const DtVariableBindingsList& variableBindings);
00085 
00087    void copyList(const DtModelSet& orig);
00089    void clear();
00090    virtual void writeSelf(FILE* fp, int i, bool writeUnspecified,
00091                                const DtFilename& path);
00092 
00093 protected:
00094    DtString                   myFilename;
00095    DtString                   myComment;
00096    DtRwInt                    myVersion;
00097 };
00098 
00099 
00100 inline int DtModelSet::version() const
00101 {
00102    return myVersion;
00103 }
00104 
00105 #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)