9 #include <pugixml/pugixml.hpp>
39 for (ObjectList::iterator iter =
list_.begin(); iter !=
list_.end();
42 if (object->
origin() == origin) {
52 list_.push_back(*obj);
54 list_.push_front(*obj);
67 return &
list_.front();
74 return &
list_.front();
81 crc =
object->CalculateCrc();
91 cout <<
name_ <<
": " <<
list_.size() <<
" objects" << endl;
92 for (ObjectList::iterator iter =
list_.begin(); iter !=
list_.end();
100 xml_node node = parent->append_child(
"node");
102 node.append_child(
"name").text().set(
name_.c_str());
104 if (
object != NULL) {
105 object->EncodeUpdate(&node);
110 xml_node node = parent->append_child(
"node");
112 node.append_child(
"name").text().set(
name_.c_str());
116 xml_node node = parent->append_child(
"node");
117 node.append_attribute(
"type") = descriptor.first.c_str();
118 node.append_child(
"name").text().set(descriptor.second.c_str());
142 return table->
FindNode(descriptor.second);
int intrusive_ptr_add_ref(const AsPath *cpath)
void EncodeNode(pugi::xml_node *parent) const
virtual std::string ToString() const
void Remove(IFMapObject *obj)
IFMapOrigin origin() const
virtual const char * Typename() const =0
std::unique_ptr< DBRequestKey > KeyPtr
void EncodeNodeDetail(pugi::xml_node *parent) const
static IFMapNode * DescriptorLookup(DB *db, const Descriptor &descriptor)
void operator()(IFMapObject *obj) const
IFMapNode * FindNode(const std::string &name)
boost::crc_32_type::value_type crc32type
void Insert(IFMapObject *obj)
IFMapObject * Find(IFMapOrigin origin)
IFMapObject * GetObject()
std::pair< std::string, std::string > Descriptor
static IFMapTable * FindTable(DB *db, const std::string &element_type)
virtual KeyPtr GetDBRequestKey() const
void intrusive_ptr_release(const AsPath *cpath)
std::string ToString() const
virtual void SetKey(const DBRequestKey *genkey)
IFMapNode(IFMapTable *table)
bool IsOriginXmpp() const