X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmisc%2Fprops.hxx;h=b9a0157ac4bca01f341913748546a7357ce5c5cd;hb=5bab565cfe4c30d6cf08ecaba50af74d5e4f0c98;hp=5a1a32b0b506eb742553e298e9bf7941bca5045d;hpb=05eaa7135f1d708f3985183accc8011c71427fa5;p=simgear.git diff --git a/simgear/misc/props.hxx b/simgear/misc/props.hxx index 5a1a32b0..b9a0157a 100644 --- a/simgear/misc/props.hxx +++ b/simgear/misc/props.hxx @@ -27,6 +27,11 @@ SG_USING_STD(istream); SG_USING_STD(ostream); #endif +#ifdef NONE +#pragma warn A sloppy coder has defined NONE as a macro! +#undef NONE +#endif + #ifdef ALIAS #pragma warn A sloppy coder has defined ALIAS as a macro! #undef ALIAS @@ -506,7 +511,9 @@ public: enum Attribute { READ = 1, WRITE = 2, - ARCHIVE = 4 + ARCHIVE = 4, + TRACE_READ = 8, + TRACE_WRITE = 16 }; @@ -694,7 +701,7 @@ public: /** * Check a single mode attribute for the property node. */ - bool getAttribute (Attribute attr) const { return (_attr & attr); } + bool getAttribute (Attribute attr) const { return ((_attr & attr) != 0); } /** @@ -1033,6 +1040,24 @@ private: */ void clear_value (); + + /** + * Get the value as a string. + */ + string get_string () const; + + + /** + * Trace a read access. + */ + void trace_read (Type accessType) const; + + + /** + * Trace a write access. + */ + void trace_write (Type accessType) const; + string _name; int _index; SGPropertyNode * _parent; @@ -1067,26 +1092,26 @@ private: /** * Read properties from an XML input stream. */ -bool readProperties (istream &input, SGPropertyNode * start_node, +void readProperties (istream &input, SGPropertyNode * start_node, const string &base = ""); /** * Read properties from an XML file. */ -bool readProperties (const string &file, SGPropertyNode * start_node); +void readProperties (const string &file, SGPropertyNode * start_node); /** * Write properties to an XML output stream. */ -bool writeProperties (ostream &output, const SGPropertyNode * start_node); +void writeProperties (ostream &output, const SGPropertyNode * start_node); /** * Write properties to an XML file. */ -bool writeProperties (const string &file, const SGPropertyNode * start_node); +void writeProperties (const string &file, const SGPropertyNode * start_node); /**