SeExpr
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
EditableExpression Class Reference

Factors a SeExpr into an editable expression with controls (i.e. value boxes, curve boxes) More...

#include <EditableExpression.h>

Public Member Functions

 EditableExpression ()
 
 ~EditableExpression ()
 
void setExpr (const std::string &expr)
 Set's expressions and parses it into "control editable form". More...
 
std::string getEditedExpr () const
 Return a reconstructed expression using all the editable's current values. More...
 
bool controlsMatch (const EditableExpression &other) const
 Check if the other editable expression has editables that all match i.e. the controls are same. More...
 
void updateString (const EditableExpression &other)
 Update the string refered to into the controls (this is only valid if controlsmatch) More...
 
Editableoperator[] (const int i)
 Access an editable parameter. More...
 
size_t size () const
 Return the count of editable parameters. More...
 
const std::vector< std::string > & getVariables () const
 Get list of commentsø More...
 

Private Types

typedef std::vector< Editable * > Editables
 

Private Member Functions

void cleanup ()
 clean memeory More...
 

Private Attributes

std::string _expr
 
std::vector< Editable * > _editables
 
std::vector< std::string > _variables
 

Detailed Description

Factors a SeExpr into an editable expression with controls (i.e. value boxes, curve boxes)

Definition at line 29 of file EditableExpression.h.

Member Typedef Documentation

typedef std::vector<Editable*> EditableExpression::Editables
private

Definition at line 31 of file EditableExpression.h.

Constructor & Destructor Documentation

EditableExpression::EditableExpression ( )

Definition at line 25 of file EditableExpression.cpp.

EditableExpression::~EditableExpression ( )

Definition at line 28 of file EditableExpression.cpp.

References cleanup().

Member Function Documentation

void EditableExpression::cleanup ( )
private

clean memeory

Definition at line 68 of file EditableExpression.cpp.

References _editables, and _variables.

Referenced by setExpr(), and ~EditableExpression().

bool EditableExpression::controlsMatch ( const EditableExpression other) const

Check if the other editable expression has editables that all match i.e. the controls are same.

Definition at line 104 of file EditableExpression.cpp.

References _editables, and Editable::controlsMatch().

Referenced by ExprControlCollection::rebuildControls().

std::string EditableExpression::getEditedExpr ( ) const

Return a reconstructed expression using all the editable's current values.

Definition at line 76 of file EditableExpression.cpp.

References _editables, _expr, Editable::appendString(), Editable::endPos, and Editable::startPos.

Referenced by ExprControlCollection::updateText().

const std::vector<std::string>& EditableExpression::getVariables ( ) const
inline

Get list of commentsø

Definition at line 57 of file EditableExpression.h.

References _variables.

Referenced by ExprControlCollection::rebuildControls().

Editable* EditableExpression::operator[] ( const int  i)
inline

Access an editable parameter.

Definition at line 51 of file EditableExpression.h.

References _editables.

void EditableExpression::setExpr ( const std::string &  expr)

Set's expressions and parses it into "control editable form".

Definition at line 34 of file EditableExpression.cpp.

References _editables, _expr, _variables, cleanup(), Editable::endPos, expr(), ExprSpecParse(), it, and Editable::parseComment().

Referenced by ExprControlCollection::rebuildControls().

size_t EditableExpression::size ( ) const
inline

Return the count of editable parameters.

Definition at line 54 of file EditableExpression.h.

References _editables.

Referenced by ExprControlCollection::rebuildControls().

void EditableExpression::updateString ( const EditableExpression other)

Update the string refered to into the controls (this is only valid if controlsmatch)

Definition at line 90 of file EditableExpression.cpp.

References _editables, _expr, _variables, Editable::controlsMatch(), and Editable::updatePositions().

Referenced by ExprControlCollection::rebuildControls().

Member Data Documentation

std::vector<Editable*> EditableExpression::_editables
private
std::string EditableExpression::_expr
private

Definition at line 30 of file EditableExpression.h.

Referenced by getEditedExpr(), setExpr(), and updateString().

std::vector<std::string> EditableExpression::_variables
private

Definition at line 33 of file EditableExpression.h.

Referenced by cleanup(), getVariables(), setExpr(), and updateString().


The documentation for this class was generated from the following files: