OSB_LIB::E164Resource Class Reference

Inheritance diagram for OSB_LIB::E164Resource:

Inheritance graph
[legend]
Collaboration diagram for OSB_LIB::E164Resource:

Collaboration graph
[legend]
List of all members.

Detailed Description

E.164 phone numbers as network resources.

The format of the resourceNumber_ is CC-NDC-SN with:
+ CC: country code
+ NDC: national destination code (if applicable)
+ SN: subsbriber number.

Definition at line 64 of file e164resource.h.

Public Member Functions

Database operations:

Static Public Member Functions

Static Public Attributes


Constructor & Destructor Documentation

OSB_LIB::E164Resource::E164Resource ( const Oid oid = Oid()  )  [explicit]

Constructor with optional object id.

OSB_LIB::E164Resource::E164Resource ( const Number rn,
const Id< Network > &  nw 
)

Constructor with resource number and network.

Parameters:
rn The resource number, see class description for format.
nw The network of the E.164 resource.
Exceptions:
OsbException if rn is not valid, see numberValid.
OsbException if rn is empty or too long.

OSB_LIB::E164Resource::E164Resource ( const Number rn,
const Id2< NetworkElement > &  ne 
)

Constructor with resource number and network element.

Parameters:
rn The resource number, see class description for format.
ne The network element of the E.164 resource.
Exceptions:
OsbException if rn is not valid, see numberValid.
OsbException if rn is empty or too long.


Member Function Documentation

bool OSB_LIB::E164Resource::insert ( const OSB_DB::Session session  )  [virtual]

Insert the resource into the database.

Parameters:
session Database session to use.
Returns:
true in case of success, else false.

Implements OSB_LIB::Resource.

bool OSB_LIB::E164Resource::numberValid (  )  const

Validate the resource number.

Returns:
true if number contains only decimal digits, else false.
Wraps to numberValid(const std::string&).

static bool OSB_LIB::E164Resource::numberValid ( const std::string &  number  )  [static]

Validate the number of a E.164 resource.

Parameters:
number Number to validate.
Returns:
true if number contains only decimal digits, else false.

std::string OSB_LIB::E164Resource::phoneNumber (  )  const

Usual format of a E.164 phone number.

Returns the resource number in the commonly used format NAC-NDC-SN with:
+ NAC: national access code
+ NDC: national destination code (if applicable)
+ SN: subsbriber number
or
resourceNumber_ if NAC or NDC is not available, which is the case if the network and element are not set or their address information is not available.

bool OSB_LIB::E164Resource::read ( const OSB_DB::Session session  )  [virtual]

Read the resource from the database.

Parameters:
session Database session to use.
Returns:
true in case of success, else false.

Implements OSB_LIB::Resource.

bool OSB_LIB::E164Resource::remove ( const OSB_DB::Session session  )  [virtual]

Delete the resource from the database.

Parameters:
session Database session to use.
Returns:
true in case of success, else false.

Implements OSB_LIB::Resource.

Type OSB_LIB::E164Resource::typeId (  )  const [virtual]

The type of a E164 resource: rtE164.

Implements OSB_LIB::Resource.

void OSB_LIB::E164Resource::updData ( const OSB_DB::Session session  )  [virtual]

Update the E.164 resource in the database.

No updates that are specific for a E.164 resource exists,
the function just calls updDataBase().

Parameters:
session Database session to use.

Implements OSB_LIB::Resource.


Member Data Documentation

const Type OSB_LIB::E164Resource::type_ = rtE164 [static]

The resource type.

Definition at line 67 of file e164resource.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:11:18 2006 for OSB Library by  doxygen 1.4.7