Modernise the mat lib header, remove 'using std'
This commit is contained in:
@@ -77,7 +77,7 @@ bool SGMaterialLib::load( const string &fg_root, const string& mpath,
|
||||
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;
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
#define _MATLIB_HXX
|
||||
|
||||
|
||||
#ifndef __cplusplus
|
||||
# error This library requires C++
|
||||
#endif
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include <simgear/structure/SGSharedPtr.hxx>
|
||||
@@ -37,20 +33,11 @@
|
||||
#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 {
|
||||
@@ -60,7 +47,7 @@ private:
|
||||
// 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;
|
||||
|
||||
@@ -72,10 +59,10 @@ public:
|
||||
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(); }
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#define SIGN "OBJECT_SIGN: "
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
using namespace simgear;
|
||||
|
||||
// for temporary storage of sign elements
|
||||
|
||||
Reference in New Issue
Block a user