libgexf::Data Class Reference

Associated data and attributes on nodes and edges. More...

#include <data.h>

List of all members.

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::AttributeItergetNodeAttributeColumn () const
 Get an iterator on the node attribute column.
libgexf::AttributeItergetEdgeAttributeColumn () 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::AttValueItergetNodeAttributeRow (const libgexf::t_id node_id) const
 Get an iterator on the node attribute row.
libgexf::AttValueItergetEdgeAttributeRow (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)


Detailed Description

Associated data and attributes on nodes and edges.

Member Function Documentation

string libgexf::Data::getNodeLabel ( const libgexf::t_id  node_id  )  const

Get node label.

Parameters:
node_id : node ID

bool libgexf::Data::hasNodeLabel ( const libgexf::t_id  node_id  )  const

Check if the node label exists.

Parameters:
node_id : node ID

void libgexf::Data::setNodeLabel ( const libgexf::t_id  node_id,
const std::string &  label 
)

Set node label.

Parameters:
node_id : node ID
label : node label

string libgexf::Data::getEdgeLabel ( const libgexf::t_id  edge_id  )  const

Get edge label.

Parameters:
edge_id : edge ID

bool libgexf::Data::hasEdgeLabel ( const libgexf::t_id  edge_id  )  const

Check if the edge label exists.

Parameters:
edge_id : edge ID

void libgexf::Data::setEdgeLabel ( const libgexf::t_id  edge_id,
const std::string &  label 
)

Set edge label.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
edge_id : edge ID
attr_id : attribute ID
value : edge value

AttributeIter * libgexf::Data::getNodeAttributeColumn (  )  const

Get an iterator on the node attribute column.

Returns:
Attribute iterator instance

AttributeIter * libgexf::Data::getEdgeAttributeColumn (  )  const

Get an iterator on the edge attribute column.

Returns:
Attribute iterator instance

string libgexf::Data::getNodeAttribute ( const libgexf::t_id  node_id,
const libgexf::t_id  attr_id 
) const

Get the node attribute value.

Parameters:
node_id : node ID
attr_id : attribute ID
Returns:
node attribute value

string libgexf::Data::getEdgeAttribute ( const libgexf::t_id  edge_id,
const libgexf::t_id  attr_id 
) const

Get the edge attribute value.

Parameters:
edge_id : edge ID
attr_id : attribute ID
Returns:
edge attribute value

AttValueIter * libgexf::Data::getNodeAttributeRow ( const libgexf::t_id  node_id  )  const

Get an iterator on the node attribute row.

Parameters:
node_id : node ID
Returns:
iterator instance on attribute values

AttValueIter * libgexf::Data::getEdgeAttributeRow ( const libgexf::t_id  edge_id  )  const

Get an iterator on the edge attribute row.

Parameters:
edge_id : edge ID
Returns:
iterator instance on attribute values

string libgexf::Data::getNodeAttributeDefault ( const libgexf::t_id  attr_id  )  const

Get the default value of a node attribute.

Parameters:
attr_id : attribute ID
Returns:
default value

std::string libgexf::Data::getEdgeAttributeOptions ( const libgexf::t_id  attr_id  )  const

Get the options of an edge attribute.

Parameters:
attr_id : attribute ID
Returns:
options

std::string libgexf::Data::getNodeAttributeOptions ( const libgexf::t_id  attr_id  )  const

Get the options of a node attribute.

Parameters:
attr_id : attribute ID
Returns:
options

string libgexf::Data::getEdgeAttributeDefault ( const libgexf::t_id  attr_id  )  const

Get the default value of an edge attribute.

Parameters:
attr_id : attribute ID
Returns:
default value

bool libgexf::Data::hasNodeAttributeDefault ( const libgexf::t_id  attr_id  )  const

Check if a node attribute has a default value.

Parameters:
attr_id : attribute ID
Returns:
true if the default value exists, false otherwise

bool libgexf::Data::hasEdgeAttributeDefault ( const libgexf::t_id  attr_id  )  const

Check if an edge attribute has a default value.

Parameters:
attr_id : attribute ID
Returns:
true if the default value exists, false otherwise

bool libgexf::Data::hasNodeAttributeOptions ( const libgexf::t_id  attr_id  )  const

Check if a node attribute has options.

Parameters:
attr_id : attribute ID
Returns:
true if options exists, false otherwise

bool libgexf::Data::hasEdgeAttributeOptions ( const libgexf::t_id  attr_id  )  const

Check if an edge attribute has options.

Parameters:
attr_id : attribute ID
Returns:
true if options exists, false otherwise

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.

Parameters:
attr_id : attribute ID
option : option strings separated by pipes (|)
Returns:
true if the option is available, false otherwise

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.

Parameters:
attr_id : attribute ID
option : option strings separated by pipes (|)
Returns:
true if the option is available, false otherwise

void libgexf::Data::clearNodeAttributes ( const libgexf::t_id  node_id  ) 

Delete all attribute values for a node.

Parameters:
node_id : node ID

void libgexf::Data::clearEdgeAttributes ( const libgexf::t_id  edge_id  ) 

Delete all attribute values for an edge.

Parameters:
edge_id : edge ID


Friends And Related Function Documentation

friend class AttributeIter [friend]

friend class AttValueIter [friend]


The documentation for this class was generated from the following files:

Generated on Fri Dec 11 00:33:33 2009 for libgexf by  doxygen 1.5.6