Object PKCS#11 C++ Wrapper
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
objck::Stateful Class Reference

Initializable abstract class
More...

#include <Stateful.h>

Inheritance diagram for objck::Stateful:
objck::Session

Public Member Functions

 Stateful (Stateful::state st=Stateful::DISABLED)
 
virtual ~Stateful () throw ()
 
Stateful::state getState ()
 
bool isEnabled ()
 
bool isDisabled ()
 

Protected Types

enum  state { DISABLED = 0, ENABLED = 1 }
 

Protected Member Functions

void disable ()
 
void enable ()
 

Protected Attributes

Stateful::state _currentState
 

Detailed Description

Initializable abstract class

This is a utility classe for initialization control. It is also possible to use this class for pre-conditioning function implementations when developing applications (DbC).

See also
http://sunday-lab.blogspot.com.br/2006/04/pre-condition-and-post-condition-in-c.html
Author
Lucas Pandolfo Perin

Member Enumeration Documentation

enum objck::Stateful::state
protected

Simple state enumerator, ENABLED or DISABLED!

Enumerator
DISABLED 
ENABLED 

Constructor & Destructor Documentation

objck::Stateful::Stateful ( Stateful::state  st = Stateful::DISABLED)
inline

Default Constructor, initializes as DEAD.

virtual objck::Stateful::~Stateful ( )
throw (
)
inlinevirtual

Default destructor

Member Function Documentation

void objck::Stateful::disable ( )
inlineprotected

Sets _currentState to DISABLED

void objck::Stateful::enable ( )
inlineprotected

Sets _currentSate to ALIVE

Stateful::state objck::Stateful::getState ( )
inline

Returns the current state of the class.

Returns
_currentState
bool objck::Stateful::isDisabled ( )
inline

Returns true is instance is DEAD.

Returns
true if is DEAD
bool objck::Stateful::isEnabled ( )
inline

Returns true is instance is ALIVE.

Returns
true if is ALIVE

Member Data Documentation

Stateful::state objck::Stateful::_currentState
protected

The documentation for this class was generated from the following file: