#include <Changelist.h>
Public Types | |
typedef std::pair< vertexid_t, const AttributeEdgeTinyBlob * > | edgeblobpair_t |
typedef std::vector< edgeblobpair_t > | edgelist_t |
Public Member Functions | |
bool | addEdge (vertexid_t src, vertexid_t tgt, const AttributeEdgeTinyBlob &eb) |
adds a new edge from source to target vertex. returns true for success | |
bool | addEdge (vertexid_t src, vertexid_t tgt) |
adds a new edge from source to target vertex. returns true for success | |
bool | addVertex (vertexid_t id, const AttributeVertexTinyBlob &vb) |
adds a new vertex and fills it with the give blob data. | |
bool | addVertex (vertexid_t id) |
adds a new vertex. Returns true for success (the vertex didnt exist yet) | |
Changelist (const class GraphData &graph) | |
constructs a new Changelist for the given graph | |
void | clear () |
clear the change list | |
bool | delEdge (vertexid_t src, vertexid_t tgt) |
removes an edge from the graph. returns true if it existed. | |
bool | delVertex (vertexid_t id) |
deletes a vertex from the graph. returns true if it existed | |
const AttributeEdgeTinyBlob & | getEdgeChange (vertexid_t src, vertexid_t tgt) const |
return the change object for an edge (the change object _must_ exist) | |
std::vector< edgeblobpair_t > | getEdgeListChange (vertexid_t src) const |
returns a sorted vector of changed outgoing edges of a vertex. | |
const AttributeVertexTinyBlob & | getVertexChange (vertexid_t vid) const |
return the change object for a vertex id (the change object _must_ exist) | |
bool | isEdgeChanged (vertexid_t src, vertexid_t tgt) const |
check if an edge was changed | |
bool | isVertexChanged (vertexid_t id) const |
check if a vertex was changed | |
bool | setEdgeAttr (vertexid_t src, vertexid_t tgt, const AttributeEdgeTinyBlob &eb) |
changes the value of an attribute on the edge | |
bool | setEdgeAttr (vertexid_t src, vertexid_t tgt, unsigned int attrid, const AnyType &value) |
changes the value of an attribute on the edge | |
bool | setVertexAttr (vertexid_t id, const AttributeVertexTinyBlob &vb) |
change all attribute values on the vertex | |
bool | setVertexAttr (vertexid_t id, unsigned int attrid, const AnyType &value) |
changes the value of an attribute on the vertex | |
Friends | |
class | GraphContainer |
takes the changes directly when merging them into the rtree | |
class | GraphData |
takes the change maps directly when applying the Changelist. | |
Classes | |
struct | vertexidpair_hash_compare |
Definition at line 39 of file Changelist.h.
typedef std::pair<vertexid_t, const AttributeEdgeTinyBlob*> VGServer::Changelist::edgeblobpair_t |
Definition at line 247 of file Changelist.h.
typedef std::vector<edgeblobpair_t> VGServer::Changelist::edgelist_t |
Definition at line 248 of file Changelist.h.
VGServer::Changelist::Changelist | ( | const class GraphData & | graph | ) | [explicit] |
bool VGServer::Changelist::addEdge | ( | vertexid_t | src, | |
vertexid_t | tgt, | |||
const AttributeEdgeTinyBlob & | eb | |||
) |
adds a new edge from source to target vertex. returns true for success
Definition at line 191 of file Changelist.cc.
References VGServer::GraphData::existEdge().
bool VGServer::Changelist::addEdge | ( | vertexid_t | src, | |
vertexid_t | tgt | |||
) |
adds a new edge from source to target vertex. returns true for success
Definition at line 157 of file Changelist.cc.
References VGServer::AttributePropertiesList::createBlankAttributeBlob(), VGServer::GraphProperties::edgeattr, VGServer::TpAttributeBlob< AllocPolicy >::empty(), VGServer::GraphData::existEdge(), VGServer::GraphData::getEdgeAttrBlob(), and VGServer::GraphData::properties.
Referenced by VGServer::ChangeTimeline::addEdge().
bool VGServer::Changelist::addVertex | ( | vertexid_t | id, | |
const AttributeVertexTinyBlob & | vb | |||
) |
adds a new vertex and fills it with the give blob data.
Returns true for success (the vertex didnt exist yet)
Definition at line 57 of file Changelist.cc.
References VGServer::GraphData::existVertex().
bool VGServer::Changelist::addVertex | ( | vertexid_t | id | ) |
adds a new vertex. Returns true for success (the vertex didnt exist yet)
Definition at line 25 of file Changelist.cc.
References VGServer::AttributePropertiesList::createBlankAttributeBlob(), VGServer::TpAttributeBlob< AllocPolicy >::empty(), VGServer::GraphData::existVertex(), VGServer::GraphData::getVertexAttrBlob(), VGServer::GraphData::properties, and VGServer::GraphProperties::vertexattr.
Referenced by VGServer::ChangeTimeline::addVertex().
void VGServer::Changelist::clear | ( | ) |
clear the change list
Definition at line 16 of file Changelist.cc.
Referenced by VGServer::ChangeTimeline::clear().
bool VGServer::Changelist::delEdge | ( | vertexid_t | src, | |
vertexid_t | tgt | |||
) |
removes an edge from the graph. returns true if it existed.
Definition at line 270 of file Changelist.cc.
References VGServer::GraphData::existEdge().
Referenced by VGServer::ChangeTimeline::delEdge().
bool VGServer::Changelist::delVertex | ( | vertexid_t | id | ) |
deletes a vertex from the graph. returns true if it existed
Definition at line 132 of file Changelist.cc.
References VGServer::GraphData::existVertex().
Referenced by VGServer::ChangeTimeline::delVertex().
const AttributeEdgeTinyBlob& VGServer::Changelist::getEdgeChange | ( | vertexid_t | src, | |
vertexid_t | tgt | |||
) | const [inline] |
return the change object for an edge (the change object _must_ exist)
Definition at line 239 of file Changelist.h.
Referenced by VGServer::ChangeTimeline::addEdge(), and VGServer::ChangeTimeline::setEdgeAttr().
std::vector< Changelist::edgeblobpair_t > VGServer::Changelist::getEdgeListChange | ( | vertexid_t | src | ) | const |
returns a sorted vector of changed outgoing edges of a vertex.
the vector contains a pair in order to include the target vertex id.
Definition at line 297 of file Changelist.cc.
const AttributeVertexTinyBlob& VGServer::Changelist::getVertexChange | ( | vertexid_t | vid | ) | const [inline] |
return the change object for a vertex id (the change object _must_ exist)
Definition at line 227 of file Changelist.h.
Referenced by VGServer::ChangeTimeline::addVertex(), and VGServer::ChangeTimeline::setVertexAttr().
bool VGServer::Changelist::isEdgeChanged | ( | vertexid_t | src, | |
vertexid_t | tgt | |||
) | const [inline] |
bool VGServer::Changelist::isVertexChanged | ( | vertexid_t | id | ) | const [inline] |
bool VGServer::Changelist::setEdgeAttr | ( | vertexid_t | src, | |
vertexid_t | tgt, | |||
const AttributeEdgeTinyBlob & | eb | |||
) |
changes the value of an attribute on the edge
Definition at line 247 of file Changelist.cc.
References VGServer::GraphData::existEdge().
bool VGServer::Changelist::setEdgeAttr | ( | vertexid_t | src, | |
vertexid_t | tgt, | |||
unsigned int | attrid, | |||
const AnyType & | value | |||
) |
changes the value of an attribute on the edge
Definition at line 218 of file Changelist.cc.
References VGServer::GraphProperties::edgeattr, VGServer::TpAttributeBlob< AllocPolicy >::empty(), VGServer::GraphData::getEdgeAttrBlob(), VGServer::GraphData::properties, and VGServer::TpAttributeBlob< AllocPolicy >::putAttrChainValue().
Referenced by VGServer::ChangeTimeline::setEdgeAttr().
bool VGServer::Changelist::setVertexAttr | ( | vertexid_t | id, | |
const AttributeVertexTinyBlob & | vb | |||
) |
change all attribute values on the vertex
Definition at line 110 of file Changelist.cc.
References VGServer::GraphData::existVertex().
bool VGServer::Changelist::setVertexAttr | ( | vertexid_t | id, | |
unsigned int | attrid, | |||
const AnyType & | value | |||
) |
changes the value of an attribute on the vertex
Definition at line 83 of file Changelist.cc.
References VGServer::TpAttributeBlob< AllocPolicy >::empty(), VGServer::GraphData::getVertexAttrBlob(), VGServer::GraphData::properties, VGServer::TpAttributeBlob< AllocPolicy >::putAttrChainValue(), and VGServer::GraphProperties::vertexattr.
Referenced by VGServer::ChangeTimeline::setVertexAttr().
friend class GraphContainer [friend] |
takes the changes directly when merging them into the rtree
Definition at line 46 of file Changelist.h.
friend class GraphData [friend] |
takes the change maps directly when applying the Changelist.
Definition at line 43 of file Changelist.h.