41 error() <<
"Cannot initialize base class!" <<
endmsg;
46 sc =
service(m_actorName, tmpPtr);
49 error() <<
"Cannot retrieve partition controller \""
50 << m_actorName <<
"\"!" <<
endmsg;
64 #define CHECK(x,y) if ( !x.isSuccess() ) _check(x, y); return x;
69 CHECK(sc,
"Cannot create partition: "+nam+
" of type "+typ);
73 STATUS sc = m_actor ? m_actor->
create(nam,typ,pPartition) : NO_INTERFACE;
74 CHECK(sc,
"Cannot create partition: "+nam+
" of type "+typ);
79 CHECK(sc,
"Cannot drop partition: "+nam);
83 STATUS sc = m_actor ? m_actor->
drop(pPartition) : NO_INTERFACE;
84 CHECK(sc,
"Cannot drop partition by Interface.");
89 CHECK(sc,
"Cannot activate partition: "+nam);
94 CHECK(sc,
"Cannot activate partition by Interface.");
98 STATUS sc = m_actor ? m_actor->
get(nam, pPartition) : NO_INTERFACE;
99 CHECK(sc,
"Cannot get partition "+nam);
104 CHECK(sc,
"Cannot determine active partition.");
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
virtual StatusCode activePartition(std::string &name, IInterface *&pPartition) const =0
Access the active partition object.
unsigned long getCode() const
Get the status code by value.
bool isSuccess() const
Test for a status code of SUCCESS.
virtual StatusCode create(const std::string &name, const std::string &type)=0
Create a partition object. The name identifies the partition uniquely.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
virtual StatusCode get(const std::string &name, IInterface *&pPartition) const =0
Access a partition object. The name identifies the partition uniquely.
Create / access partitions.
Base class used to extend a class implementing other interfaces.
virtual StatusCode drop(const std::string &name)=0
Drop a partition object. The name identifies the partition uniquely.
virtual StatusCode activate(const std::string &name)=0
Activate a partition object. The name identifies the partition uniquely.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.