11 #ifndef BIOPROCESSING_GRAPH_POINTVERTEX
12 #define BIOPROCESSING_GRAPH_POINTVERTEX
17 #include <cartobase/smart/rcptr.h>
23 template <
typename P>
class PointVertex;
24 template <
typename P>
class PointVertexRef;
65 if(
typeid(other) !=
typeid(*
this) )
67 return _point == ( (
const This &)other )._point;
75 if(
typeid(other) !=
typeid(*
this) )
78 for(
int i =
_point.size()-1; i >= 0; --i )
89 if(
operator>( other ) ||
operator==( other ) )
95 if(
operator<( other ) ||
operator==( other ) )
101 if(
operator>( other ) ||
operator==( other ) )
121 template <
typename P>
124 os <<
"V{ " << v.
point() <<
" }";
137 template <
typename P>
176 if( !(*
this) && !other )
178 else if( !(*
this) || !other )
185 return !( *
this == other );
191 else if( !(*
this) || !other )
200 else if( !(*
this) || !other )
207 return ( *
this == other ) || ( *
this > other );
211 return ( *
this == other ) || ( *
this < other );
230 template <
typename P>
Reference counting pointer to a BaseVertex.
carto::rc_ptr< BaseVertex > Base
Base class type.
Reference counting pointer to a PointVertex.
virtual bool operator==(const This &other) const
There is equality if both pointers are none, or if both pointed objects are equal.
Point & point()
non constant accessor to the coordinates
virtual bool operator>(const This &other) const
PointVertexRef(const Point &p)
Constructor from coordinates.
BaseVertexRef Base
Base class (rc_ptr)
PointVertexRef(Pointed *v)
Constructor from a pointer (the pointer should either be created by new, or be already referenced by ...
virtual bool operator>=(const This &other) const
virtual bool operator!=(const This &other) const
PointVertexRef< P > This
Type of *this.
static Vertex none()
Empty pointer factory.
virtual bool operator<=(const This &other) const
Pointed::Point Point
Point.
virtual ~PointVertexRef()
Pointed::Vertex Vertex
Useable type (RC)
PointVertexRef(const Base &other)
Copy constructor (it copies the reference, it does not duplicate the pointed object)
virtual bool operator<(const This &other) const
const Point & point() const
constant accessor to the coordinates
PointVertex< P > Pointed
Pointed object type.
PointVertexRef()
Default constructor (creates an empty pointer)
Coordinates-defined vertices.
BaseVertex Base
Base class.
virtual bool operator!=(const This &other) const
virtual bool operator<(const This &other) const
virtual bool operator>=(const This &other) const
PointVertex(const Point &p)
Constructor from coordiantes.
const Point & point() const
constant accessor to the coordinates
PointVertex< P > This
Type of *this.
PointVertex(const This &other)
Copy constructor.
PointVertexRef< P > Ref
Reference type.
Point & point()
non constant accessor to the coordinates
virtual bool operator==(const This &other) const
PointVertexRef< P > Vertex
Useable type (RC type)
virtual bool operator<=(const This &other) const
virtual bool operator>(const This &other) const
std::ostream & operator<<(std::ostream &os, const bio::PointVertex< P > &v)
Print of a PointVertex.