hpp::manipulation::graph::GraphComponent Class Reference

Define common methods of the graph components. More...

#include <hpp/manipulation/graph/graph-component.hh>

Inheritance diagram for hpp::manipulation::graph::GraphComponent:
Collaboration diagram for hpp::manipulation::graph::GraphComponent:

Public Member Functions

const std::string & name () const
 Get the component name. More...
 
void name (const std::string &name)
 Set the component name. More...
 
int id () const
 Return the component id. More...
 
virtual void addNumericalConstraint (const NumericalConstraintPtr_t &numConstraint, const SizeIntervals_t &passiveDofs=SizeIntervals_t())
 Add core::NumericalConstraint to the component. More...
 
virtual void addNumericalConstraint (const DifferentiableFunctionPtr_t &function, const ComparisonTypePtr_t &ineq) HPP_MANIPULATION_DEPRECATED
 Add core::DifferentiableFunction to the component. More...
 
virtual void addLockedJointConstraint (const LockedJointPtr_t &constraint)
 Add core::LockedJoint constraint to the component. More...
 
bool insertNumericalConstraints (ConfigProjectorPtr_t &proj) const
 Insert the numerical constraints in a ConfigProjector. More...
 
bool insertLockedJoints (ConfigProjectorPtr_t &cs) const
 Insert the LockedJoint constraints in a ConstraintSet. More...
 
const NumericalConstraints_tnumericalConstraints () const
 Get a reference to the NumericalConstraints_t. More...
 
const LockedJoints_tlockedJoints () const
 Get a reference to the LockedJoints_t. More...
 
void parentGraph (const GraphWkPtr_t &parent)
 Set the parent graph. More...
 
virtual std::ostream & dotPrint (std::ostream &os, dot::DrawingAttributes da=dot::DrawingAttributes()) const
 Print the component in DOT language. More...
 

Static Public Member Functions

static GraphComponentWkPtr_t get (int id)
 Get the component by its ID. More...
 

Protected Member Functions

void init (const GraphComponentWkPtr_t &weak)
 Initialize the component. More...
 
 GraphComponent ()
 
virtual std::ostream & print (std::ostream &os) const
 Print the object in a stream. More...
 
virtual void populateTooltip (dot::Tooltip &tp) const
 Populate DrawingAttributes tooltip. More...
 

Protected Attributes

NumericalConstraints_t numericalConstraints_
 Stores the numerical constraints. More...
 
std::vector< SizeIntervals_tpassiveDofs_
 Stores the passive dofs for each numerical constraints. More...
 
LockedJoints_t lockedJoints_
 List of LockedJoint constraints. More...
 
GraphWkPtr_t graph_
 A weak pointer to the parent graph. More...
 

Friends

std::ostream & operator<< (std::ostream &, const GraphComponent &)
 

Detailed Description

Define common methods of the graph components.

Constructor & Destructor Documentation

◆ GraphComponent()

hpp::manipulation::graph::GraphComponent::GraphComponent ( )
inlineprotected

Member Function Documentation

◆ addLockedJointConstraint()

virtual void hpp::manipulation::graph::GraphComponent::addLockedJointConstraint ( const LockedJointPtr_t constraint)
virtual

Add core::LockedJoint constraint to the component.

◆ addNumericalConstraint() [1/2]

virtual void hpp::manipulation::graph::GraphComponent::addNumericalConstraint ( const NumericalConstraintPtr_t numConstraint,
const SizeIntervals_t passiveDofs = SizeIntervals_t() 
)
virtual

Add core::NumericalConstraint to the component.

Parameters
passiveDofssee ConfigProjector::addNumericalConstraint

Reimplemented in hpp::manipulation::graph::NodeSelector.

◆ addNumericalConstraint() [2/2]

virtual void hpp::manipulation::graph::GraphComponent::addNumericalConstraint ( const DifferentiableFunctionPtr_t function,
const ComparisonTypePtr_t ineq 
)
virtual

Add core::DifferentiableFunction to the component.

◆ dotPrint()

virtual std::ostream& hpp::manipulation::graph::GraphComponent::dotPrint ( std::ostream &  os,
dot::DrawingAttributes  da = dot::DrawingAttributes() 
) const
virtual

◆ get()

static GraphComponentWkPtr_t hpp::manipulation::graph::GraphComponent::get ( int  id)
static

Get the component by its ID.

The validity of the GraphComponent is not checked.

◆ id()

int hpp::manipulation::graph::GraphComponent::id ( ) const

Return the component id.

◆ init()

void hpp::manipulation::graph::GraphComponent::init ( const GraphComponentWkPtr_t &  weak)
protected

Initialize the component.

◆ insertLockedJoints()

bool hpp::manipulation::graph::GraphComponent::insertLockedJoints ( ConfigProjectorPtr_t cs) const

Insert the LockedJoint constraints in a ConstraintSet.

Returns
true is at least one LockedJointPtr_t was inserted.

◆ insertNumericalConstraints()

bool hpp::manipulation::graph::GraphComponent::insertNumericalConstraints ( ConfigProjectorPtr_t proj) const

Insert the numerical constraints in a ConfigProjector.

Returns
true is at least one NumericalConstraintPtr_t was inserted.

◆ lockedJoints()

const LockedJoints_t& hpp::manipulation::graph::GraphComponent::lockedJoints ( ) const

Get a reference to the LockedJoints_t.

◆ name() [1/2]

const std::string& hpp::manipulation::graph::GraphComponent::name ( ) const

Get the component name.

◆ name() [2/2]

void hpp::manipulation::graph::GraphComponent::name ( const std::string &  name)

Set the component name.

◆ numericalConstraints()

const NumericalConstraints_t& hpp::manipulation::graph::GraphComponent::numericalConstraints ( ) const

Get a reference to the NumericalConstraints_t.

◆ parentGraph()

void hpp::manipulation::graph::GraphComponent::parentGraph ( const GraphWkPtr_t &  parent)

Set the parent graph.

◆ populateTooltip()

virtual void hpp::manipulation::graph::GraphComponent::populateTooltip ( dot::Tooltip tp) const
protectedvirtual

Populate DrawingAttributes tooltip.

Reimplemented in hpp::manipulation::graph::LevelSetEdge, and hpp::manipulation::graph::Node.

◆ print()

virtual std::ostream& hpp::manipulation::graph::GraphComponent::print ( std::ostream &  os) const
protectedvirtual

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const GraphComponent  
)
friend

Member Data Documentation

◆ graph_

GraphWkPtr_t hpp::manipulation::graph::GraphComponent::graph_
protected

A weak pointer to the parent graph.

◆ lockedJoints_

LockedJoints_t hpp::manipulation::graph::GraphComponent::lockedJoints_
protected

List of LockedJoint constraints.

◆ numericalConstraints_

NumericalConstraints_t hpp::manipulation::graph::GraphComponent::numericalConstraints_
protected

Stores the numerical constraints.

◆ passiveDofs_

std::vector<SizeIntervals_t> hpp::manipulation::graph::GraphComponent::passiveDofs_
protected

Stores the passive dofs for each numerical constraints.