24 using extends::extends;
32 error() <<
"Cannot initialize base class!" <<
endmsg;
53 #define CHECK( x, y ) \ 54 if ( !x.isSuccess() ) _check( x, y ); \ 60 STATUS sc = m_actor ? m_actor->
create( nam, typ ) : NO_INTERFACE;
61 CHECK( sc,
"Cannot create partition: " + nam +
" of type " + typ );
66 STATUS sc = m_actor ? m_actor->
create( nam, typ, pPartition ) : NO_INTERFACE;
67 CHECK( sc,
"Cannot create partition: " + nam +
" of type " + typ );
72 STATUS sc = m_actor ? m_actor->
drop( nam ) : NO_INTERFACE;
73 CHECK( sc,
"Cannot drop partition: " + nam );
78 STATUS sc = m_actor ? m_actor->
drop( pPartition ) : NO_INTERFACE;
79 CHECK( sc,
"Cannot drop partition by Interface." );
85 CHECK( sc,
"Cannot activate partition: " + nam );
90 STATUS sc = m_actor ? m_actor->
activate( pPartition ) : NO_INTERFACE;
91 CHECK( sc,
"Cannot activate partition by Interface." );
96 STATUS sc = m_actor ? m_actor->
get( nam, pPartition ) : NO_INTERFACE;
97 CHECK( sc,
"Cannot get partition " + nam );
103 CHECK( sc,
"Cannot determine active partition." );
MsgStream & msg() const
shortcut for the method msgStream(MSG::INFO)
Implementation of property with value of concrete type.
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.
virtual StatusCode get(const std::string &name, IInterface *&pPartition) const =0
Access a partition object. The name identifies the partition uniquely.
Definition of the basic interface.
virtual StatusCode activePartition(std::string &name, IInterface *&pPartition) const =0
Access the active partition object.
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.