Version: 9.15.0
SALOME::RefAndServant< TVar, TServ > Class Template Reference

Class in charge to manage life cycle of servant instance and its associated reference. More...

#include <SALOME_LogManager.hxx>

Public Member Functions

 RefAndServant (TVar var, TServ *serv)
 
 RefAndServant (const RefAndServant &other)
 
 ~RefAndServant ()=default
 
RefAndServantoperator= (const RefAndServant &other)
 
TVar getVar () const
 
TServ * getServ () const
 
void desactivateObjectFromPOA ()
 

Private Attributes

TVar _var
 
SALOME::AutoServantDeleter _serv
 

Detailed Description

template<class TVar, class TServ>
class SALOME::RefAndServant< TVar, TServ >

Class in charge to manage life cycle of servant instance and its associated reference.

It allows to deal cleanly with management of servant life even in case of ORB_destoy call at exit.

As orb_destroy automaticaly desactivates all objects activated by all POAs in this it's impossible to deal cleanly maangement of servant lifecyle using only _ptr or _var.

Constructor & Destructor Documentation

◆ RefAndServant() [1/2]

template<class TVar , class TServ >
SALOME::RefAndServant< TVar, TServ >::RefAndServant ( TVar  var,
TServ *  serv 
)

◆ RefAndServant() [2/2]

template<class TVar , class TServ >
SALOME::RefAndServant< TVar, TServ >::RefAndServant ( const RefAndServant< TVar, TServ > &  other)

◆ ~RefAndServant()

template<class TVar , class TServ >
SALOME::RefAndServant< TVar, TServ >::~RefAndServant ( )
default

Member Function Documentation

◆ desactivateObjectFromPOA()

template<class TVar , class TServ >
void SALOME::RefAndServant< TVar, TServ >::desactivateObjectFromPOA ( )

◆ getServ()

◆ getVar()

template<class TVar , class TServ >
TVar SALOME::RefAndServant< TVar, TServ >::getVar ( ) const

◆ operator=()

template<class TVar , class TServ >
RefAndServant& SALOME::RefAndServant< TVar, TServ >::operator= ( const RefAndServant< TVar, TServ > &  other)

Field Documentation

◆ _serv

◆ _var