VR-Forces 4.0.4 Class Documentation
include/terrainDbFactory/kynPathDataMetafileRec.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2006 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile:  $ $Revision: $ $State: $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef kynPathDataMetafileRec_h
00013 #define kynPathDataMetafileRec_h
00014 
00015 #include "terrainDbFactory/additionalDataRecord.h"
00016 #include <iosfwd>
00017 #include <list>
00018 #include "terrainDbFactory/terrainDefines.h"
00019 
00020 class DtKynPathDataMetafileRecord;
00021 
00022 typedef void (*DtKynPathDataMetafileRecordCallback)(DtKynPathDataMetafileRecord* record, 
00023                                                    void* usr);
00024 
00025 class DT_DLL_terrainDbFactory DtKynPathDataMetafileRecord : public DtAdditionalDataRecord
00026 {
00027 public:
00028 
00030    DtKynPathDataMetafileRecord();
00031 
00033    virtual ~DtKynPathDataMetafileRecord();
00034 
00036    DtKynPathDataMetafileRecord(const DtKynPathDataMetafileRecord& orig);
00037 
00039    DtKynPathDataMetafileRecord& operator=(const DtKynPathDataMetafileRecord& orig);
00040 
00042    virtual bool init();
00043 
00046    virtual bool get(std::istream& stream);
00047 
00048    // identifies a token or passes it to the base class.
00049    virtual bool processToken(std::istream& stream, DtString& token);
00050 
00054    virtual DtString recordTypeName() const;
00055 
00056    // \return true.
00057    virtual bool includeInMtd() const;
00058 
00059    virtual void setPDGName(const DtString& name);
00060    virtual DtString PDGName() const;
00061    virtual void setPDGPath(const DtString& path);
00062    virtual DtString PDGPath() const;
00063    virtual void setRelativePathCheck(const bool arg);
00064    virtual bool RelativePathCheck() const;
00065    virtual void setPDGType(const DtString& type);
00066    virtual DtString PDGType() const;
00067    virtual void setObjectType(const DtString& objectType);
00068    virtual DtString objectType() const;
00069 
00075    static void addPostReadCallback(DtKynPathDataMetafileRecordCallback, void* usr);
00076    static void removePostReadCallback(DtKynPathDataMetafileRecordCallback, void* usr);
00078 
00079    static DtMetafileRecord * create();
00080 
00081 protected:
00082    // Write self to stream.
00083    virtual bool writeAttributes(std::ostream& stream) const;
00084    virtual bool getAttribute(const DtString attrName, DtString& value, unsigned index=0);
00085    virtual bool setToken(const DtString& token, const DtString value);
00086 
00087    // Invokes all the postReadCallbacks currently on the list passing 'this'
00088    // as the argument.
00089    virtual void invokePostReadCallbacks();
00090 
00091 protected:
00092    static const DtString thePDGName;
00093    static const DtString thePDGPath;
00094    static const DtString theRelativePathCheck;
00095    static const DtString thePathDataType;
00096    static const DtString theObjectType;
00097 
00098    DtString myPDGName;
00099    DtString myPDGPath;
00100    bool myRelativePathCheck;
00101    DtString myPathDataType;
00102    DtString myObjectType;
00103 
00104    typedef std::pair<DtKynPathDataMetafileRecordCallback, void*> DtCallbackInfo;
00105    typedef std::list<DtCallbackInfo> DtCallbackInfoList;
00106    static DtCallbackInfoList thePostReadCallbackList;
00107 };
00108 
00109 #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)