OSB_LIB::Ip4Address Class Reference

Inheritance diagram for OSB_LIB::Ip4Address:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

IP address resource with four parts format(x.x.x.x).

This is user created, non-prepaid, network specific, re-usable resource.

Definition at line 73 of file ipaddress.h.

Public Member Functions

Read access to data members:
Database transactions:

Private Member Functions

Private Attributes

Static Private Attributes

Friends


Constructor & Destructor Documentation

OSB_LIB::Ip4Address::Ip4Address ( const Oid id = Oid()  ) 

Constructor with optional object id.

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

Constructor with resource number and network id.

Parameters:
rn The resource number(IP address string).
nw The id of the network that owns the IP address resource.


Member Function Documentation

bool OSB_LIB::Ip4Address::canSetGroup (  )  const

Can set or unset IP group? (Always true here).

bool OSB_LIB::Ip4Address::canUpd (  )  const [virtual]

This IP4 address can be update?

Returns:
True if the IP4 address can be update,
else false.
IP4 address is an exception which can be update if it is assigned. The method always returns true.

Reimplemented from OSB_LIB::Resource.

const std::string& OSB_LIB::Ip4Address::des (  )  const

Description.

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

Insert an IP address resource into the database.

Implements OSB_LIB::Resource.

bool OSB_LIB::Ip4Address::isAvailable (  )  const [virtual]

Check if an IP4 address can be assigned to an IP group.

Returns:
true if the IP4 address can be assigned to a group else false.

Reimplemented from OSB_LIB::Resource.

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

Read an IP address resource by its id.

Implements OSB_LIB::Resource.

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

Delete an IP address resource from the database.

Implements OSB_LIB::Resource.

void OSB_LIB::Ip4Address::setDes ( const std::string &  des  ) 

Set the description.

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

Type of the IP address resource: rtIp4Address.

Implements OSB_LIB::Resource.

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

Update an IP address resource in the database.

Implements OSB_LIB::Resource.

void OSB_LIB::Ip4Address::verify (  )  const [private]

To verify whether the resource number(IP address string) is valid.

The IP address will be composed of 4 parts (part1.part2.part3.part4) separated by dots. Each part is a number with range from 0 to 255 except part1 from 1 to 255.

Returns:
true if valid, else false.


Friends And Related Function Documentation

friend class IpGroup [friend]

Allow to change the status.

Definition at line 77 of file ipaddress.h.

friend class OSB_DB::Ip4AddressGw [friend]

The gateway must be able to set the data members.

Definition at line 75 of file ipaddress.h.


Member Data Documentation

std::string OSB_LIB::Ip4Address::des_ [private]

Description of the IP4 address resource.

Definition at line 159 of file ipaddress.h.

const Type OSB_LIB::Ip4Address::typeId_ = rtIp4Address [static, private]

Identification of the resource type.

Definition at line 80 of file ipaddress.h.


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