OSB_LIB::NetworkElement Class Reference

Collaboration diagram for OSB_LIB::NetworkElement:

Collaboration graph
[legend]
List of all members.

Detailed Description

Information about a network element.

Definition at line 402 of file network.h.

Public Types

Public Member Functions

Read access to data members.
Modify data members
Trunk group list maintenance

Static Public Member Functions

Private Member Functions

Database operations
Set/get address information from/to database.
The following members are used solely as interface between OSB_DB::NetworkElementGw 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


Member Typedef Documentation

typedef Id2<NetworkElement> OSB_LIB::NetworkElement::Oid

Unique identifier, database link.

A network element is identified by:

Definition at line 417 of file network.h.


Member Enumeration Documentation

enum OSB_LIB::NetworkElement::DialledNumType

Types of dialled number.

Enumerator:
incomingDialledNum  Dialled number received.
outgoingDialledNum  Dialled number sent out.

Definition at line 420 of file network.h.


Constructor & Destructor Documentation

OSB_LIB::NetworkElement::NetworkElement (  ) 

Default constructor.

OSB_LIB::NetworkElement::NetworkElement ( const NetworkElement rhs  ) 

Copy constructor.

OSB_LIB::NetworkElement::NetworkElement ( const Oid oid  ) 

Constructor with oid and network id.

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

Constructor with full attributes.

OSB_LIB::NetworkElement::~NetworkElement (  ) 

Destructor will delete the number analyzer assigned.


Member Function Documentation

bool OSB_LIB::NetworkElement::addTrkGroup ( OSB_DB::Session session,
TrunkGroup trkGroup 
)

Add a trunk group for this network.

Add a trunk group entry to the database. Also add it to the trunk group list. The object id, network element id and object version of trunk group will be set if the insertion is successful.
Session will be committed if succeed.

Parameters:
session Database session to use.
trkGroup Trunk group to be added.
Returns:
True if it is successful.
Exceptions:
OsbException 
  • if the external network and element are the same network and element this trunk group belongs to
  • as specified by the gateway class (see there).

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

Id of the assigned connection point.

void OSB_LIB::NetworkElement::delNumAnalyzer (  ) 

Remove the number analyzer attached to this network element.

bool OSB_LIB::NetworkElement::delTrkGroup ( OSB_DB::Session session,
const TrunkGroup::Oid oid 
)

Delete a trunk group for this network element.

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

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

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

Description of the network element.

const DialledNumType& OSB_LIB::NetworkElement::dialledNumType (  )  const

Type of dialled number to populate for this network element.

static DialledNumType OSB_LIB::NetworkElement::dialledNumType ( const char  type  )  [static]

Convert character to its enum representation.

static char OSB_LIB::NetworkElement::dialledNumType ( const DialledNumType type  )  [static]

Convert enum to its character representation.

const TrunkGroup* OSB_LIB::NetworkElement::findTrkGroup ( const std::string &  name,
TrunkGroup::Direction  direction 
) const

Find the trunk group based on name and direction.

Parameters:
name Name of the trunk group.
direction Direction of the trunk group.
Returns:
Pointer to the found trunk group,
NULL pointer if trunk group can not be found.

const TrunkGroup* OSB_LIB::NetworkElement::findTrkGroup ( const TrunkGroup::Oid oid  )  const

Find the trunk group based on the given oid.

Parameters:
oid Object id of the trunk group.
Returns:
Pointer to the found trunk group,
NULL pointer if trunk group can not be found.

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

Copy address information from info buffer.

const TrunkGroup& OSB_LIB::NetworkElement::getTrkGroup ( const std::string &  name,
TrunkGroup::Direction  direction 
) const

Get the trunk groupt based on name and direction.

Parameters:
name Name of the trunk group.
direction Direction of the trunk group.
Returns:
Reference to the found trunk group.
Exceptions:
ObjectNotFound 

const TrunkGroup& OSB_LIB::NetworkElement::getTrkGroup ( const TrunkGroup::Oid oid  )  const

Get the trunk groupt based on the given oid.

Parameters:
oid Object id of the trunk group.
Returns:
Reference to the found trunk group.
Exceptions:
ObjectNotFound 

bool OSB_LIB::NetworkElement::hasNdc (  )  const

Flag if a NDC is defined for the network element.

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

Insert a network element.

Add a network element entry to the database. The object id and object version of network element 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::NetworkElement::name (  )  const

Name of the network element.

const std::string& OSB_LIB::NetworkElement::ndc (  )  const

NDC of the network element.

Note: It may be empty, see ndc_ for details.

Id<Network> OSB_LIB::NetworkElement::networkId (  )  const

Get id of the network it belongs to.

