27 #ifndef SMESHGUI_UTILS_H
28 #define SMESHGUI_UTILS_H
34 #include <omniORB4/CORBA.h>
37 #include <SALOMEDSClient_definitions.hxx>
38 #include <SALOME_GenericObj_wrap.hxx>
41 #include <SALOME_InteractiveObject.hxx>
42 #include <LightApp_DataOwner.h>
47 #include <SALOMEconfig.h>
48 #include CORBA_CLIENT_HEADER(SMESH_Mesh)
50 class SUIT_ViewWindow;
53 class SUIT_ResourceMgr;
57 class SALOMEDSClient_Study;
58 class SALOMEDSClient_SObject;
60 class SalomeApp_Study;
62 class LightApp_SelectionMgr;
73 LightApp_SelectionMgr*
91 template<class TInterface> typename TInterface::_var_type
95 if(!CORBA::is_nil(anObj))
96 return TInterface::_narrow(anObj);
97 return TInterface::_nil();
107 _PTR(Study) GetActiveStudyDocument();
127 template<class TInterface> typename TInterface::_var_type
131 if(!CORBA::is_nil(anObj))
132 return TInterface::_narrow(anObj);
133 return TInterface::_nil();
137 _PTR(
SObject) ObjectToSObject( CORBA::Object_ptr );
142 template<class TInterface> typename TInterface::_var_type
146 if(!CORBA::is_nil(anObj))
147 return TInterface::_narrow(anObj);
148 return TInterface::_nil();
154 template<
class TInterface>
typename TInterface::_var_type
158 if ( !CORBA::is_nil( anObj ) )
159 return TInterface::_narrow( anObj );
160 return TInterface::_nil();
198 toStrT(
char* s ): _STRING( s ), myStr(s)
200 operator const char*()
const
201 {
return myStr.in(); }
211 QString
fromUtf8(
const char* txt );
212 QString
fromUtf8(
const std::string& txt );
215 toUtf8(
const QString& txt );
216 operator const char*()
const {
return c_str(); }
220 #endif // SMESHGUI_UTILS_H