347 std::map<t_id,std::string > _node_labels;
348 std::map<t_id,std::string > _edge_labels;
350 std::map<t_id,std::string > _node_attributes;
351 std::map<t_id,t_attr_type > _node_attributes_types;
352 std::map<t_id,std::string > _node_default_values;
353 std::map<t_id,std::map<std::string,unsigned short int > > _node_options;
354 std::map<t_id,std::string > _node_verbatim_options;
355 std::map<t_id,std::map<t_id,std::string > > _node_values;
357 std::map<t_id,std::string > _edge_attributes;
358 std::map<t_id,t_attr_type > _edge_attributes_types;
359 std::map<t_id,std::string > _edge_default_values;
360 std::map<t_id,std::map<std::string,unsigned short int > > _edge_options;
361 std::map<t_id,std::string > _edge_verbatim_options;
362 std::map<t_id,std::map<t_id,std::string > > _edge_values;
365 friend std::ostream& operator<<(std::ostream& os,
const Data& o);
366 unsigned int countNodeAttributeColumn()
const;
367 unsigned int countEdgeAttributeColumn()
const;
void setEdgeAttributeDefault(const libgexf::t_id attr_id, const std::string &default_value)
Set the default value of an edge attribute.
Definition: data.cpp:142
void clear()
Clear all attributes (columns an rows)
Definition: data.cpp:367
std::string t_id
Definition: typedefs.h:35
void clearEdgeAttributes(const libgexf::t_id edge_id)
Delete all attribute values for an edge.
Definition: data.cpp:361
std::string getEdgeLabel(const libgexf::t_id edge_id) const
Get edge label.
Definition: data.cpp:98
bool hasNodeAttributeOptions(const libgexf::t_id attr_id) const
Check if a node attribute has options.
Definition: data.cpp:182
bool hasEdgeAttributeOptions(const libgexf::t_id attr_id) const
Check if an edge attribute has options.
Definition: data.cpp:189
void setNodeLabel(const libgexf::t_id node_id, const std::string &label)
Set node label.
Definition: data.cpp:92
Iterator on attributes.
Definition: attributeiter.h:46
void setEdgeLabel(const libgexf::t_id edge_id, const std::string &label)
Set edge label.
Definition: data.cpp:114
Iterator on attribute values.
Definition: attvalueiter.h:46
Definition: abstractiter.h:32
std::string getEdgeAttributeDefault(const libgexf::t_id attr_id) const
Get the default value of an edge attribute.
Definition: data.cpp:158
void clearEdgesAttributes()
Clear edge attributes (columns an rows), and labels.
Definition: data.cpp:384
void addEdgeAttributeColumn(const libgexf::t_id id, const std::string &title, const std::string &type="STRING")
Add an edge attribute column.
Definition: data.cpp:128
void addNodeAttributeColumn(const libgexf::t_id id, const std::string &title, const std::string &type="STRING")
Add a node attribute column.
Definition: data.cpp:120
std::string getNodeAttributeOptions(const libgexf::t_id attr_id) const
Get the options of a node attribute.
Definition: data.cpp:226
bool hasEdgeAttributeDefault(const libgexf::t_id attr_id) const
Check if an edge attribute has a default value.
Definition: data.cpp:175
void setNodeAttributeDefault(const libgexf::t_id attr_id, const std::string &default_value)
Set the default value of a node attribute.
Definition: data.cpp:136
bool hasEdgeLabel(const libgexf::t_id edge_id) const
Check if the edge label exists.
Definition: data.cpp:108
libgexf::AttValueIter * getNodeAttributeRow(const libgexf::t_id node_id) const
Get an iterator on the node attribute row.
Definition: data.cpp:284
void setEdgeAttributeOptions(const libgexf::t_id attr_id, const std::string &options)
Set the options of an edge attribute.
Definition: data.cpp:211
std::string getEdgeAttribute(const libgexf::t_id edge_id, const libgexf::t_id attr_id) const
Get the edge attribute value.
Definition: data.cpp:271
bool hasNodeAttributeDefault(const libgexf::t_id attr_id) const
Check if a node attribute has a default value.
Definition: data.cpp:168
std::string getNodeAttribute(const libgexf::t_id node_id, const libgexf::t_id attr_id) const
Get the node attribute value.
Definition: data.cpp:258
libgexf::AttributeIter * getNodeAttributeColumn() const
Get an iterator on the node attribute column.
Definition: data.cpp:246
std::string getNodeAttributeDefault(const libgexf::t_id attr_id) const
Get the default value of a node attribute.
Definition: data.cpp:148
void setNodeAttributeOptions(const libgexf::t_id attr_id, const std::string &options)
Set the options of a node attribute.
Definition: data.cpp:196
libgexf::AttValueIter * getEdgeAttributeRow(const libgexf::t_id edge_id) const
Get an iterator on the edge attribute row.
Definition: data.cpp:296
void clearNodeAttributes(const libgexf::t_id node_id)
Delete all attribute values for a node.
Definition: data.cpp:355
Associated data and attributes on nodes and edges.
Definition: data.h:47
bool hasNodeLabel(const libgexf::t_id node_id) const
Check if the node label exists.
Definition: data.cpp:86
void setEdgeValue(const libgexf::t_id edge_id, const libgexf::t_id attr_id, const std::string &value)
Set the edge value of an attribute.
Definition: data.cpp:349
libgexf::AttributeIter * getEdgeAttributeColumn() const
Get an iterator on the edge attribute column.
Definition: data.cpp:252
std::string getNodeLabel(const libgexf::t_id node_id) const
Get node label.
Definition: data.cpp:76
bool isEdgeAttributeOption(const libgexf::t_id attr_id, const std::string &option) const
Check if an option is available for the given edge attribute.
Definition: data.cpp:319
bool isNodeAttributeOption(const libgexf::t_id attr_id, const std::string &option) const
Check if an option is available for the given node attribute.
Definition: data.cpp:308
void setNodeValue(const libgexf::t_id node_id, const libgexf::t_id attr_id, const std::string &value)
Set the node value of an attribute.
Definition: data.cpp:343
std::string getEdgeAttributeOptions(const libgexf::t_id attr_id) const
Get the options of an edge attribute.
Definition: data.cpp:236