OSB_LIB::Network Class Reference

Collaboration diagram for OSB_LIB::Network:

Collaboration graph
[legend]
List of all members.

Detailed Description

Information about a network.

Definition at line 778 of file network.h.

Public Types

Public Member Functions

Read access to data members.
Modify data members
Network element list maintenance

Private Member Functions

Database operations
Set/get address information from/to database.
The following members are used solely as interface between the database gateway OSB_DB::NetworkGw and the class.
They are not meant to be the public methods how to set and/or get address information from the class.

Private Attributes

Friends

Classes


Member Typedef Documentation

typedef Id<Network> OSB_LIB::Network::Oid

Typesave object identfier.

Definition at line 786 of file network.h.


Constructor & Destructor Documentation

OSB_LIB::Network::Network ( const Oid oid = Oid()  ) 

Default constructor with optional object id.

OSB_LIB::Network::Network ( const Oid oid,
long  objVs,
const std::string &  name,
const std::string &  des = "" 
)

Constructor with full attributes.


Member Function Documentation

bool OSB_LIB::Network::addElement ( OSB_DB::Session session,
NetworkElement element 
)

Add a network element for this network.

Add an element entry to the database. Also add it to the element list. The object id, network id and object version of this network element will be set if insertion success.
Session will be committed if successful.

Parameters:
session Database session to use.
element Network element to be added.
Returns:
True if it is successful.
Exceptions:
OsbException 
  • as specified by the gateway class (see there).

const Id<ConnectionPt>& OSB_LIB::Network::connectionPt (  )  const

Id of the assigned connection point.

bool OSB_LIB::Network::delElement ( OSB_DB::Session session,
const Id2< NetworkElement > &  neId 
)

Delete a network element for this network.

Including delete an entry from the database, also delete it from the element list. Session will be committed if successful.

Parameters:
session Database session to use.
neId Object id of network element to be deleted.
Returns:
True if it is successful.
Exceptions:
OsbException 
  • network element is not found in the list
  • as specified by the gateway class (see there).

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

Description of the network.

NetworkElement* OSB_LIB::Network::element ( const Id2< NetworkElement > &  neId  ) 

Get the writable network element based on the given oid.

Parameters:
neId Object id of network element.
Returns:
Pointer to network element if found,
else 0.

const NetworkElements& OSB_LIB::Network::elements (  )  const

List of network elements.

const NetworkElement* OSB_LIB::Network::findElement ( const Id2< NetworkElement > &  neId  )  const

Find the network element from the master list.

Parameters:
neId Object id of the network element.
Returns:
Pointer to the found network element,
NULL pointer if network element can not be found.

void OSB_LIB::Network::getAddressInfo ( const NetworkAddressInfo src  )  [private]

Copy address information from info buffer.

const NetworkElement& OSB_LIB::Network::getElement ( const Id2< NetworkElement > &  neId  )  const

Get the network element based on the given oid.

Parameters:
neId Object id of the network element.
Exceptions:
ObjectNotFound 
Returns:
Reference to the found network element.

const TrunkGroup& OSB_LIB::Network::getTrkGroup ( const Id< TrunkGroup > &  tgId  )  const

Find a trunk group by its id.

Parameters:
tgId Id of the trunk group to find.
Exceptions:
ObjectNotFound 
Returns:
Reference to the found trunk group.

bool OSB_LIB::Network::insert ( const OSB_DB::Session session  )  [private]

Insert a network.

Add a network entry to the database. The object id and object version of network will be set if the insertion is successful.

Parameters:
session Database session to use.
Returns:
True if it is successful.
Exceptions:
OsbException 
  • as specified by the gateway class (see there).

const std::string& OSB_LIB::Network::name (  )  const

Name of the network.

const NwAddrInfo& OSB_LIB::Network::nwAddrInfo (  )  const

Network address information.

long OSB_LIB::Network::objVs (  )  const

Object version of the network.

