Overview     Modules     Class Hierarchy     Classes     Members  
tlp::AbstractVectorProperty< vectType, eltType > Class Template Reference

#include <AbstractProperty.h>

Inheritance diagram for tlp::AbstractVectorProperty< vectType, eltType >:
Collaboration diagram for tlp::AbstractVectorProperty< vectType, eltType >:

List of all members.

Public Member Functions

 AbstractVectorProperty (Graph *, std::string name="")
void setNodeEltValue (const node n, unsigned int i, typename tlp::StoredType< typename eltType::RealType >::ReturnedConstValue v)
 Sets the value for node n, at index i, to v, and notify the observers of a modification.
tlp::StoredType< typename
eltType::RealType >
::ReturnedConstValue 
getNodeEltValue (const node n, unsigned int i) const
 Gets the value associated to node n, at index i.
void pushBackNodeEltValue (const node n, typename tlp::StoredType< typename eltType::RealType >::ReturnedConstValue v)
 Appends a new value at the end of the vector associated to node n, and notify the observers of a modification.
void popBackNodeEltValue (const node n)
 Removes the value at the end of the vector associated to node n, and notify the observers of a modification.
void resizeNodeValue (const node n, size_t size, typename eltType::RealType elt=eltType::defaultValue())
 Resizes the vector associated to node n, and notify the observers of a modification.
void setEdgeEltValue (const edge e, unsigned int i, typename tlp::StoredType< typename eltType::RealType >::ReturnedConstValue v)
 Sets the value for edge e, at index i, to v, and notify the observers of a modification.
tlp::StoredType< typename
eltType::RealType >
::ReturnedConstValue 
getEdgeEltValue (const edge n, unsigned int i) const
 Gets the value associated to edge e, at index i.
void pushBackEdgeEltValue (const edge e, typename tlp::StoredType< typename eltType::RealType >::ReturnedConstValue v)
 Appends a new value at the end of the vector associated to edge e, and notify the observers of a modification.
void popBackEdgeEltValue (const edge e)
 Removes the value at the end of the vector associated to edge e, and notify the observers of a modification.
void resizeEdgeValue (const edge e, size_t size, typename eltType::RealType elt=eltType::defaultValue())
 Resizes the vector associated to edge e, and notify the observers of a modification.
- Public Member Functions inherited from tlp::AbstractProperty< vectType, vectType >
 AbstractProperty (Graph *, std::string n="")
vectType::RealType getNodeDefaultValue () const
 Returns the default node value of the property.
vectType::RealType getEdgeDefaultValue () const
 Returns the default edge value of the property.
tlp::StoredType< typename
vectType::RealType >
::ReturnedConstValue 
getNodeValue (const node n) const
 Returns the value associated with the node n in this property. If there is no value, it returns the default ndoe value.
tlp::StoredType< typename
vectType::RealType >
::ReturnedConstValue 
getEdgeValue (const edge e) const
 Returns the value associated to the edge e in this property. If there is no value, it returns the default edge value.
virtual void setNodeValue (const node n, const typename vectType::RealType &v)
 Sets the value of a node and notify the observers of a modification.
virtual void setEdgeValue (const edge e, const typename vectType::RealType &v)
 Set the value of an edge and notify the observers of a modification.
virtual void setAllNodeValue (const typename vectType::RealType &v)
 Sets the value of all nodes and notify the observers.
virtual void setAllEdgeValue (const typename vectType::RealType &v)
 Sets the value of all edges and notify the observers.
virtual void erase (const node n)
 Resets the value of a node to the default value.
virtual void erase (const edge e)
 Resets the value of an edge to the default value.
virtual AbstractProperty
< vectType, vectType,
Algorithm > & 
operator= (AbstractProperty< vectType, vectType, Algorithm > &prop)
virtual std::string getNodeDefaultStringValue () const
virtual std::string getEdgeDefaultStringValue () const
virtual std::string getNodeStringValue (const node n) const
virtual std::string getEdgeStringValue (const edge e) const
virtual bool setNodeStringValue (const node inN, const std::string &inV)
virtual bool setEdgeStringValue (const edge inE, const std::string &inV)
virtual bool setAllNodeStringValue (const std::string &inV)
virtual bool setAllEdgeStringValue (const std::string &inV)
virtual tlp::Iterator< node > * getNonDefaultValuatedNodes (const Graph *g=NULL) const
 Returns an iterator on all nodes whose value is different from the default value. When the pointer to the graph is not NULL, only the nodes owned by this graph are returned by the iterator.
virtual tlp::Iterator< edge > * getNonDefaultValuatedEdges (const Graph *g=NULL) const
 Returns an iterator on all edges whose value is different from the default value. When the pointer to the graph is not NULL, only the edges owned by this graph are returned by the iterator.
virtual void copy (const node destination, const node source, PropertyInterface *property, bool ifNotDefault=false)
 Copies the value hold by a property on a node to another node on this property.
