Use std::string instead of char* for IfcGeomObjects::Init()

This commit is contained in:
Thomas Krijnen
2011-12-01 11:19:27 +00:00
parent 1a40a9f78c
commit f6da8285f7
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -432,7 +432,7 @@ const IfcGeomObjects::IfcObject* IfcGeomObjects::GetObject(int id) {
const IfcGeomObjects::IfcGeomObject* IfcGeomObjects::Get() { const IfcGeomObjects::IfcGeomObject* IfcGeomObjects::Get() {
return current_geom_obj; return current_geom_obj;
} }
bool IfcGeomObjects::Init(const char* fn) { bool IfcGeomObjects::Init(const std::string fn) {
return IfcGeomObjects::Init(fn, 0, 0); return IfcGeomObjects::Init(fn, 0, 0);
} }
bool _Init() { bool _Init() {
@@ -449,7 +449,7 @@ bool _Init() {
total = shapereps->Size(); total = shapereps->Size();
return true; return true;
} }
bool IfcGeomObjects::Init(const char* fn, std::ostream* log1, std::ostream* log2) { bool IfcGeomObjects::Init(const std::string fn, std::ostream* log1, std::ostream* log2) {
Ifc::SetOutput(log1,log2); Ifc::SetOutput(log1,log2);
if ( !Ifc::Init(fn) ) return false; if ( !Ifc::Init(fn) ) return false;
return _Init(); return _Init();
+2 -2
View File
@@ -115,9 +115,9 @@ namespace IfcGeomObjects {
IfcGeomObject(int my_id, int p_id, const std::string& n, const std::string& t, const std::string& g, const gp_Trsf& trsf, IfcMesh* m); IfcGeomObject(int my_id, int p_id, const std::string& n, const std::string& t, const std::string& g, const gp_Trsf& trsf, IfcMesh* m);
}; };
bool Init(const char* fn); bool Init(const std::string fn);
bool Init(void* data, int len); bool Init(void* data, int len);
bool Init(const char* fn, std::ostream* log1= 0, std::ostream* log2= 0); bool Init(const std::string fn, std::ostream* log1= 0, std::ostream* log2= 0);
bool Init(std::istream& f, int len, std::ostream* log1= 0, std::ostream* log2= 0); bool Init(std::istream& f, int len, std::ostream* log1= 0, std::ostream* log2= 0);
void Settings(int setting, bool value); void Settings(int setting, bool value);
bool CleanUp(); bool CleanUp();
+1 -1
View File
@@ -48,7 +48,7 @@ namespace IfcGeomObjects {
bool Next(); bool Next();
const IfcGeomObject* Get(); const IfcGeomObject* Get();
bool Init(const char* fn); bool Init(const std::string fn);
void Settings(int setting, bool value); void Settings(int setting, bool value);
int Progress(); int Progress();
const IfcObject* GetObject(int id); const IfcObject* GetObject(int id);