
Every "actual network service" (e.g. T11, S21) is represented by an instance of class ServiceElement.
Definition at line 65 of file service.h.
| typedef Id<ServiceElement> OSB_LIB::ServiceElement::Oid |
| typedef unsigned char OSB_LIB::ServiceElement::ServiceCode |
Available service types.
| OSB_LIB::ServiceElement::ServiceElement | ( | ) |
| OSB_LIB::ServiceElement::ServiceElement | ( | const Oid & | oid, | |
| ServiceType | type, | |||
| ServiceCode | code, | |||
| const Oid | pid | |||
| ) |
Constructor of the service element class.
This constructor will create an instance of ServiceElement that represent an 'actual network service'.
| oid | Unique id and database links of this object. | |
| type | Type of the service. | |
| code | Numbering that shows the exact service. | |
| pid | Parent id of this object. |
| OSB_LIB::ServiceElement::ServiceElement | ( | ServiceType | type, | |
| ServiceCode | code | |||
| ) |
Constructor with object id.
| type | The service type. | |
| code | The service code. |
| bool OSB_LIB::ServiceElement::insert | ( | const OSB_DB::Session & | session | ) |
Insert a service element into database.
A new object is inserted. All attribute of the object has been set except object id. The object id will only be set by the function if the insertion is successful.
| const Oid& OSB_LIB::ServiceElement::oid | ( | ) | const |
Retrieve the object's id_.
| bool OSB_LIB::ServiceElement::operator< | ( | const ServiceElement & | rhs | ) | const |
Less than operator for service elements.
Compares 1st by service type and 2nd by service code.
| bool OSB_LIB::ServiceElement::operator== | ( | const ServiceElement & | se | ) | const |
Compare two ServiceElement whether they have the same serviceType_ and serviceCode_.
| se | ServiceElement to compare to. |
| const Oid& OSB_LIB::ServiceElement::pId | ( | ) | const |
Retrieve the object's parent's id_.
| bool OSB_LIB::ServiceElement::read | ( | const OSB_DB::Session & | session | ) |
Read a service element from database.
The object id is used to gather other info from database and then populate the object's attributes.
| bool OSB_LIB::ServiceElement::remove | ( | const OSB_DB::Session & | session | ) |
Remove a service element from database.
After the function call, oid of this object will be unset to indicate that there is no such entry anymore in the database.
| const ServiceCode& OSB_LIB::ServiceElement::serviceCode | ( | ) | const |
Retrieve the object's serviceCode_.
| const ServiceType& OSB_LIB::ServiceElement::serviceType | ( | ) | const |
Retrieve the object's serviceType_.
| const std::string OSB_LIB::ServiceElement::shortCode | ( | ) | const |
3 letter service identifier.
| static char OSB_LIB::ServiceElement::toChar | ( | const ServiceType | st | ) | [static] |
Convert service type to one character database code.
| st | The service type value to convert. |
| Osb | exception if `st' is invalid. |
| static std::string OSB_LIB::ServiceElement::toHex | ( | ServiceCode | c | ) | [static] |
Show service code as 2 Hex numbers.
Convert the service code, which store internally as type char to 2 HEX numbers represented in a string.
| c | Service code to convert. |
| static ServiceType OSB_LIB::ServiceElement::toServiceType | ( | char | c | ) | [static] |
Convert one character database code to a ServiceType.
| c | Character to convert. |
| bool OSB_LIB::ServiceElement::update | ( | const OSB_DB::Session & | session | ) |
Update a service element in the database.
Old entry in the database identify by the object id will be replaced with the new data from this object.
friend struct OSB_DB::ServiceElementGw [friend] |
Oid OSB_LIB::ServiceElement::id_ [private] |
Oid OSB_LIB::ServiceElement::pId_ [private] |
1.4.7