Version: 9.12.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 corresponding to TopoDS_Shape. More...
 
static TopoDS_Shape GeomObjectToShape (GEOM::GEOM_Object_ptr theGeomObject)
 Return TopoDS_Shape corresponding to GEOM_Object. More...
 
static TopoDS_Shape EntryToShape (const std::string theEntry)
 Return TopoDS_Shape by a study entry. 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

◆ EntryOrShapeToGeomObject()

◆ EntryToShape()

TopoDS_Shape StdMeshers_ObjRefUlils::EntryToShape ( const std::string  theEntry)
static

◆ GeomObjectToEntry()

std::string StdMeshers_ObjRefUlils::GeomObjectToEntry ( GEOM::GEOM_Object_ptr  theGeomObject)
static

◆ GeomObjectToShape()

◆ LoadFromStream()

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(), and SMESH_Gen_i::getStudyServant().

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

◆ LoadObjectFromStream()

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().

◆ SaveToStream() [1/3]

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

◆ SaveToStream() [2/3]

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

◆ SaveToStream() [3/3]

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().

◆ ShapeToGeomObject()

static GEOM::GEOM_Object_ptr StdMeshers_ObjRefUlils::ShapeToGeomObject ( const TopoDS_Shape &  theShape)
static

Return GEOM Object corresponding to TopoDS_Shape.

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

References SMESH_Gen_i::GetSMESHGen().