Do we really need three pieces of code that try to do the
same thing?


simgear/props/props_io.cxx: static const char * getTypeName 
(simgear::props::Type type)

src/Network/props.cxx:      static string getValueTypeString(const 
SGPropertyNode *node)

src/GUI/property_list.cxx:  static string getValueTypeString( const 
SGPropertyNode *node )


==========================


commit 92b369deb2654351ce4e385a773ccbe01113ce14
Author: John Denker <j...@av8n.com>
Date:   Sun Feb 7 02:37:55 2010 -0700

    Export the code that translates the _type_ of a property node
    to a human-readable string.

diff --git a/simgear/props/props_io.cxx b/simgear/props/props_io.cxx
index 48244c7..214d73f 100644
--- a/simgear/props/props_io.cxx
+++ b/simgear/props/props_io.cxx
@@ -410,9 +410,10 @@ void readProperties (const char *buf, const int size,
 #define INDENT_STEP 2
 
 /**
- * Return the type name.
+ * Convert the _type_ of a property node
+ * to a human-readable string.
  */
-static const char *
+const char *
 getTypeName (simgear::props::Type type)
 {
   using namespace simgear;
diff --git a/simgear/props/props_io.hxx b/simgear/props/props_io.hxx
index b619c04..22c0cfb 100644
--- a/simgear/props/props_io.hxx
+++ b/simgear/props/props_io.hxx
@@ -68,6 +68,13 @@ void writeProperties (const std::string &file,
 bool copyProperties (const SGPropertyNode *in, SGPropertyNode *out);
 
 
+/**
+ * Convert the _type_ of a property node
+ * to a human-readable string.
+ */
+const char *
+getTypeName (simgear::props::Type type);
+
 #endif // __PROPS_IO_HXX
 
 // end of props_io.hxx


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to