Acoustic Research Tool (ART)  v0.10
ARTItimeModule::FPortType Class Reference

This class represents an input function or lookup table.

It is mainly used as inputs for simulations. For example, the transfer function of an instrument can be saved in the function port of a module. Another module with a convolution function may just refer to two output ports from which one is a function port saving the transfer function. It has the same interface as the OPortType class, but uses an array instead of the resizable ring buffer in order to save the values. A function port is usually only initialized before the simulation starts and not changed later.

Inheritance diagram for ARTItimeModule::FPortType:
ARTItimeModule::OPortType ARTItimeModule::PortType ARTItimeModule::timeProperty ARTdataProp ARTproperty ARTdataContainer ARTcell

Public Member Functions

 FPortType (const int dlen, const string &name, const string sds="", const string lds="", const string htm="")
 Constructor of the FPortType class.
virtual IValue & operator[] (std::size_t idx)
 Returns the value saved at the given index.
virtual IValue & operator[] (int idx)
 Returns the value saved at the given index.
virtual ~FPortType ()
 Destructor of the FPortType class.
- Public Member Functions inherited from ARTItimeModule::OPortType
 OPortType (const T_ART_Type dtyp, const int dlen, const string &name, const string sds="", const string lds="", const string htm="")
 Constructor of the OPortType class.
virtual void initPortValue (const string &expr) const
 Initializes a past time sample of the port with a given value.
virtual void initPortValue (double value, int idx) const
 Initializes a past time sample of the port with a given value.
virtual void initPortValue (std::complex< double > &value, int idx) const
 Initializes a past time sample of the port with a given value.
virtual ~OPortType ()
 Destructor of the OPortType class.
- Public Member Functions inherited from ARTItimeModule::PortType
 PortType (const T_ART_Type dtyp, const int dlen, const string &name, const string sds="", const string lds="", const string htm="")
 Constructor of the PortType class.
virtual ~PortType ()
 Destructor of the PortType class.
- Public Member Functions inherited from ARTItimeModule::timeProperty
 timeProperty (const T_ART_Type dtyp, const int dlen, const string &name, const string sds="", const string lds="", const string htm="")
 Constructor of the timeProperty class.
virtual ~timeProperty ()
 Destructor of the timeProperty class.
- Public Member Functions inherited from ARTdataProp
 ARTdataProp (const T_ART_Type dtyp, const int dlen, const string name, const string sds="", const string lds="", const string htm="")
 ARTdataProp (const ARTdataProp &orig)
 copy constructor
ARTvariant * GetRange ()
void SetRange (ARTvariant *r)
virtual ARTcellclone ()
- Public Member Functions inherited from ARTproperty
 ARTproperty (const string name, const string sds="", const string lds="", const string htm="", const bool listable=false)
 ARTproperty (const ARTproperty &orig)
bool IsListable ()
- Public Member Functions inherited from ARTcell
 ARTcell (const string name="", const string sds="", const string lds="", const string htm="")
 ARTcell (const ARTcell &orig)
const string & GetName () const
const string & GetShortDescription () const
const string & GetLongDescription () const
const string & GetHelpFilename () const
void SetName (const string name)
- Public Member Functions inherited from ARTdataContainer
void EvaluateIfInvalid ()
void DebugDepTree (const string intend, const string linebreak="\n")
 Just for debugging: to print the dependency tree...
string WriteDepTree (const string intend, const string linebreak="\n")
 ARTdataContainer ()
 default constructor
 ARTdataContainer (const T_ART_Type dtyp, const int dlen, const string varname="")
 ARTdataContainer (std::string name, ARTfunctionoid *func=NULL)
 ARTdataContainer (const int i)
 ARTdataContainer (const double d)
 ARTdataContainer (const float f)
 ARTdataContainer (const char *s)
 ARTdataContainer (const char *s1, const char *s2)
 ARTdataContainer (const char *s1, const char *s2, const char *s3)
 ARTdataContainer (const char *s1, const char *s2, const char *s3, const char *s4)
 ARTdataContainer (const ARTdataContainer &orig)
 copy constructor
T_ART_Type GetDatatype ()
int GetCount ()
int GetIterationNumber ()
double GetComplexity ()
 This function is not used right now.
T_ART_Var * GetValue ()
bool IsValid ()
int GetInt ()
const string & GetDefinition ()
void SetValue (ARTvariant *var)
 direct change of data value (ignore definition string); set value pointer and force value to be valid.
virtual void SetVal (const int i, const int ind=0)
virtual void SetVal (const double d, const int ind=0)
virtual void SetVal (const float f, const int ind=0)
virtual void SetVal (std::complex< double >, const int ind=0)
virtual void SetVal (const double re, const double im, const int ind=0)
virtual void SetVal (const char *s)
virtual void SetVal (const char *s, int ind)
void Invalidate ()
 mark value as invalid and invalidate all dependent data containers
void NotifyClients ()
 invalidate all dependent data containers
int GetEvaluationCost ()
void AddDependency (ARTdataContainer *dependency)
 Observe AND be notified.
