10 #include <pugixml/pugixml.hpp>
40 for (ObjectList::iterator iter =
list_.begin(); iter !=
list_.end();
43 if (object->
origin() == origin) {
53 list_.push_back(*obj);
55 list_.push_front(*obj);
68 return &
list_.front();
75 return &
list_.front();
82 crc =
object->CalculateCrc();
92 cout <<
name_ <<
": " <<
list_.size() <<
" objects" << endl;
93 for (ObjectList::iterator iter =
list_.begin(); iter !=
list_.end();
101 xml_node node = parent->append_child(
"node");
103 node.append_child(
"name").text().set(
name_.c_str());
105 if (
object != NULL) {
106 object->EncodeUpdate(&node);
111 xml_node node = parent->append_child(
"node");
113 node.append_child(
"name").text().set(
name_.c_str());
117 xml_node node = parent->append_child(
"node");
118 node.append_attribute(
"type") = descriptor.first.c_str();
119 node.append_child(
"name").text().set(descriptor.second.c_str());
void intrusive_ptr_release(const AsPath *cpath)
int intrusive_ptr_add_ref(const AsPath *cpath)
std::unique_ptr< DBRequestKey > KeyPtr
void Remove(IFMapObject *obj)
static IFMapNode * DescriptorLookup(DB *db, const Descriptor &descriptor)
boost::crc_32_type::value_type crc32type
virtual void SetKey(const DBRequestKey *genkey)
virtual KeyPtr GetDBRequestKey() const
IFMapNode(IFMapTable *table)
IFMapObject * GetObject()
std::pair< std::string, std::string > Descriptor
void Insert(IFMapObject *obj)
void EncodeNodeDetail(pugi::xml_node *parent) const
void EncodeNode(pugi::xml_node *parent) const
IFMapObject * Find(IFMapOrigin origin)
virtual std::string ToString() const
IFMapOrigin origin() const
static IFMapTable * FindTable(DB *db, const std::string &element_type)
virtual const char * Typename() const =0
IFMapNode * FindNode(const std::string &name)
void operator()(IFMapObject *obj) const
std::string ToString() const
bool IsOriginXmpp() const