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...
Editable * | operator[] (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

## ◆ Editables

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

Definition at line 31 of file EditableExpression.h.

## Constructor & Destructor Documentation

## ◆ EditableExpression()

EditableExpression::EditableExpression | ( |  | ) |

Definition at line 26 of file EditableExpression.cpp.

## ◆ ~EditableExpression()

EditableExpression::~EditableExpression | ( |  | ) |

Definition at line 28 of file EditableExpression.cpp.

References cleanup().

## Member Function Documentation

## ◆ cleanup()

void EditableExpression::cleanup | ( |  | ) |
| private

clean memeory

Definition at line 63 of file EditableExpression.cpp.

References _editables, and _variables.

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

## ◆ controlsMatch()

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 95 of file EditableExpression.cpp.

References _editables, and Editable::controlsMatch().

Referenced by ExprControlCollection::rebuildControls().

## ◆ getEditedExpr()

std::string EditableExpression::getEditedExpr | ( |  | ) | const

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

Definition at line 69 of file EditableExpression.cpp.

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

Referenced by ExprControlCollection::updateText().

## ◆ getVariables()

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

Get list of commentsø

Definition at line 58 of file EditableExpression.h.

References _variables.

Referenced by ExprControlCollection::rebuildControls().

## ◆ operator[]()

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

Access an editable parameter.

Definition at line 52 of file EditableExpression.h.

References _editables.

## ◆ setExpr()

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

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

Definition at line 30 of file EditableExpression.cpp.

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

Referenced by ExprControlCollection::rebuildControls().

## ◆ size()

size_t EditableExpression::size | ( |  | ) | const
| inline

Return the count of editable parameters.

Definition at line 55 of file EditableExpression.h.

References _editables.

Referenced by ExprControlCollection::rebuildControls().

## ◆ updateString()

void EditableExpression::updateString | ( | const EditableExpression & | other | ) |

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

Definition at line 82 of file EditableExpression.cpp.

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

Referenced by ExprControlCollection::rebuildControls().

## Member Data Documentation

## ◆ _editables

std::vector<Editable*> EditableExpression::_editables
| private

Definition at line 32 of file EditableExpression.h.

Referenced by cleanup(), controlsMatch(), getEditedExpr(), operator[](), setExpr(), size(), and updateString().

## ◆ _expr

std::string EditableExpression::_expr
| private

Definition at line 30 of file EditableExpression.h.

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

## ◆ _variables

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:

- /build/seexpr/src/SeExpr/src/SeExpr2/UI/EditableExpression.h
- /build/seexpr/src/SeExpr/src/SeExpr2/UI/EditableExpression.cpp