Version: 8.3.0
StdMeshers_ObjRefUlils Class Reference

Class encapsulates methods. More...

#include <StdMeshers_ObjRefUlils.hxx>

Static Public Member Functions

static GEOM::GEOM_Object_ptr ShapeToGeomObject (const TopoDS_Shape &theShape)
 Return GEOM Object correspoding to TopoDS_Shape. More...
 
static TopoDS_Shape GeomObjectToShape (GEOM::GEOM_Object_ptr theGeomObject)
 Return TopoDS_Shape correspoding to GEOM_Object. More...
 
static std::string GeomObjectToEntry (GEOM::GEOM_Object_ptr theGeomObject)
 Return study entry of GEOM Object. More...
 
static GEOM::GEOM_Object_ptr EntryOrShapeToGeomObject (const std::string &theEntry, const TopoDS_Shape &theShape)
 Return GEOM Object by its study entry or TopoDS_Shape. More...
 
static void SaveToStream (const TopoDS_Shape &theShape, std::ostream &stream)
 Store the shape in the stream. More...
 
static TopoDS_Shape LoadFromStream (std::istream &stream, std::string *entry=NULL)
 Retrieve a shape from the stream. More...
 
static void SaveToStream (CORBA::Object_ptr obj, std::ostream &stream)
 Store the CORBA object in the stream. More...
 
template<class TInterface >
static TInterface::_var_type LoadObjectFromStream (std::istream &stream)
 Retrieve a CORBA object from the stream. More...
 
static void SaveToStream (const std::string &studyEntry, std::ostream &stream)
 Store the study entry of object in the stream. More...
 

Detailed Description

Class encapsulates methods.

  • converting internal objects to CORBA objects and backward and
  • persistence methods for such objects

These methods are useful for hypotheses referring to other objects like meshes, geom objects, other hypotheses, etc.

Member Function Documentation

std::string StdMeshers_ObjRefUlils::GeomObjectToEntry ( GEOM::GEOM_Object_ptr  theGeomObject)
static
static TopoDS_Shape StdMeshers_ObjRefUlils::GeomObjectToShape ( GEOM::GEOM_Object_ptr  theGeomObject)
static
TopoDS_Shape StdMeshers_ObjRefUlils::LoadFromStream ( std::istream &  stream,
std::string *  entry = NULL 
)
static

Retrieve a shape from the stream.

Parameters
stream- the stream
Return values
TopoDS_Shape- resulting shape

References SMESH_Gen_i::GetSMESHGen().

Referenced by StdMeshers_QuadrangleParams_i::LoadFrom(), StdMeshers_ProjectionSource1D_i::LoadFrom(), StdMeshers_ProjectionSource2D_i::LoadFrom(), and StdMeshers_ProjectionSource3D_i::LoadFrom().

template<class TInterface >
static TInterface::_var_type StdMeshers_ObjRefUlils::LoadObjectFromStream ( std::istream &  stream)
static

Retrieve a CORBA object from the stream.

Parameters
stream- the stream
Return values
CORBA::Object_ptr- result object

References SMESH_Gen_i::GetSMESHGen().

void StdMeshers_ObjRefUlils::SaveToStream ( const TopoDS_Shape &  theShape,
std::ostream &  stream 
)
static
void StdMeshers_ObjRefUlils::SaveToStream ( CORBA::Object_ptr  obj,
std::ostream &  stream 
)
static

Store the CORBA object in the stream.

Parameters
obj- object to store
stream- the stream

References SMESH_Gen_i::GetSMESHGen().

void StdMeshers_ObjRefUlils::SaveToStream ( const std::string &  studyEntry,
std::ostream &  stream 
)
static

Store the study entry of object in the stream.

Parameters
studyEntry- the study entry
stream- the stream
static GEOM::GEOM_Object_ptr StdMeshers_ObjRefUlils::ShapeToGeomObject ( const TopoDS_Shape &  theShape)
static

Return GEOM Object correspoding to TopoDS_Shape.

Parameters
theShape- input TopoDS_Shape
Return values
GEOM::GEOM_Object_ptr- result object

References SMESH_Gen_i::GetSMESHGen().