virtual void copy (const edge destination, const edge source, PropertyInterface *property, bool ifNotDefault=false)
 Copies the value hold by a property on an edge to another edge on this property.
virtual void copy (PropertyInterface *property)
 Copies the values hold by a property on this property.
virtual DataMemgetNodeDefaultDataMemValue () const
virtual DataMemgetEdgeDefaultDataMemValue () const
virtual DataMemgetNodeDataMemValue (const node n) const
virtual DataMemgetEdgeDataMemValue (const edge e) const
virtual DataMemgetNonDefaultDataMemValue (const node n) const
virtual DataMemgetNonDefaultDataMemValue (const edge e) const
virtual void setNodeDataMemValue (const node n, const DataMem *v)
virtual void setEdgeDataMemValue (const edge e, const DataMem *v)
virtual void setAllNodeDataMemValue (const DataMem *v)
virtual void setAllEdgeDataMemValue (const DataMem *v)
virtual void computeMetaValue (node n, Graph *sg, Graph *mg)
virtual void computeMetaValue (edge e, tlp::Iterator< edge > *itE, Graph *mg)
virtual void setMetaValueCalculator (PropertyInterface::MetaValueCalculator *mvCalc)
int compare (const node n1, const node n2) const
 Default implementation of PropertyInterface::compare(node n1,node n2)
int compare (const edge e1, const edge e2) const
 Default implementation of PropertyInterface::compare(edge e1,edge e2)
- Public Member Functions inherited from tlp::PropertyInterface
virtual ~PropertyInterface ()
virtual PropertyInterfaceclonePrototype (Graph *, const std::string &)=0
virtual std::string getTypename () const =0
const std::string & getName () const
tlp::GraphgetGraph ()
MetaValueCalculatorgetMetaValueCalculator ()
void addPropertyObserver (PropertyObserver *pObs)
void removePropertyObserver (PropertyObserver *pObs)
unsigned int countPropertyObservers () const
- Public Member Functions inherited from tlp::Observable
 Observable ()
_DEPRECATED Observable (bool)
virtual ~Observable ()
tlp::Iterator< Observable * > * getOnlookers () const
 return an Iterator on all Onlookers
tlp::Iterator< Observable * > * getObservables () const
virtual void treatEvents (const std::vector< Event > &events)
virtual void _DEPRECATED update (std::set< Observable * >::iterator, std::set< Observable * >::iterator)
virtual void _DEPRECATED observableDestroyed (Observable *)
virtual void treatEvent (const Event &)
void addObserver (Observable *const obs) const
 use for old observer tulip compatibility
void addListener (Observable *const obs) const
 use for old observer tulip compatibility
void removeOnlooker (const Observable &, OLOEDGETYPE type) const
 remove an Observer/Listener of the observable
void removeObserver (Observable *const obs) const
 use for old observer tulip compatibility
void removeListener (Observable *const obs) const
void _DEPRECATED notifyObservers ()
 use for old observer tulip compatibility
unsigned int countObservers () const
unsigned int countOnLookers () const
unsigned int countListeners () const
bool hasOnlookers () const
 remove all Observer/Listener of the observable
- Public Member Functions inherited from tlp::OLOObject
tlp::node getNode () const
 return the node representing that OLOObject in the OLOGraph
unsigned int getSent () const
 return the number of sent nofication
unsigned int getReceived () const
 return the number of received nofication

Additional Inherited Members

- Protected Member Functions inherited from tlp::AbstractProperty< vectType, vectType >
virtual void clone_handler (AbstractProperty< vectType, vectType, Algorithm > &)
 Enable to clone part of sub_class.
- Protected Member Functions inherited from tlp::PropertyInterface
void notifyBeforeSetNodeValue (const node n)
void notifyAfterSetNodeValue (const node n)
void notifyBeforeSetEdgeValue (const edge e)
void notifyAfterSetEdgeValue (const edge e)
void notifyBeforeSetAllNodeValue ()
void notifyAfterSetAllNodeValue ()
void notifyBeforeSetAllEdgeValue ()
void notifyAfterSetAllEdgeValue ()
void notifyDestroy ()
 use for old observer tulip compatibility
- Protected Member Functions inherited from tlp::Observable
void addOnlooker (const Observable &, OLOEDGETYPE type) const
 add an Observer/Listener to the observable
void sendEvent (const Event &)
 Enable to send an event to all Observer/Listener.
void observableDeleted ()
 Enable to send Event::DELETE before the deletion of subclass internal objects.
- Protected Member Functions inherited from tlp::OLOObject
 OLOObject ()
 OLOObject (const OLOObject &)
virtual ~OLOObject ()
OLOObjectoperator= (const OLOObject &)
tlp::Iterator< tlp::node > * getInObjects () const
 return an iterator on in objects (Observable), the iterator guarantee that all objects are alive (not deleted during hold or notify)
