graph  5.1.2
Graph: generic attributed relational graphs
Edge Class Referenceabstract

The abstract base class for all types of edges; edges are created and managed by Graphs. More...

#include <graph/graph/edge.h>

Inheritance diagram for Edge:
Collaboration diagram for Edge:

Public Member Functions

Property querying methods
virtual bool isDirected () const =0
 Is this edge directed? More...
 
virtual bool isUndirected () const =0
 Is this edge undirected? More...
 
Iterators iterate on the vertices
iterator begin ()
 Get the beginning of the vertex collection of the graph. More...
 
iterator end ()
 Get the end of the vertex collection of the graph. More...
 
const_iterator begin () const
 Get the beginning of the vertex collection of the graph. More...
 
const_iterator end () const
 Get the end of the vertex collection of the graph. More...
 
reverse_iterator rbegin ()
 Get the beginning of the reversed vertex collection of the graph. More...
 
reverse_iterator rend ()
 Get the end of the reversed vertex collection of the graph. More...
 
const_reverse_iterator rbegin () const
 Get the beginning of the reversed vertex collection of the graph. More...
 
const_reverse_iterator rend () const
 Get the end of the reversed vertex collection of the graph. More...
 
virtual std::string type () const CARTO_OVERRIDE
 
- Public Member Functions inherited from GraphObject
virtual ~GraphObject ()
 
- Public Member Functions inherited from carto::SyntaxedObject< class >
 SyntaxedObject (const std::string &s)
 
 SyntaxedObject (const SyntaxedObject &x)
 
 SyntaxedObject (const SyntaxedObject< PropertySet > &x)
 

Associated types

typedef VSet::value_type value_type
 
typedef VSet::pointer pointer
 
typedef VSet::reference reference
 
typedef VSet::const_reference const_reference
 
typedef VSet::iterator iterator
 
typedef VSet::const_iterator const_iterator
 
typedef VSet::reverse_iterator reverse_iterator
 
typedef VSet::const_reverse_iterator const_reverse_iterator
 

Constructors, destructor

class Graph
 export private method addVertices More...
 
virtual ~Edge ()
 
More...
 
 Edge (std::string s)
 The programmer should not call the constructor. More...
 
 Edge (const Edge &x)
 The programmer should not call the copy constructor. More...
 
virtual EdgecloneEdge () const =0
 The programmer should not clone. More...
 

Vertex handling

bool hasVertex (const Vertex *vertex) const
 Does this edge contain a given vertex? More...
 
size_t verticesSize () const
 number of vertices More...
 

Additional Inherited Members

- Public Types inherited from carto::SyntaxedObject< class >
typedef internal::SyntaxedObjectSwitch< T, SUPERSUBCLASS(Interface, T)>::ContentType ContentType
 
- Protected Member Functions inherited from GraphObject
 GraphObject (const std::string &s)
 The programmer should not call the constructor of an abstract base class. More...
 
 GraphObject (const GraphObject &x)
 

Detailed Description

The abstract base class for all types of edges; edges are created and managed by Graphs.

Edge is the abstract base class for all types of edges, directed (D) or undirected (U). An Edge should contain at least one Vertex object. When the last vertex is removed from an edge, the edge is deleted by its graph owner.
See Graph for Edge creation.

Definition at line 68 of file edge.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 101 of file edge.h.

◆ const_reference

Definition at line 97 of file edge.h.

◆ const_reverse_iterator

◆ iterator

Definition at line 99 of file edge.h.

◆ pointer

Definition at line 93 of file edge.h.

◆ reference

Definition at line 95 of file edge.h.

◆ reverse_iterator

Definition at line 103 of file edge.h.

◆ value_type

Definition at line 91 of file edge.h.

Constructor & Destructor Documentation

◆ ~Edge()

virtual Edge::~Edge ( )
virtual

◆ Edge() [1/2]

Edge::Edge ( std::string  s)
protected

The programmer should not call the constructor.

Parameters
ssyntactic attribute
See also
Graph for creating edges

◆ Edge() [2/2]

Edge::Edge ( const Edge x)
protected

The programmer should not call the copy constructor.

Parameters
xedge to clone
See also
Graph for creating edges

Member Function Documentation

◆ begin() [1/2]

Edge::iterator Edge::begin ( )
inline

Get the beginning of the vertex collection of the graph.

Returns
an iterator pointing to the beginning of the vertex collection

Definition at line 318 of file edge.h.

References carto::block< class, N >::begin().

◆ begin() [2/2]

Edge::const_iterator Edge::begin ( ) const
inline

Get the beginning of the vertex collection of the graph.

Returns
a const_iterator pointing to the beginning of the vertex collection

Definition at line 334 of file edge.h.

References carto::block< class, N >::begin().

◆ cloneEdge()

virtual Edge* Edge::cloneEdge ( ) const
protectedpure virtual

The programmer should not clone.

Returns
a copy of this edge
See also
Graph for creating edges

Implemented in UEdge, and DEdge.

◆ end() [1/2]

Edge::iterator Edge::end ( )
inline

Get the end of the vertex collection of the graph.

Returns
an iterator pointing to the end of the vertex collection

Definition at line 326 of file edge.h.

References carto::block< class, N >::end().

◆ end() [2/2]

Edge::const_iterator Edge::end ( ) const
inline

Get the end of the vertex collection of the graph.

Returns
a const_iterator pointing to the end of the vertex collection

Definition at line 342 of file edge.h.

References carto::block< class, N >::end().

◆ hasVertex()

bool Edge::hasVertex ( const Vertex vertex) const
inline

Does this edge contain a given vertex?

Parameters
vertexpointer to the vertex to check
Returns
true if the edge contains this vertex

Definition at line 310 of file edge.h.

◆ isDirected()

virtual bool Edge::isDirected ( ) const
pure virtual

Is this edge directed?

Implemented in UEdge, and DEdge.

◆ isUndirected()

virtual bool Edge::isUndirected ( ) const
pure virtual

Is this edge undirected?

Implemented in UEdge, and DEdge.

◆ rbegin() [1/2]

Edge::reverse_iterator Edge::rbegin ( )
inline

Get the beginning of the reversed vertex collection of the graph.

Returns
a reverse_iterator pointing to the beginning of the reversed vertex collection

Definition at line 350 of file edge.h.

References carto::block< class, N >::rbegin().

◆ rbegin() [2/2]

Edge::const_reverse_iterator Edge::rbegin ( ) const
inline

Get the beginning of the reversed vertex collection of the graph.

Returns
a const_reverse_iterator pointing to the beginning of the reversed vertex collection

Definition at line 366 of file edge.h.

References carto::block< class, N >::rbegin().

◆ rend() [1/2]

Edge::reverse_iterator Edge::rend ( )
inline

Get the end of the reversed vertex collection of the graph.

Returns
a reverse_iterator pointing to the end of the reversed vertex collection

Definition at line 358 of file edge.h.

References carto::block< class, N >::rend().

◆ rend() [2/2]

Edge::const_reverse_iterator Edge::rend ( ) const
inline

Get the end of the reversed vertex collection of the graph.

Returns
a const_reverse_iterator pointing to the end of the reversed vertex collection

Definition at line 374 of file edge.h.

References carto::block< class, N >::rend().

◆ type()

virtual std::string Edge::type ( ) const
inlinevirtual

Definition at line 210 of file edge.h.

◆ verticesSize()

size_t Edge::verticesSize ( ) const

number of vertices

Friends And Related Function Documentation

◆ Graph

friend class Graph
friend

export private method addVertices

Definition at line 243 of file edge.h.


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