COVISE Core
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
covise::coColorParam Class Reference

Multiple float parameters. More...

#include <coColorParam.h>

Inheritance diagram for covise::coColorParam:
Inheritance graph
[legend]
Collaboration diagram for covise::coColorParam:
Collaboration graph
[legend]

Public Member Functions

 coColorParam (const char *name, const char *desc)
 Constructor. More...
 
virtual ~coColorParam ()
 Destructor : virtual in case we derive objects. More...
 
virtual int isOfType (coUifPara::Typeinfo type)
 Check the type. More...
 
virtual int paramChange ()
 handle parameter changes: called by paramCB More...
 
virtual void initialize ()
 give dafault values to Covise -> automatically called ! More...
 
virtual void print (ostream &str) const
 print this to a stream More...
 
int setValue (float r, float g, float b, float a)
 set for data More...
 
float getValue (int c) const
 get the value of a single color component More...
 
int getValue (float &r, float &g, float &b, float &a) const
 get the value : return 0 on errror, 1 on success More...
 
virtual const char * getTypeString () const
 get the type string of this parameter More...
 
virtual const char * getValString () const
 get the value of this parameter as a string More...
 
virtual void setValString (const char *str)
 set the value of this parameter from a string More...
 
- Public Member Functions inherited from covise::coUifPara
 coUifPara (const char *name, const char *desc)
 
virtual ~coUifPara ()
 Destructor. More...
 
virtual void setActive (int isActive)
 activate / de_activate the parameter More...
 
virtual void hide ()
 Hide this port. More...
 
virtual void show ()
 Show this port. More...
 
virtual int paramChange ()=0
 handle parameter changes: called by paramCB More...
 
virtual int preCompute ()
 do whatever needed before compute CB : enforce that all parameters do sth. More...
 
virtual void initialize ()=0
 give all necessary info to Covise -> automatically called ! More...
 
virtual void print (ostream &str) const
 print this to a stream: overloaded, but called by derived classes More...
 
virtual int switchable () const
 whether this port can be switched: default is true, overload for false More...
 
virtual int isOfType (coUifPara::Typeinfo type)=0
 check whether this parameter port has a certain type More...
 
virtual void enable ()
 enable More...
 
virtual void disable ()
 disable More...
 
virtual Kind kind () const
 return my type of element: returns coUifElem::PARAM More...
 
int isActive () const
 check whether this port is active More...
 
void para_error (const char *what)
 send an error message strarting with "Parameter '<name>' " More...
 
virtual const char * getTypeString () const =0
 get the type string of this parameter More...
 
virtual const char * getValString () const =0
 get the value of this parameter as a string More...
 
virtual void setValString (const char *str)=0
 set the value of this parameter from a string More...
 
- Public Member Functions inherited from covise::coPort
 coPort (const char *name, const char *desc)
 
virtual ~coPort ()
 Destructor : virtual in case we derive objects. More...
 
virtual void initialize ()=0
 give all necessary info to Covise -> automatically called ! More...
 
virtual void print (ostream &str) const =0
 print *this to a stream More...
 
virtual const char * getName () const
 get the name of this object More...
 
virtual const char * getDesc () const
 get the description of this object More...
 
virtual Kind kind () const =0
 return my type of element: coUifElem::{INPORT,OUTPORT,SWITCH,PARAM} More...
 
int isConnected () const
 Return whether this port is connected -> valid only in compute() More...
 
void setInfo (const char *value) const
 Set the info Popup text. More...
 
- Public Member Functions inherited from covise::coUifElem
virtual ~coUifElem ()
 Destructor : virtual because we derive objects. More...
 
virtual void hide ()
 Hide everything below. More...
 
virtual void show ()
 Show everything below. More...
 
virtual Kind kind () const =0
 return my type of element More...
 
virtual const char * getName () const =0
 get the name of this object More...
 
virtual void initialize ()=0
 give all necessary info to Covise -> automatically called by coModule in init() More...
 
virtual int switchable () const
 whether this may be a part of a switch group More...
 
virtual int paramChange ()
 handle parameter changes: called by paramCB More...
 
virtual int preCompute ()
 do whatever is needed before compute CB : pre-set to do nothing More...
 
virtual int postCompute ()
 do whatever is needed after compute CB : pre-set to do nothing More...
 

