// Module : GEOM
// $Header$
-using namespace std;
+#include <fstream.h>
+#include <strstream>
+
#include <BRepTools_ShapeSet.hxx>
+#include <BRepTools.hxx>
+
#include "GEOM_Shape_i.hh"
#include "SALOME_NamingService.hxx"
-#include <fstream.h>
-#include <BRepTools.hxx>
+using namespace std;
//=================================================================================
// : WARNING : Register to naming service actually removed !
//=================================================================================
void GEOM_Shape_i::Name(const char* name) {
- _name = strdup(name);
+ _name = CORBA::string_dup(name);
GEOM::GEOM_Shape_ptr g = GEOM::GEOM_Shape::_narrow(_this());
// Removed declaration of shapes to naming service
// function : Name (get method)
// purpose : to get the attribute 'name' of this shape
//=================================================================================
-char* GEOM_Shape_i::Name() { return strdup(_name); }
+char* GEOM_Shape_i::Name() { return CORBA::string_dup(_name); }
//=================================================================================
// function : MainName (set method)
// purpose : to set the attribute 'name' of this mainshape.
//=================================================================================
void GEOM_Shape_i::MainName(const char* name) {
- _mainname = strdup(name);
+ _mainname = CORBA::string_dup(name);
}
// function : MainName (get method)
// purpose : to get the attribute 'name' of this shape
//=================================================================================
-char* GEOM_Shape_i::MainName() { return strdup(_mainname); }
+char* GEOM_Shape_i::MainName() { return CORBA::string_dup(_mainname); }
//=================================================================================
// function : IsMainShape (get method)
// function : ShapeId
// purpose : to get the id of this shape from GEOM (OCAF entry)
//=================================================================================
-char* GEOM_Shape_i::ShapeId() { return strdup(_shapeid) ; }
+char* GEOM_Shape_i::ShapeId() { return CORBA::string_dup(_shapeid) ; }
//=================================================================================
// function : ShapeId (set method)
// purpose : to set the id of this shape in GEOM/OCAF doc
//=================================================================================
-void GEOM_Shape_i::ShapeId(const char * shapeid) { _shapeid = strdup(shapeid) ; }
+void GEOM_Shape_i::ShapeId(const char * shapeid) { _shapeid = CORBA::string_dup(shapeid) ; }
// function : StudyShapeId (get method)
// purpose : to get the id of this shape from the study document (OCAF entry)
//=================================================================================
-char* GEOM_Shape_i::StudyShapeId() { return strdup(_studyshapeid) ; }
+char* GEOM_Shape_i::StudyShapeId() { return CORBA::string_dup(_studyshapeid) ; }
//=================================================================================
// purpose : to set the id of this shape in the Study document (OCAF entry)
//=================================================================================
void GEOM_Shape_i::StudyShapeId(const char * studyshapeid)
-{ _studyshapeid = strdup(studyshapeid) ; }
+{ _studyshapeid = CORBA::string_dup(studyshapeid) ; }
// function : NameType (get method)
// purpose : to get the attribute 'nametype' of this shape
//=================================================================================
-char* GEOM_Shape_i::NameType() { return strdup(_nametype); }
+char* GEOM_Shape_i::NameType() { return CORBA::string_dup(_nametype); }
//=================================================================================
// function : GetShapeStream