Overview     Modules     Class Hierarchy     Classes     Members  
tlp::PropertyAlgorithm Class Reference

This base class describes plug-ins who only modify one property, e.g. selection. More...

#include <PropertyAlgorithm.h>

Inheritance diagram for tlp::PropertyAlgorithm:
Collaboration diagram for tlp::PropertyAlgorithm:

Public Member Functions

 PropertyAlgorithm (const tlp::PropertyContext &context)
 Builds a new plug-in that modifies a single property.
virtual ~PropertyAlgorithm ()
virtual bool run ()
 Runs the algorithm. It is a good practice to report progress through the PluginProgress, Even if your algorithm is very fast. Keep in mind that Tulip can handle very large graphs. The PluginProgress should also be used to report errors, if any.
virtual bool check (std::string &errorMessage)
 Checks whether the algorithm can ru on this Graph or not. If not, the reason why should be reported through the PluginProgress.
bool preservePropertyUpdates (PropertyInterface *prop)
- Public Member Functions inherited from tlp::WithParameter
const
tlp::ParameterDescriptionList
getParameters ()
 Retrieves the parameters.
template<typename T >
void addInParameter (const char *str, const char *inHelp=0, const char *inDefValue=0, bool isMandatory=true)
 Adds an IN parameter to the plug-in.
template<typename T >
void addOutParameter (const char *str, const char *inHelp=0, const char *inDefValue=0, bool isMandatory=true)
 Adds an OUT parameter to the plug-in.
template<typename T >
void addInOutParameter (const char *str, const char *inHelp=0, const char *inDefValue=0, bool isMandatory=true)
 Adds an INOUT parameter to the plug-in.
template<typename T >
void addParameter (const char *parameterName, const char *help=NULL, const char *defaultValue=NULL, bool isMandatory=true)
 Adds an IN parameter to the plug-in (deprecated)
- Public Member Functions inherited from tlp::WithDependency
std::list< DependencygetDependencies ()
 Gets the list of Dependencies of this plug-in.
template<typename Ty >
void addDependency (const char *name, const char *release)
 Adds a dependency upon another plug-in. The parameters should be null-terminated strings, or NULL.

Public Attributes

Graphgraph
PluginProgresspluginProgress
DataSetdataSet

Additional Inherited Members

- Protected Member Functions inherited from tlp::WithDependency
void addDependency (const char *factory, const char *name, const char *release)
 Adds a dependency upon another plug-in.
- Protected Attributes inherited from tlp::WithParameter
ParameterDescriptionList parameters
 The internal structure storing the parameters.
- Protected Attributes inherited from tlp::WithDependency
std::list< Dependencydependencies
 The inner list of dependencies.

Detailed Description

This base class describes plug-ins who only modify one property, e.g. selection.

Constructor & Destructor Documentation

tlp::PropertyAlgorithm::PropertyAlgorithm ( const tlp::PropertyContext context)
inline

Builds a new plug-in that modifies a single property.

Parameters
contextThe context containing the Graph and PropertyInterface this plug-in has access to,a s well as a PluginProgress.
virtual tlp::PropertyAlgorithm::~PropertyAlgorithm ( )
inlinevirtual

Member Function Documentation

virtual bool tlp::PropertyAlgorithm::check ( std::string &  errorMessage)
inlinevirtual

Checks whether the algorithm can ru on this Graph or not. If not, the reason why should be reported through the PluginProgress.

Parameters
errorMessageA string whose value will be modified to an error message, if the check fails.
Returns
bool Whether the plug-in can run on this Graph.
bool tlp::PropertyAlgorithm::preservePropertyUpdates ( PropertyInterface prop)
inline
virtual bool tlp::PropertyAlgorithm::run ( )
inlinevirtual

Runs the algorithm. It is a good practice to report progress through the PluginProgress, Even if your algorithm is very fast. Keep in mind that Tulip can handle very large graphs. The PluginProgress should also be used to report errors, if any.

Returns
bool Whether the algorithm execution was sucessfull or not.

Member Data Documentation

DataSet* tlp::PropertyAlgorithm::dataSet
Graph* tlp::PropertyAlgorithm::graph
PluginProgress* tlp::PropertyAlgorithm::pluginProgress


Tulip Software by LaBRI Visualization Team    2001 - 2012