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) 2025 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() override;
34 
37 
40 
42  virtual bool init() override;
43 
46  virtual bool get(std::istream &stream) override;
47 
48  // identifies a token or passes it to the base class.
49  virtual bool processToken(std::istream &stream, DtString &token) override;
50 
54  virtual DtString recordTypeName() const override;
55 
56  // \return true.
57  virtual bool includeInMtd() const override;
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 override;
84  virtual bool getAttribute(const DtString attrName, DtString &value,
85  unsigned index = 0) override;
86  virtual bool setToken(const DtString &token, const DtString value) override;
87 
88  // Invokes all the postReadCallbacks currently on the list passing 'this'
89  // as the argument.
90  virtual void invokePostReadCallbacks();
91 
92 protected:
93  static const DtString thePDGName;
94  static const DtString thePDGPath;
96  static const DtString thePathDataType;
97  static const DtString theObjectType;
98 
104 
105  typedef std::pair<DtKynPathDataMetafileRecordCallback, void*> DtCallbackInfo;
106  typedef std::list<DtCallbackInfo> DtCallbackInfoList;
108 };
109 
110 #endif
void(* DtKynPathDataMetafileRecordCallback)(DtKynPathDataMetafileRecord *record, void *usr)
Definition: kynPathDataMetafileRecord.h:22
virtual bool init()
Initialize the metafile.
static const DtString thePDGName
Definition: kynPathDataMetafileRecord.h:93
bool myRelativePathCheck
Definition: kynPathDataMetafileRecord.h:101
Definition: kynPathDataMetafileRecord.h:25
static const DtString theObjectType
Definition: kynPathDataMetafileRecord.h:97
static const DtString theRelativePathCheck
Definition: kynPathDataMetafileRecord.h:95
DtString myObjectType
Definition: kynPathDataMetafileRecord.h:103
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:102
DtString myPDGName
Definition: kynPathDataMetafileRecord.h:99
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:105
static const DtString thePDGPath
Definition: kynPathDataMetafileRecord.h:94
static DtCallbackInfoList thePostReadCallbackList
Definition: kynPathDataMetafileRecord.h:107
std::list< DtCallbackInfo > DtCallbackInfoList
Definition: kynPathDataMetafileRecord.h:106
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:100
Definition: metafileRecord.h:28
static const DtString thePathDataType
Definition: kynPathDataMetafileRecord.h:96

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)