Model Railroad System  2.2.2
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
lcc::EventID Class Reference

An event id structure. More...

Public Member Functions

 EventID (name,...)
 Constuctor: create the event id. More...
 

Static Public Member Functions

static validate (object)
 Validation method. More...
 

Private Member Functions

 _setEventID (option, value)
 Set (as in configure) the event ID. More...
 
 _getEventID (option)
 Get (as in cget) the event id. More...
 

Private Attributes

 _eventID
 Internal representation of an event id, as an 8 byte list. More...
 

Static Private Attributes

static EVENTIDFMT
 Event ID format string. More...
 

Detailed Description

An event id structure.

Parameters
...The options:
  • -eventidstring The event ID as a string.
  • -eventidlist The event ID as a list.

Constructor & Destructor Documentation

◆ EventID()

lcc::EventID::EventID ( name  ,
  ... 
)

Constuctor: create the event id.

Create an eventid structure.

Parameters
nameThe name of the structure.
...The options:
  • -eventidstring The event ID as a string.
  • -eventidlist The event ID as a list.

Member Function Documentation

◆ _getEventID()

lcc::EventID::_getEventID ( option  )
private

Get (as in cget) the event id.

The event id is returned, either as a string or a list.

Parameters
optionEither -eventidstring or -eventidlist. If it is -eventidstring, the event id list is formatted as a string. If it is -eventidlist the event id list is just returned.
Returns
The eventid as a string or a list.

◆ _setEventID()

lcc::EventID::_setEventID ( option  ,
value   
)
private

Set (as in configure) the event ID.

Converts the value argument to the internal representation of the event id,

Parameters
optionEither -eventidstring or -eventidlist. If it is -eventidstring, the string is parsed and converted to a list of 8 bytes. If it is -eventidlist the list is just stored.
valueEither an eventidstring or an eventidlist.

◆ validate()

static lcc::EventID::validate ( object  )
static

Validation method.

Validate EventID objects.

Parameters
objectThe object to type check.
Returns
The object or raise an error.

Member Data Documentation

◆ _eventID

lcc::EventID::_eventID
private

Internal representation of an event id, as an 8 byte list.

◆ EVENTIDFMT

lcc::EventID::EVENTIDFMT
staticprivate

Event ID format string.

Event format string, used for both format and scan.