24 using extends::extends;
34 error() <<
"Cannot initialize base class!" <<
endmsg;
55 #define CHECK( x, y ) \ 56 if ( !x.isSuccess() ) _check( x, y ); \ 62 STATUS sc = m_actor ? m_actor->
create( nam, typ ) : NO_INTERFACE;
63 CHECK( sc,
"Cannot create partition: " + nam +
" of type " + typ );
68 STATUS sc = m_actor ? m_actor->
create( nam, typ, pPartition ) : NO_INTERFACE;
69 CHECK( sc,
"Cannot create partition: " + nam +
" of type " + typ );
74 STATUS sc = m_actor ? m_actor->
drop( nam ) : NO_INTERFACE;
75 CHECK( sc,
"Cannot drop partition: " + nam );
80 STATUS sc = m_actor ? m_actor->
drop( pPartition ) : NO_INTERFACE;
81 CHECK( sc,
"Cannot drop partition by Interface." );
87 CHECK( sc,
"Cannot activate partition: " + nam );
92 STATUS sc = m_actor ? m_actor->
activate( pPartition ) : NO_INTERFACE;
93 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 );
105 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.