![]() |
|
|
Generated: 18 Jul 2008 |


Definition at line 16 of file PartitionSwitchTool.cpp.
Public Member Functions | |
| PartitionSwitchTool (CSTR typ, CSTR nam, const IInterface *parent) | |
| Standard constructor. | |
| virtual | ~PartitionSwitchTool () |
| Standard destructor. | |
| virtual STATUS | queryInterface (const InterfaceID &riid, void **ppvUnknown) |
| IInterface overload: Query implemented interface(s). | |
| virtual STATUS | initialize () |
| Initialize. | |
| virtual STATUS | finalize () |
| Finalize. | |
| void | _check (STATUS sc, CSTR msg) const |
| virtual STATUS | create (CSTR nam, CSTR typ) |
| Create a partition object. The name identifies the partition uniquely. | |
| virtual STATUS | create (CSTR nam, CSTR typ, IInterface *&pPartition) |
| Create a partition object. The name identifies the partition uniquely. | |
| virtual STATUS | drop (CSTR nam) |
| Drop a partition object. The name identifies the partition uniquely. | |
| virtual STATUS | drop (IInterface *pPartition) |
| Drop a partition object. The name identifies the partition uniquely. | |
| virtual STATUS | activate (CSTR nam) |
| Activate a partition object. The name identifies the partition uniquely. | |
| virtual STATUS | activate (IInterface *pPartition) |
| Activate a partition object. | |
| virtual STATUS | get (CSTR nam, IInterface *&pPartition) const |
| Access a partition object. The name identifies the partition uniquely. | |
| virtual STATUS | activePartition (std::string &nam, IInterface *&pPartition) const |
| Access the active partition object. | |
Private Types | |
| typedef const std::string & | CSTR |
| typedef StatusCode | STATUS |
Private Attributes | |
| std::string | m_actorName |
| Job option to set the multi-service name. | |
| SmartIF< IPartitionControl > | m_actor |
| reference to Partition Controller | |
typedef const std::string& PartitionSwitchTool::CSTR [private] |
Definition at line 20 of file PartitionSwitchTool.cpp.
typedef StatusCode PartitionSwitchTool::STATUS [private] |
Definition at line 21 of file PartitionSwitchTool.cpp.
| PartitionSwitchTool::PartitionSwitchTool | ( | CSTR | typ, | |
| CSTR | nam, | |||
| const IInterface * | parent | |||
| ) | [inline] |
Standard constructor.
Definition at line 33 of file PartitionSwitchTool.cpp.
References AlgTool::declareProperty(), and m_actorName.
00034 : AlgTool(typ, nam , parent) 00035 { 00036 // Declaring implemented interfaces 00037 declareInterface<IPartitionControl>(this); 00038 declareProperty("Actor", m_actorName = "EventDataService"); 00039 }
| virtual PartitionSwitchTool::~PartitionSwitchTool | ( | ) | [inline, virtual] |
Standard destructor.
Definition at line 41 of file PartitionSwitchTool.cpp.
References m_actor.
00041 { 00042 m_actor = 0; 00043 }
| virtual STATUS PartitionSwitchTool::queryInterface | ( | const InterfaceID & | riid, | |
| void ** | ppvUnknown | |||
| ) | [inline, virtual] |
IInterface overload: Query implemented interface(s).
Reimplemented from AlgTool.
Definition at line 46 of file PartitionSwitchTool.cpp.
References AlgTool::addRef(), IPartitionControl::interfaceID(), AlgTool::queryInterface(), and IInterface::SUCCESS.
00046 { 00047 if ( IPartitionControl::interfaceID().versionMatch(riid) ) 00048 *ppvUnknown = (IPartitionControl*)this; 00049 else 00050 return AlgTool::queryInterface(riid, ppvUnknown); 00051 addRef(); 00052 return SUCCESS; 00053 }
| virtual STATUS PartitionSwitchTool::initialize | ( | ) | [inline, virtual] |
Initialize.
Access partitioned multi-service
Reimplemented from AlgTool.
Definition at line 56 of file PartitionSwitchTool.cpp.
References endmsg(), MSG::ERROR, AlgTool::initialize(), StatusCode::isSuccess(), m_actor, m_actorName, AlgTool::msgSvc(), AlgTool::name(), SmartIFBase< TYPE >::pRef(), and AlgTool::service().
00056 { 00058 STATUS sc = AlgTool::initialize(); 00059 MsgStream log(msgSvc(), name()); 00060 if ( !sc.isSuccess() ) { 00061 log << MSG::ERROR << "Cannot initialize base class!" << endmsg; 00062 return sc; 00063 } 00064 m_actor = 0; 00065 sc = service(m_actorName, m_actor.pRef()); 00066 if ( !sc.isSuccess() ) { 00067 log << MSG::ERROR << "Cannot retrieve partition controller \"" 00068 << m_actorName << "\"!" << endmsg; 00069 return sc; 00070 } 00071 return sc; 00072 }
| virtual STATUS PartitionSwitchTool::finalize | ( | void | ) | [inline, virtual] |
Finalize.
Reimplemented from AlgTool.
Definition at line 74 of file PartitionSwitchTool.cpp.
References AlgTool::finalize(), and m_actor.
00074 { 00075 m_actor = 0; 00076 return AlgTool::finalize(); 00077 }
Definition at line 79 of file PartitionSwitchTool.cpp.
References endmsg(), MSG::ERROR, StatusCode::getCode(), AlgTool::msgSvc(), and AlgTool::name().
00079 { 00080 MsgStream log(msgSvc(), name()); 00081 log << MSG::ERROR << msg << " Status=" << sc.getCode() << endmsg; 00082 }
Create a partition object. The name identifies the partition uniquely.
Definition at line 86 of file PartitionSwitchTool.cpp.
References CHECK, m_actor, and IInterface::NO_INTERFACE.
00086 { 00087 STATUS sc = m_actor ? m_actor->create(nam,typ) : NO_INTERFACE; 00088 CHECK(sc, "Cannot create partition: "+nam+" of type "+typ); 00089 }
| virtual STATUS PartitionSwitchTool::create | ( | CSTR | nam, | |
| CSTR | typ, | |||
| IInterface *& | pPartition | |||
| ) | [inline, virtual] |
Create a partition object. The name identifies the partition uniquely.
Definition at line 91 of file PartitionSwitchTool.cpp.
References CHECK, m_actor, and IInterface::NO_INTERFACE.
00091 { 00092 STATUS sc = m_actor ? m_actor->create(nam,typ,pPartition) : NO_INTERFACE; 00093 CHECK(sc, "Cannot create partition: "+nam+" of type "+typ); 00094 }
Drop a partition object. The name identifies the partition uniquely.
Definition at line 96 of file PartitionSwitchTool.cpp.
References CHECK, m_actor, and IInterface::NO_INTERFACE.
00096 { 00097 STATUS sc = m_actor ? m_actor->drop(nam) : NO_INTERFACE; 00098 CHECK(sc, "Cannot drop partition: "+nam); 00099 }
| virtual STATUS PartitionSwitchTool::drop | ( | IInterface * | pPartition | ) | [inline, virtual] |
Drop a partition object. The name identifies the partition uniquely.
Implements IPartitionControl.
Definition at line 101 of file PartitionSwitchTool.cpp.
References CHECK, m_actor, and IInterface::NO_INTERFACE.
00101 { 00102 STATUS sc = m_actor ? m_actor->drop(pPartition) : NO_INTERFACE; 00103 CHECK(sc, "Cannot drop partition by Interface."); 00104 }
Activate a partition object. The name identifies the partition uniquely.
Definition at line 106 of file PartitionSwitchTool.cpp.
References CHECK, m_actor, and IInterface::NO_INTERFACE.
00106 { 00107 STATUS sc = m_actor ? m_actor->activate(nam) : NO_INTERFACE; 00108 CHECK(sc, "Cannot activate partition: "+nam); 00109 }
| virtual STATUS PartitionSwitchTool::activate | ( | IInterface * | pPartition | ) | [inline, virtual] |
Activate a partition object.
Implements IPartitionControl.
Definition at line 111 of file PartitionSwitchTool.cpp.
References CHECK, m_actor, and IInterface::NO_INTERFACE.
00111 { 00112 STATUS sc = m_actor ? m_actor->activate(pPartition) : NO_INTERFACE; 00113 CHECK(sc, "Cannot activate partition by Interface."); 00114 }
| virtual STATUS PartitionSwitchTool::get | ( | CSTR | nam, | |
| IInterface *& | pPartition | |||
| ) | const [inline, virtual] |
Access a partition object. The name identifies the partition uniquely.
Definition at line 116 of file PartitionSwitchTool.cpp.
References CHECK, SmartIFBase< TYPE >::get(), m_actor, and IInterface::NO_INTERFACE.
00116 { 00117 STATUS sc = m_actor ? m_actor->get(nam, pPartition) : NO_INTERFACE; 00118 CHECK(sc, "Cannot get partition "+nam); 00119 }
| virtual STATUS PartitionSwitchTool::activePartition | ( | std::string & | nam, | |
| IInterface *& | pPartition | |||
| ) | const [inline, virtual] |
Access the active partition object.
Implements IPartitionControl.
Definition at line 121 of file PartitionSwitchTool.cpp.
References CHECK, m_actor, and IInterface::NO_INTERFACE.
00121 { 00122 STATUS sc = m_actor ? m_actor->activePartition(nam, pPartition) : NO_INTERFACE; 00123 CHECK(sc, "Cannot determine active partition."); 00124 }
std::string PartitionSwitchTool::m_actorName [private] |
Job option to set the multi-service name.
Definition at line 26 of file PartitionSwitchTool.cpp.
Referenced by initialize(), and PartitionSwitchTool().
SmartIF<IPartitionControl> PartitionSwitchTool::m_actor [private] |
reference to Partition Controller
Definition at line 28 of file PartitionSwitchTool.cpp.
Referenced by activate(), activePartition(), create(), drop(), finalize(), get(), initialize(), and ~PartitionSwitchTool().