const Oid& OSB_LIB::Network::oid (  )  const

Object id.

void OSB_LIB::Network::putAddressInfo ( NetworkAddressInfo dest  )  const [private]

Copy address information to info buffer.

bool OSB_LIB::Network::read ( const OSB_DB::Session session  ) 

Read a network from the database.

The function reads and sets the data members of the class. It will also retrieve network element list.

Parameters:
session Database session to use.
Returns:
True if the network was read from the database.
Exceptions:
OsbException 
  • as specified by the gateway class (see there).

bool OSB_LIB::Network::remove ( const OSB_DB::Session session  )  [private]

Delete a network.

Delete a network entry from the database.
Object id will be unset.

Parameters:
session Database session to use.
Returns:
True if it is successful.
Exceptions:
OsbException 
  • as specified by the gateway class (see there).

void OSB_LIB::Network::setConnectionPt ( const Id< ConnectionPt > &  cpId  ) 

Set the id of the connection point.

void OSB_LIB::Network::setDes ( const std::string &  des  )  [inline]

Set description of network.

Definition at line 872 of file network.h.

References des_.

void OSB_LIB::Network::setName ( const std::string &  name  )  [inline]

Set name of network.

Definition at line 870 of file network.h.

References name_.

void OSB_LIB::Network::setNwAddrInfo ( const NwAddrInfo info  ) 

Set network address information.

void OSB_LIB::Network::setTimeZone ( const TimeZone::Oid tzId  ) 

Set the timezone information.

void OSB_LIB::Network::sortElementByName ( bool  desc = false  ) 

Sort network elements by name.

Parameters:
desc Flag to sort in descending (true) or ascending (false) order.

const TimeZone::Oid OSB_LIB::Network::tzId (  )  const

Get timezone id.

Returns:
The id of the network's timezone. It is not set if local time applies.

bool OSB_LIB::Network::update ( const OSB_DB::Session session  )  [private]

Update a network to the database.

This function will also update the data member objVs.

Parameters:
session Database session to use.
Returns:
True if the network was updated to the database.
Exceptions:
OsbException 
  • as specified by the gateway class (see there).

bool OSB_LIB::Network::updElement ( OSB_DB::Session session,
NetworkElement netElement 
)

Update a network element to the database.

Update network element to the database. Also update it to the element list. The object version will be update if success.
Session will be committed if successful.

Parameters:
session The database session.
netElement Network element to update.
Returns:
True if the element was updated to the database.
Exceptions:
OsbException 
  • network element is not found in the list
  • as specified by the gateway class (see there).


Friends And Related Function Documentation

friend class NetworkManager [friend]

Allow NetworkManager to access insert and delete.

Definition at line 782 of file network.h.

friend class OSB_DB::NetworkGw [friend]

Allow NetworkGw to access private attributes.

Definition at line 780 of file network.h.


Member Data Documentation

Id<ConnectionPt> OSB_LIB::Network::connectionPt_ [private]

Assigned connection point.

Definition at line 1074 of file network.h.

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

Description of the network: optional.

Definition at line 1072 of file network.h.

Referenced by setDes().

NetworkElements OSB_LIB::Network::elements_ [private]

List of the network elements of the network.

Definition at line 1078 of file network.h.

std::string OSB_LIB::Network::name_ [private]

Name of the network: mandatory.

Definition at line 1070 of file network.h.

Referenced by setName().

NwAddrInfo OSB_LIB::Network::nwAddrInfo_ [private]

Information about network addresses.

Definition at line 1076 of file network.h.

long OSB_LIB::Network::objVs_ [private]

Object version.

Definition at line 1068 of file network.h.

Oid OSB_LIB::Network::oid_ [private]

Unique object identifer, database link.

Definition at line 1066 of file network.h.

TimeZone::Oid OSB_LIB::Network::tzId_ [private]

Timezone information.

Definition at line 1080 of file network.h.


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