if (!strcmp(node->getName(), "material")) {
SGSharedPtr<SGMaterial> m = new SGMaterial(options.get(), node, prop_root);
- vector<SGPropertyNode_ptr>names = node->getChildren("name");
+ std::vector<SGPropertyNode_ptr>names = node->getChildren("name");
for ( unsigned int j = 0; j < names.size(); j++ ) {
string name = names[j]->getStringValue();
// cerr << "Material " << name << endl;
#define _MATLIB_HXX
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-
#include <simgear/compiler.h>
#include <simgear/structure/SGSharedPtr.hxx>
#include <map> // STL associative "array"
#include <vector> // STL "array"
-#include <osg/Geode>
-
class SGMaterial;
class SGPropertyNode;
-using std::string;
-using std::map;
-using std::vector;
-using std::less;
-
-namespace simgear
-{
-class Effect;
-}
+namespace simgear { class Effect; }
+namespace osg { class Geode; }
// Material management class
class SGMaterialLib {
// associative array of materials
typedef std::vector< SGSharedPtr<SGMaterial> > material_list;
typedef material_list::iterator material_list_iterator;
- typedef map < string, material_list> material_map;
+ typedef std::map < std::string, material_list> material_map;
typedef material_map::iterator material_map_iterator;
typedef material_map::const_iterator const_material_map_iterator;
SGMaterialLib ( void );
// Load a library of material properties
- bool load( const string &fg_root, const string& mpath,
+ bool load( const std::string &fg_root, const std::string& mpath,
SGPropertyNode *prop_root );
// find a material record by material name
- SGMaterial *find( const string& material );
+ SGMaterial *find( const std::string& material );
material_map_iterator begin() { return matlib.begin(); }
const_material_map_iterator begin() const { return matlib.begin(); }