|
reSIProcate/rutil
9694
|
#include <RRVip.hxx>


Classes | |
| class | HostTransformFactory |
| class | MapKey |
| class | NaptrTransform |
| class | NaptrTransformFactroy |
| class | SrvTransform |
| class | SrvTransformFactory |
| class | Transform |
| class | TransformFactory |
Public Member Functions | |
| RRVip () | |
| ~RRVip () | |
| void | vip (const Data &target, int rrType, const Data &vip) |
| void | removeVip (const Data &target, int rrType) |
| void | transform (const Data &target, int rrType, std::vector< DnsResourceRecord * > &) |
Private Types | |
| typedef std::vector < DnsResourceRecord * > | RRVector |
| typedef std::map< int, TransformFactory * > | TransformFactoryMap |
| typedef std::map< MapKey, Transform * > | TransformMap |
Private Member Functions | |
| RRVip (const RRVip &) | |
| RRVip & | operator= (const RRVip &) |
Private Attributes | |
| TransformFactoryMap | mFactories |
| TransformMap | mTransforms |
typedef std::vector<DnsResourceRecord*> resip::RRVip::RRVector [private] |
typedef std::map<int, TransformFactory*> resip::RRVip::TransformFactoryMap [private] |
typedef std::map<MapKey, Transform*> resip::RRVip::TransformMap [private] |
| RRVip::RRVip | ( | ) |
Definition at line 46 of file RRVip.cxx.
References T_A, T_AAAA, T_NAPTR, and T_SRV.
{
mFactories[T_A] = new HostTransformFactory;
mFactories[T_AAAA] = new HostTransformFactory;
mFactories[T_NAPTR] = new NaptrTransformFactroy;
mFactories[T_SRV] = new SrvTransformFactory;
}
| RRVip::~RRVip | ( | ) |
Definition at line 54 of file RRVip.cxx.
{
for (map<MapKey, Transform*>::iterator it = mTransforms.begin(); it != mTransforms.end(); ++it)
{
delete (*it).second;
}
for (TransformFactoryMap::iterator it = mFactories.begin(); it != mFactories.end(); ++it)
{
delete (*it).second;
}
}
| resip::RRVip::RRVip | ( | const RRVip & | ) | [private] |
| void RRVip::removeVip | ( | const Data & | target, |
| int | rrType | ||
| ) |
Definition at line 86 of file RRVip.cxx.
References DebugLog.
{
RRVip::MapKey key(target, rrType);
TransformMap::iterator it = mTransforms.find(key);
if (it != mTransforms.end())
{
Data vip = it->second->vip();
delete (*it).second;
mTransforms.erase(it);
DebugLog(<< "removed vip " << target << "(" << rrType << "): " << vip);
}
}
| void RRVip::transform | ( | const Data & | target, |
| int | rrType, | ||
| std::vector< DnsResourceRecord * > & | src | ||
| ) |
Definition at line 100 of file RRVip.cxx.
{
RRVip::MapKey key(target, rrType);
TransformMap::iterator it = mTransforms.find(key);
if (it != mTransforms.end())
{
bool invalidVip = false;
it->second->transform(src, invalidVip);
if (invalidVip)
{
removeVip(target, rrType);
}
}
}
Definition at line 67 of file RRVip.cxx.
Referenced by resip::RRVip::Transform::transform(), resip::RRVip::NaptrTransform::transform(), resip::RRVip::SrvTransform::transform(), and resip::RRVip::Transform::updateVip().
{
RRVip::MapKey key(target, rrType);
TransformMap::iterator it = mTransforms.find(key);
if (it != mTransforms.end())
{
it->second->updateVip(vip);
}
else
{
TransformFactoryMap::iterator it = mFactories.find(rrType);
assert(it != mFactories.end());
Transform* transform = it->second->createTransform(vip);
mTransforms.insert(TransformMap::value_type(key, transform));
}
}
TransformFactoryMap resip::RRVip::mFactories [private] |
TransformMap resip::RRVip::mTransforms [private] |
1.7.5.1