mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-26 11:40:33 +05:00
Avoid including of SALOMEDS classes
This commit is contained in:
parent
e2e0cbee34
commit
4fbd5fabf5
@ -10,8 +10,7 @@
|
||||
|
||||
#include <SUIT_Session.h>
|
||||
|
||||
#include <SALOMEDS_SObject.hxx>
|
||||
|
||||
#include <SALOMEDSClient.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
@ -55,23 +54,29 @@ bool GEOM_SelectionFilter::isOk( const SUIT_DataOwner* sOwner ) const
|
||||
// function : getObject
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
GEOM::GEOM_Object_ptr GEOM_SelectionFilter::getObject( const SUIT_DataOwner* sOwner ) const
|
||||
GEOM::GEOM_Object_ptr GEOM_SelectionFilter::getObject (const SUIT_DataOwner* sOwner) const
|
||||
{
|
||||
GEOM::GEOM_Object_var anObj;
|
||||
|
||||
const SalomeApp_DataOwner* owner = dynamic_cast<const SalomeApp_DataOwner*> ( sOwner );
|
||||
const SalomeApp_DataOwner* owner = dynamic_cast<const SalomeApp_DataOwner*>(sOwner);
|
||||
SalomeApp_Study* appStudy = getStudy();
|
||||
if ( owner && appStudy )
|
||||
if (owner && appStudy)
|
||||
{
|
||||
_PTR(Study) study = appStudy->studyDS();
|
||||
QString entry = owner->entry();
|
||||
|
||||
_PTR(SObject) aSO( study->FindObjectID( entry.latin1() ) );
|
||||
if ( aSO )
|
||||
anObj = GEOM::GEOM_Object::_narrow(dynamic_cast<SALOMEDS_SObject*>(aSO.get())->GetObject());
|
||||
_PTR(SObject) aSO (study->FindObjectID(entry.latin1()));
|
||||
if (aSO) {
|
||||
std::string aValue = aSO->GetIOR();
|
||||
if (strcmp(aValue.c_str(), "") != 0) {
|
||||
CORBA::ORB_ptr anORB = SalomeApp_Application::orb();
|
||||
CORBA::Object_var aCorbaObj = anORB->string_to_object(aValue.c_str());
|
||||
anObj = GEOM::GEOM_Object::_narrow(aCorbaObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !CORBA::is_nil( anObj ) )
|
||||
if (!CORBA::is_nil(anObj))
|
||||
return anObj._retn();
|
||||
|
||||
return GEOM::GEOM_Object::_nil();
|
||||
@ -81,11 +86,13 @@ GEOM::GEOM_Object_ptr GEOM_SelectionFilter::getObject( const SUIT_DataOwner* sOw
|
||||
// function : getShape
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
bool GEOM_SelectionFilter::getShape( const GEOM::GEOM_Object_ptr& theObject, TopoDS_Shape& theShape ) const
|
||||
bool GEOM_SelectionFilter::getShape (const GEOM::GEOM_Object_ptr& theObject,
|
||||
TopoDS_Shape& theShape) const
|
||||
{
|
||||
if ( !CORBA::is_nil( theObject ) )
|
||||
{
|
||||
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
|
||||
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>
|
||||
( SUIT_Session::session()->activeApplication() );
|
||||
if ( app )
|
||||
{
|
||||
SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( app->namingService() );
|
||||
@ -161,4 +168,3 @@ bool GEOM_SelectionFilter::isShapeOk( const TopoDS_Shape& ) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ LIB_CLIENT_IDL= GEOM_Gen.idl SALOMEDS.idl SALOME_Exception.idl SALOME_GenericObj
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(BOOST_CPPFLAGS) -I$(GUI_ROOT_DIR)/include/salome -I$(KERNEL_ROOT_DIR)/include/salome
|
||||
CXXFLAGS += $(QT_INCLUDES) $(BOOST_CPPFLAGS) -I$(GUI_ROOT_DIR)/include/salome -I$(KERNEL_ROOT_DIR)/include/salome
|
||||
LDFLAGS += -L$(GUI_ROOT_DIR)/lib/salome -L$(KERNEL_ROOT_DIR)/lib/salome -lsuit -lSalomeApp -lSalomeDS
|
||||
LDFLAGS += -L$(GUI_ROOT_DIR)/lib/salome -L$(KERNEL_ROOT_DIR)/lib/salome -lsuit -lSalomeApp
|
||||
|
||||
# additional file to be cleaned
|
||||
MOSTLYCLEAN =
|
||||
@ -68,4 +68,3 @@ CLEAN =
|
||||
DISTCLEAN =
|
||||
|
||||
@CONCLUDE@
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user