Public Member Functions | Protected Member Functions | Protected Attributes | Friends | Related Functions
bgrl_edge Class Reference

Directed edge from one vertex to another. More...

#include <bgrl_edge.h>

Inheritance diagram for bgrl_edge:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 bgrl_edge ()
 bgrl_edge (bgrl_edge const &e)
virtual ~bgrl_edge ()
bgrl_vertex_sptr from () const
 Smart pointer to the vertex where this edge originates.
bgrl_vertex_sptr to () const
 Smart pointer to the vertex where this edge ends.
virtual vcl_string is_a () const
 Return a platform independent string identifying the class.
virtual bgrl_edgeclone () const
 Create a copy of the object on the heap.
void b_write (vsl_b_ostream &os) const
 Binary save self to stream.
void b_read (vsl_b_istream &is)
 Binary load self from stream.
void print_summary (vcl_ostream &os) const
 Print an ascii summary to the stream.
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Protected Member Functions

virtual void init ()
 initialize the edge.

Protected Attributes

bgrl_vertexfrom_
 The starting vertex.
bgrl_vertexto_
 The ending vertex.

Friends

class bgrl_vertex
class bgrl_graph

Related Functions

(Note that these are not member functions.)

void vsl_print_summary (vcl_ostream &os, const bgrl_edge *e)
 Print an ASCII summary to the stream.

Detailed Description

Directed edge from one vertex to another.

Definition at line 24 of file bgrl_edge.h.


Constructor & Destructor Documentation

bgrl_edge::bgrl_edge ( ) [inline]

Definition at line 31 of file bgrl_edge.h.

bgrl_edge::bgrl_edge ( bgrl_edge const &  e) [inline]

Definition at line 33 of file bgrl_edge.h.

virtual bgrl_edge::~bgrl_edge ( ) [inline, virtual]

Definition at line 35 of file bgrl_edge.h.


Member Function Documentation

void bgrl_edge::b_read ( vsl_b_istream is)

Binary load self from stream.

Binary load bgrl_edge from stream.

Definition at line 38 of file bgrl_edge.cxx.

void bgrl_edge::b_write ( vsl_b_ostream os) const

Binary save self to stream.

Binary save bgrl_edge to stream.

Definition at line 28 of file bgrl_edge.cxx.

bgrl_edge * bgrl_edge::clone ( ) const [virtual]

Create a copy of the object on the heap.

The caller is responsible for deletion

Definition at line 20 of file bgrl_edge.cxx.

bgrl_vertex_sptr bgrl_edge::from ( ) const [inline]

Smart pointer to the vertex where this edge originates.

Definition at line 38 of file bgrl_edge.h.

virtual void bgrl_edge::init ( ) [inline, protected, virtual]

initialize the edge.

Definition at line 61 of file bgrl_edge.h.

vcl_string bgrl_edge::is_a ( ) const [virtual]

Return a platform independent string identifying the class.

Definition at line 11 of file bgrl_edge.cxx.

void bgrl_edge::print_summary ( vcl_ostream &  os) const

Print an ascii summary to the stream.

Definition at line 48 of file bgrl_edge.cxx.

bgrl_vertex_sptr bgrl_edge::to ( ) const [inline]

Smart pointer to the vertex where this edge ends.

Definition at line 41 of file bgrl_edge.h.


Friends And Related Function Documentation

friend class bgrl_graph [friend]

Definition at line 28 of file bgrl_edge.h.

friend class bgrl_vertex [friend]

Definition at line 27 of file bgrl_edge.h.

void vsl_print_summary ( vcl_ostream &  os,
const bgrl_edge e 
) [related]

Print an ASCII summary to the stream.

Definition at line 77 of file bgrl_edge.cxx.


Member Data Documentation

The starting vertex.

Note:
This must not be a smart pointer to prevent memory leaks

Definition at line 69 of file bgrl_edge.h.

The ending vertex.

Note:
This must not be a smart pointer to prevent memory leaks

Definition at line 72 of file bgrl_edge.h.


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