VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
kynPathDataMetafileRecord.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2006 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: $ $Revision: $ $State: $
7 *******************************************************************************/
8 
11 
12 #ifndef kynPathDataMetafileRec_h
13 #define kynPathDataMetafileRec_h
14 
16 #include <iosfwd>
17 #include <list>
19 
21 
23  void* usr);
24 
26 {
27 public:
28 
31 
33  virtual ~DtKynPathDataMetafileRecord();
34 
37 
40 
42  virtual bool init();
43 
46  virtual bool get(std::istream& stream);
47 
48  // identifies a token or passes it to the base class.
49  virtual bool processToken(std::istream& stream, DtString& token);
50 
54  virtual DtString recordTypeName() const;
55 
56  // \return true.
57  virtual bool includeInMtd() const;
58 
59  virtual void setPDGName(const DtString& name);
60  virtual DtString PDGName() const;
61  virtual void setPDGPath(const DtString& path);
62  virtual DtString PDGPath() const;
63  virtual void setRelativePathCheck(const bool arg);
64  virtual bool RelativePathCheck() const;
65  virtual void setPDGType(const DtString& type);
66  virtual DtString PDGType() const;
67  virtual void setObjectType(const DtString& objectType);
68  virtual DtString objectType() const;
69 
75  static void addPostReadCallback(DtKynPathDataMetafileRecordCallback, void* usr);
76  static void removePostReadCallback(DtKynPathDataMetafileRecordCallback, void* usr);
78 
79  static DtMetafileRecord * create();
80 
81 protected:
82  // Write self to stream.
83  virtual bool writeAttributes(std::ostream& stream) const;
84  virtual bool getAttribute(const DtString attrName, DtString& value, unsigned index=0);
85  virtual bool setToken(const DtString& token, const DtString value);
86 
87  // Invokes all the postReadCallbacks currently on the list passing 'this'
88  // as the argument.
89  virtual void invokePostReadCallbacks();
90 
91 protected:
92  static const DtString thePDGName;
93  static const DtString thePDGPath;
95  static const DtString thePathDataType;
96  static const DtString theObjectType;
97 
103 
104  typedef std::pair<DtKynPathDataMetafileRecordCallback, void*> DtCallbackInfo;
105  typedef std::list<DtCallbackInfo> DtCallbackInfoList;
107 };
108 
109 #endif
void(* DtKynPathDataMetafileRecordCallback)(DtKynPathDataMetafileRecord *record, void *usr)
Definition: kynPathDataMetafileRecord.h:22
virtual bool init()
Initialize the metafile.
static const DtString thePDGName
Definition: kynPathDataMetafileRecord.h:92
bool myRelativePathCheck
Definition: kynPathDataMetafileRecord.h:100
Definition: kynPathDataMetafileRecord.h:25
static const DtString theObjectType
Definition: kynPathDataMetafileRecord.h:96
static const DtString theRelativePathCheck
Definition: kynPathDataMetafileRecord.h:94
DtString myObjectType
Definition: kynPathDataMetafileRecord.h:102
virtual bool setToken(const DtString &token, const DtString value)
identifies a token and returns true if the value can be set to it, false otherwise ...
virtual bool getAttribute(const DtString attrName, DtString &value, DtString &type, unsigned index=0)
Given the name of a record&#39;s attribute, returns True if the record has the attribute (the value is re...
virtual DtString recordTypeName() const =0
Returns the type name for the particular record. Descendants should have this method return some stri...
DtString myPathDataType
Definition: kynPathDataMetafileRecord.h:101
DtString myPDGName
Definition: kynPathDataMetafileRecord.h:98
virtual bool processToken(std::istream &stream, DtString &token)
identifies a token or passes token the parent class.
virtual bool writeAttributes(std::ostream &stream) const
Write attributes to stream. This is called by put(stream)
Definition: additionalDataRecord.h:22
std::pair< DtKynPathDataMetafileRecordCallback, void * > DtCallbackInfo
Definition: kynPathDataMetafileRecord.h:104
static const DtString thePDGPath
Definition: kynPathDataMetafileRecord.h:93
static DtCallbackInfoList thePostReadCallbackList
Definition: kynPathDataMetafileRecord.h:106
std::list< DtCallbackInfo > DtCallbackInfoList
Definition: kynPathDataMetafileRecord.h:105
DtAdditionalDataRecord & operator=(const DtAdditionalDataRecord &orig)
assignment operator
virtual bool includeInMtd() const =0
#define DT_DLL_terrainDbFactory
Definition: terrainDbFactoryDefines.h:23
voidpf stream
Definition: ioapi.h:39
DtString myPDGPath
Definition: kynPathDataMetafileRecord.h:99
Definition: metafileRecord.h:28
static const DtString thePathDataType
Definition: kynPathDataMetafileRecord.h:95

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)