IGLib 1.4
The IGLib base library for development of numerical, technical and business applications.
|
Example implementation of IIdentifiable interface. More...
Public Member Functions | |
ExampleIRegistrable (string str) | |
void | Register () |
Registers the current object. Subsequent calls (after the first one) have no effect. | |
bool | IsRegistered () |
Returns true if the current object is registered, false if not. | |
void | Unregister () |
Unregisters the current object if it is currently registered. Can be performed several times, in this case only the first call may have effect. | |
override string | ToString () |
Protected Attributes | |
string | _msg |
Properties | |
virtual int | Id [get] |
Returns unique Id (in the scope of a given type) of the current object. Method is defined as virtual so that derived class can have its own IDs by defining its own static IdentifiableGenerator object. | |
ObjectRegister < ExampleIRegistrable > | ObjectRegister [get] |
Gets object register where the current object is registered. | |
Private Attributes | |
IdProxy | _idPproxy |
Proxy object that implements the IIdentifiable interface for this object. | |
Static Private Attributes | |
static ObjectRegister < ExampleIRegistrable > | _register |
Static object that providees object register and generates IDs for this class: |
Example implementation of IIdentifiable interface.
IG::Lib::RegisterableExamples::ExampleIRegistrable::ExampleIRegistrable | ( | string | str | ) | [inline] |
void IG::Lib::RegisterableExamples::ExampleIRegistrable::Register | ( | ) | [inline] |
Registers the current object. Subsequent calls (after the first one) have no effect.
Implements IG::Lib::IRegisterable< T >.
bool IG::Lib::RegisterableExamples::ExampleIRegistrable::IsRegistered | ( | ) | [inline] |
Returns true if the current object is registered, false if not.
Implements IG::Lib::IRegisterable< T >.
void IG::Lib::RegisterableExamples::ExampleIRegistrable::Unregister | ( | ) | [inline] |
Unregisters the current object if it is currently registered. Can be performed several times, in this case only the first call may have effect.
Implements IG::Lib::IRegisterable< T >.
override string IG::Lib::RegisterableExamples::ExampleIRegistrable::ToString | ( | ) | [inline] |
string IG::Lib::RegisterableExamples::ExampleIRegistrable::_msg [protected] |
ObjectRegister<ExampleIRegistrable> IG::Lib::RegisterableExamples::ExampleIRegistrable::_register [static, private] |
new ObjectRegister<ExampleIRegistrable>(1 )
Static object that providees object register and generates IDs for this class:
new IdProxy(_register)
Proxy object that implements the IIdentifiable interface for this object.
virtual int IG::Lib::RegisterableExamples::ExampleIRegistrable::Id [get] |
Returns unique Id (in the scope of a given type) of the current object. Method is defined as virtual so that derived class can have its own IDs by defining its own static IdentifiableGenerator object.
Implements IG::Lib::IIdentifiable.
ObjectRegister<ExampleIRegistrable> IG::Lib::RegisterableExamples::ExampleIRegistrable::ObjectRegister [get] |
Gets object register where the current object is registered.
Implements IG::Lib::IRegisterable< T >.