Definition at line 402 of file network.h.
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.
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.
session | Database session to use. | |
trkGroup | Trunk group to be added. |
OsbException |
|
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.
session | Database session to use. | |
oid | Object id of trunk group to be deleted. |
OsbException |
|
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.
name | Name of the trunk group. | |
direction | Direction of the trunk group. |
const TrunkGroup* OSB_LIB::NetworkElement::findTrkGroup | ( | const TrunkGroup::Oid & | oid | ) | const |
Find the trunk group based on the given oid.
oid | Object id of the trunk group. |
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.
name | Name of the trunk group. | |
direction | Direction of the trunk group. |
ObjectNotFound |
const TrunkGroup& OSB_LIB::NetworkElement::getTrkGroup | ( | const TrunkGroup::Oid & | oid | ) | const |
Get the trunk groupt based on the given oid.
oid | Object id of the trunk group. |
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.
session | Database session to use. |
OsbException |
|
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.
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.
session | Database session to use. |
OsbException |
|
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.
session | Database session to use. |
OsbException |
|
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] |
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] |
void OSB_LIB::NetworkElement::setNdc | ( | const std::string | 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.
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.
name | Name of the trunk group. | |
direction | Direction of the trunk group. |
TrunkGroup* OSB_LIB::NetworkElement::trkGroup | ( | const TrunkGroup::Oid & | oid | ) |
Get the writable trunk group based on the given oid.
oid | Object id of trunk group. |
const TrunkGroups& OSB_LIB::NetworkElement::trunkGroups | ( | ) | const |
List of the trunk groups.
const TimeZone::Oid OSB_LIB::NetworkElement::tzId | ( | ) | const |
Get the timezone.
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.
session | Database session to use. |
OsbException |
|
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.
session | The database session. | |
trunkGroup | Trunk group to update. |
OsbException |
|
friend class Network [friend] |
friend class OSB_DB::NetworkElementGw [friend] |
Id<ConnectionPt> OSB_LIB::NetworkElement::connectionPt_ [private] |
std::string OSB_LIB::NetworkElement::des_ [private] |
bool OSB_LIB::NetworkElement::hasNdc_ [private] |
std::string OSB_LIB::NetworkElement::name_ [private] |
std::string OSB_LIB::NetworkElement::ndc_ [private] |
long OSB_LIB::NetworkElement::objVs_ [private] |
Oid OSB_LIB::NetworkElement::oid_ [private] |
TimeZone::Oid OSB_LIB::NetworkElement::tzId_ [private] |