const NumberAnalyzer* OSB_LIB::NetworkElement::numberAnalyzer (  )  const

Number analyzer attached to this network element.

long OSB_LIB::NetworkElement::objVs (  )  const

Object version of the network element.

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

Object id.

NetworkElement& OSB_LIB::NetworkElement::operator= ( const NetworkElement rhs  ) 

Assignement operator that copies the pointer member.

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

Copy address information to info buffer.

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

Read a network element from the database.

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

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

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

Delete a network element.

Delete a network element 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::NetworkElement::setConnectionPt ( const Id< ConnectionPt > &  cpId  ) 

Set the id of the connection point.

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

Set description of network element.

Definition at line 494 of file network.h.

References des_.

void OSB_LIB::NetworkElement::setDialledNumType ( const DialledNumType type  ) 

Set the type of dialled number to populate.

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

Set name of network element.

Definition at line 492 of file network.h.

References name_.

void OSB_LIB::NetworkElement::setNdc ( const std::string  ndc  ) 

Set the NDC.

Parameters:
ndc NDC of the network element, it may be empty.
Sets hasNdc_ to true and ndc_ to ndc.

void OSB_LIB::NetworkElement::setNumAnalyzer ( NumberAnalyzer numAnalyzer  ) 

Set the number analyzer attached to this network element.

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

Set the timezone information.

void OSB_LIB::NetworkElement::sortTrkGroupByName ( bool  desc = false  ) 

Sort trunk groups by name.

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

TrunkGroup* OSB_LIB::NetworkElement::trkGroup ( const std::string &  name,
TrunkGroup::Direction  direction 
)

Get the writable trunk group based on name and direction.

Parameters:
name Name of the trunk group.
direction Direction of the trunk group.
Returns:
Pointer to trunk group if found,
else 0.

TrunkGroup* OSB_LIB::NetworkElement::trkGroup ( const TrunkGroup::Oid oid  ) 

Get the writable trunk group based on the given oid.

Parameters:
oid Object id of trunk group.
Returns:
Pointer to trunk group if found,
else 0.

const TrunkGroups& OSB_LIB::NetworkElement::trunkGroups (  )  const

List of the trunk groups.

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

Get the timezone.

Returns:
The id of the element's timezone. It is not set if the time zone of the network is valid.

void OSB_LIB::NetworkElement::unsetNdc (  ) 

Unset the NDC.

Sets hasNdc_ to false and clears ndc_.

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

Update a network element to the database.

This function will also update the data member objVs.

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

bool OSB_LIB::NetworkElement::updTrkGroup ( OSB_DB::Session session,
TrunkGroup trunkGroup 
)

Update a trunk group to the database.

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

Parameters:
session The database session.
trunkGroup Trunk group to update.
Returns:
True if the trunk group was updated to the database.
Exceptions:
OsbException 
  • if the external network and element are the same network and element this trunk group belongs to
  • trunk group is not found in the list
  • as specified by the gateway class (see there).


Friends And Related Function Documentation

friend class Network [friend]

Allow Network to access insert and delete.

Definition at line 406 of file network.h.

friend class OSB_DB::NetworkElementGw [friend]

Allow NetworkGw to access private attributes.

Definition at line 404 of file network.h.


Member Data Documentation

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

Assigned connection point.

Definition at line 748 of file network.h.

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

Description of the network element.

Definition at line 746 of file network.h.

Referenced by setDes().

DialledNumType OSB_LIB::NetworkElement::dialledNumType_ [private]

Which dialled number will be populated for Cdr from this network element.

Definition at line 768 of file network.h.

bool OSB_LIB::NetworkElement::hasNdc_ [private]

Flag if a NDC is defined for the network element.

Definition at line 750 of file network.h.

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

Name of the network element.

Definition at line 744 of file network.h.

Referenced by setName().

std::string OSB_LIB::NetworkElement::ndc_ [private]

NDC of the network element.

This member (or hasNdc_) must be set if the element's network has more than one NDC. It can be empty for several reasons: Only one NDC for the whole network exists or, much less likely, the NDC of the network element is empty.

Definition at line 759 of file network.h.

NumberAnalyzer* OSB_LIB::NetworkElement::numAnalyzer_ [private]

Number analyzer attached to this network element.

Definition at line 770 of file network.h.

long OSB_LIB::NetworkElement::objVs_ [private]

Object version.

Definition at line 742 of file network.h.

Oid OSB_LIB::NetworkElement::oid_ [private]

Object id.

Definition at line 740 of file network.h.

TrunkGroups OSB_LIB::NetworkElement::trunkGroups_ [private]

List of trunk groups.

Definition at line 761 of file network.h.

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

Timezone information.

Definition at line 763 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