tlp::Iterator< tlp::node > * getOutObjects () const
 return an iterator on out objects (Listener/Observer), the iterator garantee that all objects are alive (not deleted during hold or notify)
- Protected Attributes inherited from tlp::AbstractProperty< vectType, vectType >
MutableContainer< typename
vectType::RealType > 
nodeProperties
MutableContainer< typename
vectType::RealType > 
edgeProperties
vectType::RealType nodeDefaultValue
vectType::RealType edgeDefaultValue
- Protected Attributes inherited from tlp::PropertyInterface
std::string name
Graphgraph
MetaValueCalculatormetaValueCalculator

Constructor & Destructor Documentation

template<typename vectType, typename eltType>
tlp::AbstractVectorProperty< vectType, eltType >::AbstractVectorProperty ( Graph ,
std::string  name = "" 
)

Member Function Documentation

template<typename vectType, typename eltType>
tlp::StoredType<typename eltType::RealType>::ReturnedConstValue tlp::AbstractVectorProperty< vectType, eltType >::getEdgeEltValue ( const edge  n,
unsigned int  i 
) const

Gets the value associated to edge e, at index i.

Parameters:
eThe edge to set a value of.
iThe index at which to set the value.
Returns:
const eltType& The value at index i in the vector for node n.
template<typename vectType, typename eltType>
tlp::StoredType<typename eltType::RealType>::ReturnedConstValue tlp::AbstractVectorProperty< vectType, eltType >::getNodeEltValue ( const node  n,
unsigned int  i 
) const

Gets the value associated to node n, at index i.

Parameters:
nThe node to set a value of.
iThe index at which to set the value.
Returns:
const eltType& The value at index i in the vector for node n.
template<typename vectType, typename eltType>
void tlp::AbstractVectorProperty< vectType, eltType >::popBackEdgeEltValue ( const edge  e)

Removes the value at the end of the vector associated to edge e, and notify the observers of a modification.

Parameters:
eThe edge to remove a value from.
Returns:
void
template<typename vectType, typename eltType>
void tlp::AbstractVectorProperty< vectType, eltType >::popBackNodeEltValue ( const node  n)

Removes the value at the end of the vector associated to node n, and notify the observers of a modification.

Parameters:
nThe node to remove a value from.
Returns:
void
template<typename vectType, typename eltType>
void tlp::AbstractVectorProperty< vectType, eltType >::pushBackEdgeEltValue ( const edge  e,
typename tlp::StoredType< typename eltType::RealType >::ReturnedConstValue  v 
)

Appends a new value at the end of the vector associated to edge e, and notify the observers of a modification.

Parameters:
eThe node to add a value to.
vThe value to append at the end of the vector.
Returns:
void
template<typename vectType, typename eltType>
void tlp::AbstractVectorProperty< vectType, eltType >::pushBackNodeEltValue ( const node  n,
typename tlp::StoredType< typename eltType::RealType >::ReturnedConstValue  v 
)

Appends a new value at the end of the vector associated to node n, and notify the observers of a modification.

Parameters:
nThe node to add a value to.
vThe value to append at the end of the vector.
Returns:
void
template<typename vectType, typename eltType>
void tlp::AbstractVectorProperty< vectType, eltType >::resizeEdgeValue ( const edge  e,
size_t  size,
typename eltType::RealType  elt = eltType::defaultValue() 
)

Resizes the vector associated to edge e, and notify the observers of a modification.

Parameters:
eThe edge associated to the vector to resize.
sizeThe new size of the vector.
eltThe default value to set at indices where there was no value before. Defaults to eltType().
Returns:
void
template<typename vectType, typename eltType>
void tlp::AbstractVectorProperty< vectType, eltType >::resizeNodeValue ( const node  n,
size_t  size,
typename eltType::RealType  elt = eltType::defaultValue() 
)

Resizes the vector associated to node n, and notify the observers of a modification.

Parameters:
nThe node associated to the vector to resize.
sizeThe new size of the vector.
eltThe default value to set at indices where there was no value before. Defaults to eltType().
Returns:
void
template<typename vectType, typename eltType>
void tlp::AbstractVectorProperty< vectType, eltType >::setEdgeEltValue ( const edge  e,
unsigned int  i,
typename tlp::StoredType< typename eltType::RealType >::ReturnedConstValue  v 
)

Sets the value for edge e, at index i, to v, and notify the observers of a modification.

Parameters:
eThe edge to set the value of.
iThe index at which the value should be set.
vThe value to set.
Returns:
void
template<typename vectType, typename eltType>
void tlp::AbstractVectorProperty< vectType, eltType >::setNodeEltValue ( const node  n,
unsigned int  i,
typename tlp::StoredType< typename eltType::RealType >::ReturnedConstValue  v 
)

Sets the value for node n, at index i, to v, and notify the observers of a modification.

Parameters:
nThe node to set a value of.
iThe index at which the value should be set.
vThe value to set.
Returns:
void


Tulip Software by LaBRI Visualization Team    2001 - 2012