Static Public Member Functions

static coUifPara::Typeinfo getType ()
 get my type More...
 

Private Member Functions

 coColorParam (const coColorParam &)
 Copy-Constructor: NOT IMPLEMENTED. More...
 
coColorParamoperator= (const coColorParam &)
 Assignment operator: NOT IMPLEMENTED. More...
 
 coColorParam ()
 Default constructor: NOT IMPLEMENTED. More...
 

Private Attributes

float d_value [4]
 Port data fields. More...
 

Static Private Attributes

static coUifPara::Typeinfo s_paraType = coUifPara::numericType("COLOR")
 my type info More...
 
static const char * s_type = "COLOR"
 

Additional Inherited Members

- Public Types inherited from covise::coUifPara
typedef int Typeinfo
 
- Public Types inherited from covise::coUifElem
enum  Kind { SWITCH , PARAM , INPORT , OUTPORT }
 enum Kind: SWITCH, PARAM, INPORT, OUTPORT More...
 
- Protected Types inherited from covise::coPort
typedef int Typeinfo
 
- Static Protected Member Functions inherited from covise::coUifPara
static Typeinfo numericType (const char *typeStr)
 
- Protected Attributes inherited from covise::coUifPara
int d_active
 
- Protected Attributes inherited from covise::coPort
char * d_name
 
char * d_desc
 
char * d_defString
 
int d_init
 

Detailed Description

Multiple float parameters.

Constructor & Destructor Documentation

◆ coColorParam() [1/3]

covise::coColorParam::coColorParam ( const coColorParam )
private

Copy-Constructor: NOT IMPLEMENTED.

◆ coColorParam() [2/3]

covise::coColorParam::coColorParam ( )
private

Default constructor: NOT IMPLEMENTED.

◆ coColorParam() [3/3]

coColorParam::coColorParam ( const char *  name,
const char *  desc 
)

Constructor.

Constructor

◆ ~coColorParam()

coColorParam::~coColorParam ( )
virtual

Destructor : virtual in case we derive objects.

Destructor : virtual in case we derive objects

Member Function Documentation

◆ getType()

coUifPara::Typeinfo coColorParam::getType ( )
static

get my type

get my type

◆ getTypeString()

const char * coColorParam::getTypeString ( ) const
virtual

get the type string of this parameter

get the type string of this parameter

Implements covise::coUifPara.

◆ getValString()

const char * coColorParam::getValString ( ) const
virtual

get the value of this parameter as a string

get the value of this parameter as a string

Implements covise::coUifPara.

◆ getValue() [1/2]

int coColorParam::getValue ( float &  r,
float &  g,
float &  b,
float &  a 
) const

get the value : return 0 on errror, 1 on success

◆ getValue() [2/2]

float coColorParam::getValue ( int  c) const

get the value of a single color component

get the value

◆ initialize()

void coColorParam::initialize ( )
virtual

give dafault values to Covise -> automatically called !

give dafault values to Covise -> automatically called !

Implements covise::coUifPara.

◆ isOfType()

int coColorParam::isOfType ( coUifPara::Typeinfo  type)
virtual

Check the type.

Check the type

Implements covise::coUifPara.

◆ operator=()

coColorParam & covise::coColorParam::operator= ( const coColorParam )
private

Assignment operator: NOT IMPLEMENTED.

◆ paramChange()

int coColorParam::paramChange ( )
virtual

handle parameter changes: called by paramCB

handle parameter changes: called by paramCB

Implements covise::coUifPara.

◆ print()

void coColorParam::print ( ostream &  str) const
virtual

print this to a stream

print this to a stream

Reimplemented from covise::coUifPara.

◆ setValString()

void coColorParam::setValString ( const char *  str)
virtual

set the value of this parameter from a string

set the value of this parameter from a string

Implements covise::coUifPara.

◆ setValue()

int coColorParam::setValue ( float  r,
float  g,
float  b,
float  a 
)

set for data

set values

If we have been initialized, update the map

Member Data Documentation

◆ d_value

float covise::coColorParam::d_value[4]
private

Port data fields.

◆ s_paraType

coUifPara::Typeinfo coColorParam::s_paraType = coUifPara::numericType("COLOR")
staticprivate

my type info

◆ s_type

const char * coColorParam::s_type = "COLOR"
staticprivate

Static data


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