# FoundationClasses
TKAdvTools
Expr

# Expr_PolyExpression Class Reference

`#include <Expr_PolyExpression.hxx>`

Inheritance diagram for Expr_PolyExpression:

[legend]

## Public Member Functions

Standard_EXPORT Standard_Integer | NbOperands () const
| returns the number of operands contained in <me>
const Handle_Expr_GeneralExpression & | Operand (const Standard_Integer index) const
| Returns the <index>-th operand used in <me>. An exception is raised if index is out of range .
Standard_EXPORT void | SetOperand (const Handle(Expr_GeneralExpression)&exp, const Standard_Integer index)
| Sets the <index>-th operand used in <me>. An exception is raised if <index> is out of range Raises InvalidOperand if <exp> contains <me>. .
Standard_EXPORT Standard_Integer | NbSubExpressions () const
| returns the number of sub-expressions contained in <me> ( >= 2)
Standard_EXPORT const Handle_Expr_GeneralExpression & | SubExpression (const Standard_Integer I) const
| Returns the sub-expression denoted by in <me> Raises OutOfRange if > NbSubExpressions(me) .
Standard_EXPORT Standard_Boolean | ContainsUnknowns () const
| Does <me> contains NamedUnknown ? .
Standard_EXPORT Standard_Boolean | Contains (const Handle(Expr_GeneralExpression)&exp) const
| Tests if <exp> is contained in <me>. .
Standard_EXPORT void | Replace (const Handle(Expr_NamedUnknown)&var, const Handle(Expr_GeneralExpression)&with)
| Replaces all occurences of with <with> in <me> Raises InvalidOperand if <with> contains <me>. .
Standard_EXPORT Handle_Expr_GeneralExpression | Simplified () const
| Returns a GeneralExpression after replacement of NamedUnknowns by an associated expression and after values computation. .
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Protected Member Functions

Standard_EXPORT | Expr_PolyExpression ()
| initialize an empty list of operands.
Standard_EXPORT void | AddOperand (const Handle(Expr_GeneralExpression)&exp)
| Adds an operand to the list of <me>. .
Standard_EXPORT void | RemoveOperand (const Standard_Integer index)
| Remove the operand denoted by <index> from the list of <me>. Raises exception if <index> is out of range or if removing operand intend to leave only one or no operand. .

## Private Attributes

Expr_SequenceOfGeneralExpression | myOperands

## Constructor & Destructor Documentation

Standard_EXPORT Expr_PolyExpression::Expr_PolyExpression | ( |  | ) | `[protected]`

## Member Function Documentation

Standard_EXPORT void Expr_PolyExpression::AddOperand | ( | const Handle(Expr_GeneralExpression)& | exp | ) | `[protected]`

Standard_EXPORT Standard_Boolean Expr_PolyExpression::Contains | ( | const Handle(Expr_GeneralExpression)& | exp | ) | const`[virtual]`

| Implements Expr_GeneralExpression.

Standard_EXPORT Standard_Boolean Expr_PolyExpression::ContainsUnknowns | ( |  | ) | const`[virtual]`

| Implements Expr_GeneralExpression.

Standard_EXPORT const Expr_PolyExpression::Handle | ( | Standard_Type |  | ) | const

| Reimplemented from Expr_GeneralExpression. Reimplemented in Expr_PolyFunction, Expr_Product, and Expr_Sum.

Standard_EXPORT Standard_Integer Expr_PolyExpression::NbOperands | ( |  | ) | const

Standard_EXPORT Standard_Integer Expr_PolyExpression::NbSubExpressions | ( |  | ) | const`[virtual]`

| Implements Expr_GeneralExpression.

const Handle_Expr_GeneralExpression& Expr_PolyExpression::Operand | ( | const Standard_Integer | index | ) | const

Standard_EXPORT void Expr_PolyExpression::RemoveOperand | ( | const Standard_Integer | index | ) | `[protected]`

Standard_EXPORT void Expr_PolyExpression::Replace | ( | const Handle(Expr_NamedUnknown)& | var,
|  | const Handle(Expr_GeneralExpression)& | with
| ) | `[virtual]`

| Implements Expr_GeneralExpression.

Standard_EXPORT void Expr_PolyExpression::SetOperand | ( | const Handle(Expr_GeneralExpression)& | exp,
|  | const Standard_Integer | index
| ) |

Standard_EXPORT Handle_Expr_GeneralExpression Expr_PolyExpression::Simplified | ( |  | ) | const`[virtual]`

| Implements Expr_GeneralExpression.

Standard_EXPORT const Handle_Expr_GeneralExpression& Expr_PolyExpression::SubExpression | ( | const Standard_Integer | I | ) | const`[virtual]`

| Implements Expr_GeneralExpression.

## Field Documentation

Expr_SequenceOfGeneralExpression Expr_PolyExpression::myOperands `[private]`

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

- Expr_PolyExpression.hxx