Version: 8.3.0
YACS::ENGINE::SalomeContainerMonoHelper Class Reference

#include <SalomeContainerHelper.hxx>

Inheritance diagram for YACS::ENGINE::SalomeContainerMonoHelper:
Collaboration diagram for YACS::ENGINE::SalomeContainerMonoHelper:

Public Member Functions

 SalomeContainerMonoHelper ()
 
std::string getType () const
 
std::string getDftLaunchMode () const
 
SalomeContainerMonoHelperdeepCpyOnlyStaticInfo () const
 
Engines::Container_var getContainer (const Task *askingNode) const
 
bool isAlreadyStarted (const Task *askingNode) const
 
void setContainer (const Task *askingNode, Engines::Container_var cont)
 
void shutdown ()
 

Static Public Attributes

static const char TYPE_NAME [] ="mono"
 
static const char DFT_LAUNCH_MODE [] ="start"
 

Private Member Functions

 ~SalomeContainerMonoHelper ()
 

Private Attributes

Engines::Container_var _trueCont
 

Additional Inherited Members

- Protected Member Functions inherited from YACS::ENGINE::SalomeContainerHelper
virtual ~SalomeContainerHelper ()
 
- Protected Attributes inherited from YACS::ENGINE::RefCounter
unsigned int _cnt
 

Detailed Description

Definition at line 54 of file SalomeContainerHelper.hxx.

Constructor & Destructor Documentation

SalomeContainerMonoHelper::SalomeContainerMonoHelper ( )

Definition at line 43 of file SalomeContainerHelper.cxx.

Referenced by deepCpyOnlyStaticInfo().

43  :_trueCont(Engines::Container::_nil())
44 {
45 
46 }
SalomeContainerMonoHelper::~SalomeContainerMonoHelper ( )
private

Definition at line 101 of file SalomeContainerHelper.cxx.

102 {
103 }

Member Function Documentation

SalomeContainerMonoHelper * SalomeContainerMonoHelper::deepCpyOnlyStaticInfo ( ) const
virtual

Implements YACS::ENGINE::SalomeContainerHelper.

Definition at line 58 of file SalomeContainerHelper.cxx.

References SalomeContainerMonoHelper().

59 {
60  return new SalomeContainerMonoHelper;
61 }
Engines::Container_var SalomeContainerMonoHelper::getContainer ( const Task askingNode) const
virtual

Implements YACS::ENGINE::SalomeContainerHelper.

Definition at line 63 of file SalomeContainerHelper.cxx.

References _trueCont.

64 {
65  return _trueCont;
66 }
std::string SalomeContainerMonoHelper::getDftLaunchMode ( ) const
virtual

Implements YACS::ENGINE::SalomeContainerHelper.

Definition at line 53 of file SalomeContainerHelper.cxx.

References DFT_LAUNCH_MODE.

54 {
55  return std::string(DFT_LAUNCH_MODE);
56 }
std::string SalomeContainerMonoHelper::getType ( ) const
virtual

Implements YACS::ENGINE::SalomeContainerHelper.

Definition at line 48 of file SalomeContainerHelper.cxx.

References TYPE_NAME.

49 {
50  return TYPE_NAME;
51 }
bool SalomeContainerMonoHelper::isAlreadyStarted ( const Task askingNode) const
virtual

Implements YACS::ENGINE::SalomeContainerHelper.

Definition at line 68 of file SalomeContainerHelper.cxx.

References _trueCont.

Referenced by YACS::ENGINE::SalomeHPContainer::isAlreadyStarted().

69 {
70  if(CORBA::is_nil(_trueCont))
71  return false;
72  else
73  return true;
74 }
void SalomeContainerMonoHelper::setContainer ( const Task askingNode,
Engines::Container_var  cont 
)
virtual

Implements YACS::ENGINE::SalomeContainerHelper.

Definition at line 76 of file SalomeContainerHelper.cxx.

References _trueCont, and DEBTRACE.

77 {
78  _trueCont=cont;
79 #ifdef REFCNT
80  DEBTRACE(_trueCont->_PR_getobj()->pd_refCount );
81 #endif
82 }
void SalomeContainerMonoHelper::shutdown ( )
virtual

Implements YACS::ENGINE::SalomeContainerHelper.

Definition at line 84 of file SalomeContainerHelper.cxx.

References _trueCont, and DEBTRACE.

Referenced by YACS::ENGINE::SalomeHPContainer::shutdown().

85 {
86  try
87  {
88  DEBTRACE("shutdown SALOME container: " );
89  CORBA::String_var containerName=_trueCont->name();
90  DEBTRACE(containerName);
91  _trueCont->Shutdown();
92  std::cerr << "shutdown SALOME container: " << containerName << std::endl;
93  }
94  catch(...)
95  {
96  DEBTRACE("Unknown exception ignored." );
97  }
98  _trueCont=Engines::Container::_nil();
99 }

Member Data Documentation

Engines::Container_var YACS::ENGINE::SalomeContainerMonoHelper::_trueCont
private

Definition at line 71 of file SalomeContainerHelper.hxx.

Referenced by getContainer(), isAlreadyStarted(), setContainer(), and shutdown().

const char SalomeContainerMonoHelper::DFT_LAUNCH_MODE ="start"
static

Definition at line 69 of file SalomeContainerHelper.hxx.

Referenced by getDftLaunchMode().

const char SalomeContainerMonoHelper::TYPE_NAME ="mono"
static

The documentation for this class was generated from the following files: