23#include <tulip/tuliphash.h>
25#include <tulip/PropertyTypes.h>
26#include <tulip/AbstractProperty.h>
27#include <tulip/PropertyAlgorithm.h>
39class TLP_SCOPE SizeProperty :
public AbstractSizeProperty {
42 SizeProperty(Graph *,
const std::string &n =
"");
43 using AbstractSizeProperty::operator=;
45 Size getMax(
const Graph *sg =
nullptr);
46 Size getMin(
const Graph *sg =
nullptr);
47 void scale(
const tlp::Vector<float, 3> &,
const Graph *sg =
nullptr);
52 static const std::string propertyTypename;
54 return propertyTypename;
56 DEFINE_GET_CPP_CLASS_NAME;
59 void setNodeValue(
const node n,
60 tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v)
override;
61 void setAllNodeValue(tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v)
override;
62 void setValueToGraphNodes(tlp::StoredType<tlp::SizeType::RealType>::ReturnedConstValue v,
63 const Graph *graph)
override;
71 tlp_hash_map<unsigned int, Size> max, min;
72 tlp_hash_map<unsigned int, bool> minMaxOk;
73 void computeMinMax(
const Graph *sg =
nullptr);
80class TLP_SCOPE SizeVectorProperty
81 :
public AbstractVectorProperty<tlp::SizeVectorType, tlp::SizeType> {
83 SizeVectorProperty(
Graph *g,
const std::string &n =
"")
84 : AbstractVectorProperty<SizeVectorType, SizeType>(g, n) {}
85 using AbstractVectorProperty<tlp::SizeVectorType, tlp::SizeType>::operator=;
89 static const std::string propertyTypename;
91 return propertyTypename;
93 DEFINE_GET_CPP_CLASS_NAME;
This class extends upon PropertyInterface, and adds type-safe methods to get and set the node and edg...
PropertyInterface describes the interface of a graph property.
PropertyInterface * clonePrototype(Graph *, const std::string &) const override
Creates a property of the same type (e.g. tlp::DoubleProperty) in the graph. The new property will no...
int compare(const node n1, const node n2) const override
Compares the value this property holds for the two given nodes.
const std::string & getTypename() const override
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
const std::string & getTypename() const override
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
PropertyInterface * clonePrototype(Graph *, const std::string &) const override
Creates a property of the same type (e.g. tlp::DoubleProperty) in the graph. The new property will no...
Interface for Tulip iterators. Allows basic iteration operations only.
The node struct represents a node in a Graph object.