oaParam Class Reference
Detailed Description
The oaParam utility class represents a parameter used to specify a desired customization of a pcell. Pcells are parameterized designs that can be modified for each instance by specifying appropriate parameter values.
A parameter is essentially a name/type/value triplet. Each oaParam can be of any of the supported types. The type of its value must be consistent with the type of the oaParam. It is permissible to change the param's type from one type to another by calling a set() function on a param object.
Note: It is illegal to perform a get() call on a parameter with the wrong value type -- for example, if you call getStringVal() on a parameter of type oacIntParamType. If you perform an illegal get() call with the debug version of OpenAccess, it will throw an oacParamTypeDoesNotMatchWithGetFunction exception. If you perform an illegal get() call with the optimized version, function behavior is undefined, and your program may crash.
While oaParam objects may be constructed by themselves, when they are used in the API for pcells they are always elements of an oaParamArray. Hence that is the most common way for applications to use them.
Constructor & Destructor Documentation
oaParam::oaParam |
( |
|
) |
[inline] |
|
|
This function constructs an empty oaParam object which has an undefined value and type. |
oaParam::oaParam |
( |
const oaParam & |
param |
) |
|
|
|
This function constructs a copy of the oaParam object 'param' being passed in.
- Parameters:
-
param | A reference to the oaParam object whose copy is to be made |
|
|
This function constructs an oaParam object with an integer 'value' and which has the specified name 'nameIn'.
- Parameters:
-
nameIn | The name to assign to the new oaParam object |
value | An integer value to be assigned to the oaParam object |
|
|
This function constructs an oaParam object with a float 'value' and which has the specified name 'nameIn'.
- Parameters:
-
nameIn | The name to assign to the new oaParam object |
value | A float value to be assigned to the oaParam object |
|
|
This function constructs an oaParam object with a string 'value' and which has the specified name 'nameIn'.
- Parameters:
-
nameIn | The name to assign to the new oaParam object |
value | A reference to an oaString object to be assigned to the oaParam object |
|
|
This function constructs an oaParam object with a double 'value' and which has the specified name 'nameIn'.
- Parameters:
-
nameIn | The name to assign to the new oaParam object |
value | A double value to be assigned to the oaParam object |
|
|
This function constructs an oaParam object that has an arbitrary set of application-defined bytes for a value. This kind of parameter has an additional string associated with it that is defined by the application to further define what the value is.
Note that the database cannot do byte-swapping for embedded binary fields (such as integers) in this value when it is written on one kind of computer and read on another. Hence the use of this type of param is discouraged.
- Parameters:
-
nameIn | The name to assign to the new oaParam object |
appTypeIn | A reference to an oaString object to specify additional application specific information |
numBytesIn | An integer value indicating the number of bytes being assigned to this oaParam object with 'byteDataIn' |
byteDataIn | A pointer to an array of bytes to be assigned to this oaParam object |
|
|
This is the destructor for this oaParam object. |
Member Function Documentation
void oaParam::getAppType |
( |
oaString & |
appTypeIn |
) |
const |
|
|
This function retrieves the oaAppType string of this application-type oaParam object using the 'appTypeIn' parameter.
- Parameters:
-
appTypeIn | A reference to an oaString to be populated with the appType information |
|
void oaParam::getAppVal |
( |
oaByte * |
value |
) |
const |
|
|
This function gets the value of this application-type oaParam object. It assumes that the application had earlier assigned such a value to the oaParam object. A fatal application error can occur if an attempt is made to retrieve a value that was not stored earlier.
- Parameters:
-
value | A pointer to an array of bytes to be populated |
|
oaBoolean oaParam::getBooleanVal |
( |
|
) |
const [inline] |
|
|
This function returns the value of this boolean-type oaParam object. If the param isn't storing a boolean value, then the result is indeterminate. |
oaDouble oaParam::getDoubleVal |
( |
|
) |
const [inline] |
|
|
This function returns the value of this double-type oaParam object. If the param isn't storing a double value then the result is indeterminate. |
oaFloat oaParam::getFloatVal |
( |
|
) |
const [inline] |
|
|
This function returns the value of this float-type oaParam object. If the param isn't storing a float value then the result is indeterminate. |
oaInt4 oaParam::getIntVal |
( |
|
) |
const [inline] |
|
|
This function returns the value of this integer-type oaParam object. If the param isn't storing an integer value then the result is indeterminate. |
void oaParam::getName |
( |
oaString & |
nameIn |
) |
const [inline] |
|
|
This function retrieves the name of this oaParam object in the 'nameIn' parameter.
- Parameters:
-
nameIn | A reference to an oaString object to be populated with the name of this oaParam object |
|
oaUInt4 oaParam::getNumBytes |
( |
|
) |
const [inline] |
|
|
This function returns the number of bytes of this application-type oaParam object. If it isn't storing an application param then it returns 0. |
void oaParam::getStringVal |
( |
oaString & |
value |
) |
const [inline] |
|
|
This function retrieves the value of this string-type oaParam object in the 'value' parameter. If it isn't storing a string value then the result is indeterminate.
- Parameters:
-
value | A reference to an oaString object to be populated with the string value that this oaParam object represents |
|
const char * oaParam::getStringVal |
( |
|
) |
const [inline] |
|
|
This function returns a pointer to the string value of this string-type oaParam object. If it isn't storing a string value then the result is indeterminate. |
oaTime oaParam::getTimeVal |
( |
|
) |
const [inline] |
|
|
This function returns the value of this time-type oaParam object. If it isn't storing a time value then the result is indeterminate. |
|
This function returns the type of this oaParam object which specifies the form of its value. |
oaBoolean oaParam::operator!= |
( |
const oaParam & |
param |
) |
const [inline] |
|
|
This is the inequality operator for the oaParam class. It compares this oaParam with the specified param, and returns true if the oaParam values are not equal. |
oaParam & oaParam::operator= |
( |
const oaParam & |
param |
) |
|
|
|
This function is the assignment operator that copies the specified oaParam object 'param' and returns a reference to its duplicate. The function copies all member data so the duplicate does not rely on information from the original.
- Parameters:
-
param | A reference to the oaParam object to be copied |
|
oaBoolean oaParam::operator== |
( |
const oaParam & |
param |
) |
const |
|
|
This is the equality operator for the oaParam class. It compares this oaParam with the specified param, and returns true if the oaParam values are equal. |
void oaParam::setAppType |
( |
const oaChar * |
value |
) |
|
|
|
This function sets the appType string for this application-type oaParam object. The oaAppType string distinguishes this application-type parameter from other application-type parameters that can have the same name.
If this param isn't an application param then this call has no effect. So if you are using an oaParam that previously held a different type and you are setting it to be an application-type param, you must call setAppVal before calling setAppType.
- Parameters:
-
value | The appType string to be associated with this oaParam object |
|
void oaParam::setAppVal |
( |
oaUInt4 |
numBytesIn, |
|
|
const oaByte * |
byteDataIn |
|
) |
|
|
|
This function sets the value of this application-type oaParam object to be the raw array of bytes 'byteDataIn' with a length of 'numBytesIn'.
- Parameters:
-
numBytesIn | The number of bytes to be assigned to this oaParam object |
byteDataIn | A pointer to the location where the byte array starts |
|
void oaParam::setBooleanVal |
( |
oaBoolean |
value |
) |
[inline] |
|
|
This function sets this oaParam to be a boolean-type param with the specified 'value'.
- Parameters:
-
value | The boolean value to be assigned to this oaParam object |
|
void oaParam::setDoubleVal |
( |
oaDouble |
value |
) |
[inline] |
|
|
This function sets this oaParam to be a double-type param with the specified 'value'.
- Parameters:
-
value | A double value to be assigned to this oaParam object |
|
void oaParam::setFloatVal |
( |
oaFloat |
value |
) |
[inline] |
|
|
This function sets this oaParam to be a float-type param with the specified 'value'.
- Parameters:
-
value | A float value to be assigned to this oaParam object |
|
void oaParam::setIntVal |
( |
oaInt4 |
value |
) |
[inline] |
|
|
This function sets this oaParam to be an integer-type param with the specified 'value'.
- Parameters:
-
value | An integer value to be assigned to this oaParam object |
|
void oaParam::setName |
( |
const oaChar * |
nameIn |
) |
[inline] |
|
|
This function sets the name of this oaParam object to that specified by the string parameter 'nameIn'.
- Parameters:
-
nameIn | A string representing the name to be assigned to this oaParam object |
|
void oaParam::setStringVal |
( |
const oaChar * |
value |
) |
|
|
|
This function sets this oaParam to be a string-type param with the specified 'value'.
- Parameters:
-
value | A string to be assigned to this oaParam object as its new value |
|
void oaParam::setTimeVal |
( |
oaTime |
value |
) |
[inline] |
|
|
This function sets this oaParam to be a time-type param with the specified 'value'.
- Parameters:
-
value | An oaTime value to be assigned to this oaParam object |
|
Friends And Related Function Documentation
friend class oaAppParamTbl [friend]
|
|
friend class oaBooleanParamTbl [friend]
|
|
friend class oaDoubleParamTbl [friend]
|
|
friend class oaFloatParamTbl [friend]
|
|
friend class oaIntParamTbl [friend]
|
|
friend class oaParamArray [friend]
|
|
friend class oaParamTbl [friend]
|
|
friend class oaStringParamTbl [friend]
|
|
friend class oaTimeParamTbl [friend]
|
|
The documentation for this class was generated from the following files:
Return to top of page
Copyright © 2002 - 2010 Cadence Design Systems, Inc.
All Rights Reserved.