#include <Selector.h>
Inheritance diagram for NTuple::Selector:
Public Types | |
FUNCTION = 1<<1 | |
STRING = 1<<2 | |
FULL = 1<<3 | |
OTHER = 1<<4 | |
enum | SelectType { FUNCTION = 1<<1, STRING = 1<<2, FULL = 1<<3, OTHER = 1<<4 } |
Statement type definition. More... | |
SUCCESS = 1 | |
Normal successful completion. | |
NO_INTERFACE | |
Requested interface is not available. | |
VERSMISMATCH | |
Requested interface version is incompatible. | |
LAST_ERROR | |
Last error. | |
enum | Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR } |
Return status. More... | |
Public Member Functions | |
Selector (IInterface *svc) | |
Standard constructor. | |
virtual | ~Selector () |
Standard Destructor. | |
bool | firstCall () const |
Check for first call. | |
StatusCode | initResult () const |
Access initialization status. | |
virtual bool | operator() (void *nt) |
Default callback from interface. | |
virtual bool | operator() (NTuple::Tuple *nt) |
Specialized callback for NTuples. | |
virtual StatusCode | initialize (NTuple::Tuple *nt) |
Selector Initialisation. | |
virtual unsigned long | addRef () |
Increase reference count. | |
virtual unsigned long | release () |
Decrease reference count (and eventually delete). | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
Query interface. | |
long | type () const |
Access the type of the object. | |
const std::string & | criteria () const |
Access the selection string. | |
void | setCriteria (const std::string &crit) |
Set the type. | |
void | setActive (bool flag=true) |
Change activity flag. | |
bool | isActive () const |
Check if selection is active. | |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
Retrieve interface ID. | |
Protected Attributes | |
IInterface * | m_parent |
reference to parent interface | |
bool | m_firstCall |
Boolean to indicate need for initialisation. | |
StatusCode | m_status |
StatusCode indication initialization result. | |
std::string | m_select |
Select string. | |
long | m_refCount |
Reference counter. | |
bool | m_isActive |
Activation flag. | |
long | m_type |
Type identifier. |
Definition at line 29 of file Selector.h.
enum ISelectStatement::SelectType [inherited] |
enum IInterface::Status [inherited] |
Return status.
SUCCESS | Normal successful completion. |
NO_INTERFACE | Requested interface is not available. |
VERSMISMATCH | Requested interface version is incompatible. |
LAST_ERROR | Last error. |
Reimplemented in IConversionSvc, IConverter, and IDataProviderSvc.
Definition at line 113 of file IInterface.h.
00113 { 00115 SUCCESS = 1, 00117 NO_INTERFACE, 00119 VERSMISMATCH, 00121 LAST_ERROR 00122 };
NTuple::Selector::Selector | ( | IInterface * | svc | ) | [inline] |
Standard constructor.
Definition at line 39 of file Selector.h.
00039 : m_parent(svc), m_firstCall(true) 00040 { 00041 }
virtual NTuple::Selector::~Selector | ( | ) | [inline, virtual] |
bool NTuple::Selector::firstCall | ( | ) | const [inline] |
Check for first call.
Definition at line 46 of file Selector.h.
00046 { 00047 return m_firstCall; 00048 }
StatusCode NTuple::Selector::initResult | ( | ) | const [inline] |
Access initialization status.
Definition at line 50 of file Selector.h.
00050 { 00051 return m_status; 00052 }
virtual bool NTuple::Selector::operator() | ( | void * | nt | ) | [virtual] |
virtual bool NTuple::Selector::operator() | ( | NTuple::Tuple * | nt | ) | [virtual] |
Specialized callback for NTuples.
virtual StatusCode NTuple::Selector::initialize | ( | NTuple::Tuple * | nt | ) | [virtual] |
Selector Initialisation.
virtual unsigned long SelectStatement::addRef | ( | ) | [inline, virtual, inherited] |
Increase reference count.
Implements IInterface.
Definition at line 67 of file SelectStatement.h.
00067 { 00068 return ++m_refCount; 00069 }
virtual unsigned long SelectStatement::release | ( | ) | [inline, virtual, inherited] |
Decrease reference count (and eventually delete).
Implements IInterface.
Definition at line 71 of file SelectStatement.h.
00071 { 00072 long cnt = --m_refCount; 00073 if ( cnt <= 0 ) { 00074 delete this; 00075 } 00076 return cnt; 00077 }
virtual StatusCode SelectStatement::queryInterface | ( | const InterfaceID & | riid, | |
void ** | ppvInterface | |||
) | [inline, virtual, inherited] |
Query interface.
Implements IInterface.
Definition at line 79 of file SelectStatement.h.
00079 { 00080 if ( riid == IID_IInterface ) { 00081 *ppvInterface = (IInterface*)this; 00082 } 00083 if ( riid == IID_ISelectStatement ) { 00084 *ppvInterface = (ISelectStatement*)this; 00085 } 00086 else { 00087 *ppvInterface = 0; 00088 return NO_INTERFACE; 00089 } 00090 addRef(); 00091 return StatusCode::SUCCESS; 00092 }
long SelectStatement::type | ( | ) | const [inline, virtual, inherited] |
Access the type of the object.
Implements ISelectStatement.
Definition at line 94 of file SelectStatement.h.
00094 { 00095 return m_type; 00096 }
const std::string& SelectStatement::criteria | ( | ) | const [inline, virtual, inherited] |
Access the selection string.
Implements ISelectStatement.
Definition at line 98 of file SelectStatement.h.
00098 { 00099 return m_select; 00100 }
void SelectStatement::setCriteria | ( | const std::string & | crit | ) | [inline, virtual, inherited] |
Set the type.
Implements ISelectStatement.
Definition at line 102 of file SelectStatement.h.
00102 { 00103 m_select = crit; 00104 (m_select.length() > 0) ? m_type |= STRING : m_type &= ~STRING; 00105 }
void SelectStatement::setActive | ( | bool | flag = true |
) | [inline, virtual, inherited] |
Change activity flag.
Implements ISelectStatement.
Definition at line 107 of file SelectStatement.h.
00107 { 00108 m_isActive = flag; 00109 }
bool SelectStatement::isActive | ( | ) | const [inline, virtual, inherited] |
Check if selection is active.
Implements ISelectStatement.
Definition at line 111 of file SelectStatement.h.
00111 { 00112 return m_isActive; 00113 }
static const InterfaceID& ISelectStatement::interfaceID | ( | ) | [inline, static, inherited] |
Retrieve interface ID.
Reimplemented from IInterface.
Definition at line 44 of file ISelectStatement.h.
00044 { return IID_ISelectStatement; }
IInterface* NTuple::Selector::m_parent [protected] |
bool NTuple::Selector::m_firstCall [protected] |
StatusCode NTuple::Selector::m_status [protected] |
std::string SelectStatement::m_select [protected, inherited] |
long SelectStatement::m_refCount [protected, inherited] |
bool SelectStatement::m_isActive [protected, inherited] |
long SelectStatement::m_type [protected, inherited] |