#include <data.h>
Public Member Functions | |
Data (const Data &orig) | |
Copy constructor. | |
std::string | getNodeLabel (const libgexf::t_id node_id) const |
Get node label. | |
bool | hasNodeLabel (const libgexf::t_id node_id) const |
Check if the node label exists. | |
void | setNodeLabel (const libgexf::t_id node_id, const std::string &label) |
Set node label. | |
std::string | getEdgeLabel (const libgexf::t_id edge_id) const |
Get edge label. | |
bool | hasEdgeLabel (const libgexf::t_id edge_id) const |
Check if the edge label exists. | |
void | setEdgeLabel (const libgexf::t_id edge_id, const std::string &label) |
Set edge label. | |
void | addNodeAttributeColumn (const libgexf::t_id id, const std::string &title, const std::string &type="STRING") |
Add a node attribute column. | |
void | addEdgeAttributeColumn (const libgexf::t_id id, const std::string &title, const std::string &type="STRING") |
Add an edge attribute column. | |
void | setNodeAttributeDefault (const libgexf::t_id attr_id, const std::string &default_value) |
Set the default value of a node attribute. | |
void | setEdgeAttributeDefault (const libgexf::t_id attr_id, const std::string &default_value) |
Set the default value of an edge attribute. | |
void | setNodeAttributeOptions (const libgexf::t_id attr_id, const std::string &options) |
Set the options of a node attribute. | |
void | setEdgeAttributeOptions (const libgexf::t_id attr_id, const std::string &options) |
Set the options of an edge attribute. | |
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. | |
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. | |
libgexf::AttributeIter * | getNodeAttributeColumn () const |
Get an iterator on the node attribute column. | |
libgexf::AttributeIter * | getEdgeAttributeColumn () const |
Get an iterator on the edge attribute column. | |
std::string | getNodeAttribute (const libgexf::t_id node_id, const libgexf::t_id attr_id) const |
Get the node attribute value. | |
std::string | getEdgeAttribute (const libgexf::t_id edge_id, const libgexf::t_id attr_id) const |
Get the edge attribute value. | |
libgexf::AttValueIter * | getNodeAttributeRow (const libgexf::t_id node_id) const |
Get an iterator on the node attribute row. | |
libgexf::AttValueIter * | getEdgeAttributeRow (const libgexf::t_id edge_id) const |
Get an iterator on the edge attribute row. | |
std::string | getNodeAttributeDefault (const libgexf::t_id attr_id) const |
Get the default value of a node attribute. | |
std::string | getEdgeAttributeOptions (const libgexf::t_id attr_id) const |
Get the options of an edge attribute. | |
std::string | getNodeAttributeOptions (const libgexf::t_id attr_id) const |
Get the options of a node attribute. | |
std::string | getEdgeAttributeDefault (const libgexf::t_id attr_id) const |
Get the default value of an edge attribute. | |
bool | hasNodeAttributeDefault (const libgexf::t_id attr_id) const |
Check if a node attribute has a default value. | |
bool | hasEdgeAttributeDefault (const libgexf::t_id attr_id) const |
Check if an edge attribute has a default value. | |
bool | hasNodeAttributeOptions (const libgexf::t_id attr_id) const |
Check if a node attribute has options. | |
bool | hasEdgeAttributeOptions (const libgexf::t_id attr_id) const |
Check if an edge attribute has options. | |
bool | isNodeAttributeOption (const libgexf::t_id attr_id, const std::string &option) const |
Check if an option is available for the given node attribute. | |
bool | isEdgeAttributeOption (const libgexf::t_id attr_id, const std::string &option) const |
Check if an option is available for the given edge attribute. | |
void | removeNodeAttributeColumn (const libgexf::t_id attr_id) |
void | removeEdgeAttributeColumn (const libgexf::t_id attr_id) |
void | clearNodeAttributes (const libgexf::t_id node_id) |
Delete all attribute values for a node. | |
void | clearEdgeAttributes (const libgexf::t_id edge_id) |
Delete all attribute values for an edge. | |
void | clear () |
Clear all attributes (columns an rows). | |
void | clearEdgesAttributes () |
Clear edge attributes (columns an rows), and labels. | |
Friends | |
class | AttributeIter |
class | AttValueIter |
std::ostream & | operator<< (std::ostream &os, const Data &o) |
string libgexf::Data::getNodeLabel | ( | const libgexf::t_id | node_id | ) | const |
Get node label.
node_id | : node ID |
bool libgexf::Data::hasNodeLabel | ( | const libgexf::t_id | node_id | ) | const |
Check if the node label exists.
node_id | : node ID |
void libgexf::Data::setNodeLabel | ( | const libgexf::t_id | node_id, | |
const std::string & | label | |||
) |
Set node label.
node_id | : node ID | |
label | : node label |
string libgexf::Data::getEdgeLabel | ( | const libgexf::t_id | edge_id | ) | const |
Get edge label.
edge_id | : edge ID |
bool libgexf::Data::hasEdgeLabel | ( | const libgexf::t_id | edge_id | ) | const |
Check if the edge label exists.
edge_id | : edge ID |
void libgexf::Data::setEdgeLabel | ( | const libgexf::t_id | edge_id, | |
const std::string & | label | |||
) |
Set edge label.
edge_id | : edge ID | |
label | : edge label |
void libgexf::Data::addNodeAttributeColumn | ( | const libgexf::t_id | id, | |
const std::string & | title, | |||
const std::string & | type = "STRING" | |||
) |
Add a node attribute column.
id | : attribute ID | |
title | : name of the node attribute | |
type | : type of attribute (integer, double, float, boolean, string or list-string) |
void libgexf::Data::addEdgeAttributeColumn | ( | const libgexf::t_id | id, | |
const std::string & | title, | |||
const std::string & | type = "STRING" | |||
) |
Add an edge attribute column.
id | : attribute ID | |
title | : name of the edge attribute | |
type | : type of attribute (integer, double, float, boolean, string or list-string) |
void libgexf::Data::setNodeAttributeDefault | ( | const libgexf::t_id | attr_id, | |
const std::string & | default_value | |||
) |
Set the default value of a node attribute.
attr_id | : attribute ID | |
default_value | : default value |
void libgexf::Data::setEdgeAttributeDefault | ( | const libgexf::t_id | attr_id, | |
const std::string & | default_value | |||
) |
Set the default value of an edge attribute.
attr_id | : attribute ID | |
default_value | : default value |
void libgexf::Data::setNodeAttributeOptions | ( | const libgexf::t_id | attr_id, | |
const std::string & | options | |||
) |
Set the options of a node attribute.
attr_id | : attribute ID | |
options | : options |
void libgexf::Data::setEdgeAttributeOptions | ( | const libgexf::t_id | attr_id, | |
const std::string & | options | |||
) |
Set the options of an edge attribute.
attr_id | : attribute ID | |
options | : options |
void libgexf::Data::setNodeValue | ( | const libgexf::t_id | node_id, | |
const libgexf::t_id | attr_id, | |||
const std::string & | value | |||
) |
Set the node value of an attribute.
node_id | : node ID | |
attr_id | : attribute ID | |
value | : node value |
void libgexf::Data::setEdgeValue | ( | const libgexf::t_id | edge_id, | |
const libgexf::t_id | attr_id, | |||
const std::string & | value | |||
) |
Set the edge value of an attribute.
edge_id | : edge ID | |
attr_id | : attribute ID | |
value | : edge value |
AttributeIter * libgexf::Data::getNodeAttributeColumn | ( | ) | const |
Get an iterator on the node attribute column.
AttributeIter * libgexf::Data::getEdgeAttributeColumn | ( | ) | const |
Get an iterator on the edge attribute column.
string libgexf::Data::getNodeAttribute | ( | const libgexf::t_id | node_id, | |
const libgexf::t_id | attr_id | |||
) | const |
Get the node attribute value.
node_id | : node ID | |
attr_id | : attribute ID |
string libgexf::Data::getEdgeAttribute | ( | const libgexf::t_id | edge_id, | |
const libgexf::t_id | attr_id | |||
) | const |
Get the edge attribute value.
edge_id | : edge ID | |
attr_id | : attribute ID |
AttValueIter * libgexf::Data::getNodeAttributeRow | ( | const libgexf::t_id | node_id | ) | const |
Get an iterator on the node attribute row.
node_id | : node ID |
AttValueIter * libgexf::Data::getEdgeAttributeRow | ( | const libgexf::t_id | edge_id | ) | const |
Get an iterator on the edge attribute row.
edge_id | : edge ID |
string libgexf::Data::getNodeAttributeDefault | ( | const libgexf::t_id | attr_id | ) | const |
Get the default value of a node attribute.
attr_id | : attribute ID |
std::string libgexf::Data::getEdgeAttributeOptions | ( | const libgexf::t_id | attr_id | ) | const |
Get the options of an edge attribute.
attr_id | : attribute ID |
std::string libgexf::Data::getNodeAttributeOptions | ( | const libgexf::t_id | attr_id | ) | const |
Get the options of a node attribute.
attr_id | : attribute ID |
string libgexf::Data::getEdgeAttributeDefault | ( | const libgexf::t_id | attr_id | ) | const |
Get the default value of an edge attribute.
attr_id | : attribute ID |
bool libgexf::Data::hasNodeAttributeDefault | ( | const libgexf::t_id | attr_id | ) | const |
Check if a node attribute has a default value.
attr_id | : attribute ID |
bool libgexf::Data::hasEdgeAttributeDefault | ( | const libgexf::t_id | attr_id | ) | const |
Check if an edge attribute has a default value.
attr_id | : attribute ID |
bool libgexf::Data::hasNodeAttributeOptions | ( | const libgexf::t_id | attr_id | ) | const |
Check if a node attribute has options.
attr_id | : attribute ID |
bool libgexf::Data::hasEdgeAttributeOptions | ( | const libgexf::t_id | attr_id | ) | const |
Check if an edge attribute has options.
attr_id | : attribute ID |
bool libgexf::Data::isNodeAttributeOption | ( | const libgexf::t_id | attr_id, | |
const std::string & | option | |||
) | const |
Check if an option is available for the given node attribute.
attr_id | : attribute ID | |
option | : option strings separated by pipes (|) |
bool libgexf::Data::isEdgeAttributeOption | ( | const libgexf::t_id | attr_id, | |
const std::string & | option | |||
) | const |
Check if an option is available for the given edge attribute.
attr_id | : attribute ID | |
option | : option strings separated by pipes (|) |
void libgexf::Data::clearNodeAttributes | ( | const libgexf::t_id | node_id | ) |
Delete all attribute values for a node.
node_id | : node ID |
void libgexf::Data::clearEdgeAttributes | ( | const libgexf::t_id | edge_id | ) |
Delete all attribute values for an edge.
edge_id | : edge ID |
friend class AttributeIter [friend] |
friend class AttValueIter [friend] |