void RemoveAllDependencies ()
void AddPropertiesAsDependency (ARTobject *obj)
 Add all data properties of the ARTobject pointed to by obj as dependencies.
void DoNotNotify (ARTdataContainer *client)
void RemoveDependency (ARTdataContainer *dependency)
void RemoveFromDefinition (ARTdataContainer *dependency)
void SetParser (ParserX *p)
virtual ParserX * GetParser ()
virtual ARTdataContainerGetParent ()
void Rename (const string &newname)
void SetParserVar (const string &varname)
virtual const Variable & GetParserVar () const
virtual const Variable & GetParserVar ()
void DestroyParserVar ()
string GetVarName () const
void SetDefinition (const string &s, ARTsimulator *scope)
void SetDefinition (const string &s)
void RedoDefinitionDependencies ()
void ResetEvaluation ()
 This function sets the flags of this data container and all dependencies to the value indicating that no evaluation is taking place.
void SetScope (ARTsimulator *sim)
ARTsimulatorGetScope ()
void SetFunction (ARTfunctionoid *func)
string DebugInfo ()
list< ARTdataContainer * > GetClientList ()
bool CheckValidity ()
ARTdataContainerGetArrayElement (int idx)
void SetCurrentIndex (int idx)
void SetParentModuleName (const string &name)
const string & GetParentModuleName () const
void deleteVar ()
 Array constructor.
virtual IValue & operator= (int_type a_iVal)
virtual IValue & operator= (float_type a_fVal)
virtual IValue & operator= (string_type a_sVal)
virtual IValue & operator= (bool val)
virtual IValue & operator= (const array_type &a_vVal)
virtual IValue & operator= (const cmplx_type &val)
virtual IValue & operator= (const char_type *a_szVal)
virtual char_type GetType () const
virtual float_type GetFloat () const
virtual float_type GetImag () const
virtual bool GetBool () const
virtual const cmplx_type & GetComplex () const
virtual const string_type & GetString () const
virtual const array_type & GetArray () const
virtual bool IsVolatile () const
virtual IToken * Clone () const
virtual Value * AsValue ()
virtual IValue * AsIValue ()

Additional Inherited Members

- Static Public Attributes inherited from ARTdataContainer
static ARTprogressIndicator progressIndicator = ARTprogressIndicator(NULL,0)
- Protected Member Functions inherited from ARTdataContainer
void SetCountedFlag (bool b)
 Description.
virtual int EvaluationCost ()
virtual void Evaluate () const
void AddNotify (ARTdataContainer *client)
 Add a new client to this dataContainer.
virtual void resizeArray (int newSize)
 Resizes the used array in case the current data container is of type C_ART_na.
- Protected Attributes inherited from ARTcell
string name_
 Identifier of ARTObject.
string shortDesc_
 Short Description of ARTObject (single line hint)
string longDesc_
 Long Description of ARTObject (multi line text)
string helpFile_
 File name of HTML help file for ARTObject.
- Protected Attributes inherited from ARTdataContainer
bool valid_
 true if value is consistent with definition
bool counted_
bool eval_started
ARTfunctionoidfunc_
list< ARTdataContainer * > clientList_
 other dataContainers depending on this one (need invalidation when value changes)
list< ARTdataContainer * >
::iterator 
citer_
list< ARTdataContainer * > dependencyList_
 other dataContainers this one depends on (variables in expression): need lookup whenever value is evaluated
list< ARTdataContainer * >
::iterator 
diter_
ARTdataContainerparentContainer_
string definition_
 textual representation of property value (symbolic expression)
ParserX * parser_
 expression parser instance
ARTsimulatorscope_
 scope of variable names
string varname_
 name of corresponding variable in parser
mup::ARTValue * aval_
mup::Variable * avar_
bool parserVarDefined_
string tempDef_
string parentModuleName_

Constructor & Destructor Documentation

ARTItimeModule::FPortType::FPortType ( const int  dlen,
const string &  name,
const string  sds = "",
const string  lds = "",
const string  htm = "" 
)

Constructor of the FPortType class.

Parameters
[in]dlenDefines the size/array length of the port.
[in]nameRepresents the locally unique identifier of the port.
[in]sdsShort description (single line) of the port.
[in]ldsLong description of the port.
[in]htmPath to help file in HTML format.

Member Function Documentation

IValue & ARTItimeModule::FPortType::operator[] ( std::size_t  idx)
virtual

Returns the value saved at the given index.

Overrides the same method of the ARTdataContainer class as it internally uses an array instead of a ring buffer to save all elements.

Parameters
[in]idxThe index of the element which shall be returned.

Reimplemented from ARTdataContainer.

IValue & ARTItimeModule::FPortType::operator[] ( int  idx)
virtual

Returns the value saved at the given index.

Overrides the same method of the ARTdataContainer class as it internally uses an array instead of a ring buffer to save all elements.

Parameters
[in]idxThe index of the element which shall be returned.

Reimplemented from ARTdataContainer.