#include <PrtC.h>
Public Types | |
| CHAR = 0 | |
| CHAR_UNSIGNED | |
| DOUBLE | |
| DOUBLE_LONG | |
| FLOAT | |
| enum | FTYPE { LABEL = 0, MARGIN, INDENT, TYPE, XTYPE, YTYPE, PRECISION, WIDTH, FTYPE_CNT } |
| FTYPE_CNT | |
| INDENT | |
| INT | |
| INT_UNSIGNED | |
| LABEL = 0 | |
| LONG | |
| LONG_UNSIGNED | |
| MARGIN | |
| enum | PDATA { CHAR = 0, CHAR_UNSIGNED, SHORT, SHORT_UNSIGNED, INT, INT_UNSIGNED, LONG, LONG_UNSIGNED, FLOAT, DOUBLE, DOUBLE_LONG, PDATA_CNT } |
| PDATA_CNT | |
| PRECISION | |
| SHORT | |
| SHORT_UNSIGNED | |
| TYPE | |
| WIDTH | |
| XTYPE | |
| YTYPE | |
Public Member Functions | |
| const char * | getChar (enum PrtC::FTYPE fType) const |
| int | getInt (enum PrtC::FTYPE fType) const |
| PrtC (const PrtC &pr) | |
| PrtC (enum PrtC::PDATA eType, const char *cLabel=DEF_LBL, const char *cMargin=DEF_SPC3, const char *cIndent=DEF_SPC3, int iWidth=DEF_WDT, int iPrecision=DEF_PRC) | |
| PrtC (const char *cType, const char *cLabel=DEF_LBL, const char *cMargin=DEF_SPC3, const char *cIndent=DEF_SPC3, int iWidth=DEF_WDT, int iPrecision=DEF_PRC) | |
| PrtC (void) | |
| bool | setFormat (const char *strX, const char *strY) |
| bool | setFormat (enum PrtC::PDATA indX, enum PrtC::PDATA indY) |
| bool | setFormat (const char *str) |
| bool | setFormat (enum PrtC::PDATA index) |
| bool | setFormat (enum PrtC::FTYPE fType, int num) |
| bool | setFormat (enum PrtC::FTYPE fType, const char *str) |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const NNurb< xType, yType > &nu) |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const NCube< xType, yType > &cu) |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const NIntp< xType, yType > &ni) |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const EndCube< xType, yType > *ep, int n) |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const EndCube< xType, yType > &ec) |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const Nurb< xType, yType > &nu) const |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const Cube< xType, yType > &cu) |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const Intp< xType, yType > &in) const |
| template<typename bType> | |
| bool | stream (std::ostream &ostr, const Mtx< bType > &mt) const |
| template<typename xType, typename yType> | |
| bool | stream (std::ostream &ostr, const Cheb< xType, yType > &ch) const |
| virtual | ~PrtC (void) |
Static Public Attributes | |
| static const int | BUF_CNT = 10 |
| static const int | BUF_STR = 256 |
| static const char *const | DEF_LBL = "CalcLib" |
| static const int | DEF_PRC = 5 |
| static const char *const | DEF_SPC3 = " " |
| static const char *const | DEF_TYP = PNAME[DOUBLE] |
| static const int | DEF_WDT = 13 |
| static const int | INTP_CNT = 5 |
| static const char *const | PNAME [PDATA_CNT] |
| static const char *const | PNAME_ENDCUBE = "EndCube" |
| static const char *const | SNAME_CHEB = "Cheb Function Interpolation" |
| static const char *const | SNAME_END = " Parameters" |
| static const char *const | SNAME_ENDCUBE = "EndCube Derivative Identifier" |
| static const char *const | SNAME_INTP = "Intp Tabular Interpolation" |
| static const char *const | SNAME_NINTP = "NIntp Multi-Dimensional Tabular Interpolation" |
| static const char *const | SYM_BLANK = " " |
| static const char *const | SYM_COMMENT = "// " |
| static const char *const | SYM_CONSTANT = "const " |
| static const char *const | SYM_NULL = "" |
| static const char *const | SYM_POINTER = "*" |
| static const char *const | TNAME [INTP_CNT] |
| static const char *const | TNAME_CHEB = "Polynomial Coefficient" |
| static const char *const | TNAME_CNT = "Characteristic Data Point Count" |
| static const char *const | TNAME_END = " Data Array" |
| static const char *const | TNAME_NCNT = "Data Count by Dimension" |
| static const char *const | TNAME_OCNT = "Polynomial Data Point Count" |
| static const char *const | VNAME [INTP_CNT] |
| static const char *const | VNAME_CHEB = "arC" |
| static const char *const | VNAME_CNT = "nPoints" |
| static const char *const | VNAME_ENDCUBE = "endCube" |
| static const char *const | VNAME_MTX = "arM" |
| static const char *const | VNAME_NCNT = "arNn" |
| static const char *const | VNAME_NDIM = "n" |
| static const char *const | VNAME_OCNT = "arOn" |
This class prints applicable input and calculated data of CalcLib classes in a "C Style" programming code format. With little modification, the output can be directly inserted into user generated source code.
| enum FTYPE |
Enumeration assigns an index to a format property of the interpolation method.
| enum PDATA |
Enumeration assigns an index to a primitive data type.
| PrtC | ( | void | ) |
Constructor initializes a print object with default data values.
| PrtC | ( | const char * | cType, | |
| const char * | cLabel = DEF_LBL, |
|||
| const char * | cMargin = DEF_SPC3, |
|||
| const char * | cIndent = DEF_SPC3, |
|||
| int | iWidth = DEF_WDT, |
|||
| int | iPrecision = DEF_PRC | |||
| ) |
Constructor initializes a print object with user-supplied data values.
| cType | a pointer to a character string that exactly identifies the template variable type | |
| cLabel | a pointer to a character string that identifies the object and data set | |
| cMargin | a pointer to a character string that is printed at the start of every line | |
| cIndent | a pointer to a character string that is printed recursively for multi-dimensional array output | |
| iWidth | data field width of select printed values | |
| iPrecision | numeric precision format (significant digits) of printed values |
| PrtC | ( | enum PrtC::PDATA | eType, | |
| const char * | cLabel = DEF_LBL, |
|||
| const char * | cMargin = DEF_SPC3, |
|||
| const char * | cIndent = DEF_SPC3, |
|||
| int | iWidth = DEF_WDT, |
|||
| int | iPrecision = DEF_PRC | |||
| ) |
Constructor initializes a print object with user-supplied data values.
| eType | an enumeration value identifying the primitive variable data type (see PrtC::PDATA and PrtC::PNAME) | |
| cLabel | a pointer to a character string that identifies the object and data set | |
| cMargin | a pointer to a character string that is printed at the start of every line | |
| cIndent | a pointer to a character string that is printed recursively for multi-dimensional array output | |
| iWidth | data field width of select printed values | |
| iPrecision | numeric precision format (significant digits) of printed values |
Copy constructor initializes a CalcLib foundation class object from the specified existing base class object.
| pr | a reference to a CalcLib print object |
| virtual ~PrtC | ( | void | ) | [virtual] |
Virtual destructor is a place holder, no dynamic memory is allocated.
| const char * getChar | ( | enum PrtC::FTYPE | fType | ) | const |
Function returns the identified format property character string. The data is used in stream output formatting of CalcLib data.
| fType | format index identifying the property type |
| int getInt | ( | enum PrtC::FTYPE | fType | ) | const |
Function returns the identified format property integer value. The data is used in stream output formatting of CalcLib data.
| fType | format index identifying the property type |
| bool setFormat | ( | const char * | strX, | |
| const char * | strY | |||
| ) |
Function sets dual variable type string format properties of the object by storing the identified string pair. The data is used in stream output formatting of identifying data.
| strX | a pointer to a text string identifying the independent variable type (x type) | |
| strY | a pointer to a text string identifying the solution variable type (y Type) |
| bool setFormat | ( | enum PrtC::PDATA | indX, | |
| enum PrtC::PDATA | indY | |||
| ) |
Function sets dual variable type string format properties of the object by storing the identified enumerator values. The data is used in stream output formatting of identifying data.
| indX | enumerator index identifying the independent variable type (x type) | |
| indY | enumerator index identifying the solution variable type (y Type) |
| bool setFormat | ( | const char * | str | ) |
Function sets all variable type string format properties of the object by storing the identified enumerator value. The data is used in stream output formatting of identifying data.
| str | a pointer to a text string identifying the variable type |
| bool setFormat | ( | enum PrtC::PDATA | index | ) |
Function sets all variable type string format properties of the object by storing the identified enumerator value. The data is used in stream output formatting of identifying data.
| index | enumerator index identifying the variable type |
| bool setFormat | ( | enum PrtC::FTYPE | fType, | |
| int | num | |||
| ) |
Function sets the identified format property by storing the identified integer value. The data is used in stream output formatting of identifying data.
| fType | format index identifying the property type | |
| num | an integer value to store |
| bool setFormat | ( | enum PrtC::FTYPE | fType, | |
| const char * | str | |||
| ) |
Function sets the identified format property by storing the identified character string. The data is used in stream output formatting of identifying data.
| fType | format index identifying the property type | |
| str | a pointer to applicable text string data |
| bool stream | ( | std::ostream & | ostr, | |
| const NNurb< xType, yType > & | nn | |||
| ) |
Function template prints defining calc::NNurb class data to the stream ostr. The declaration typename <xType> specifies the form of independent variables used in interpolation calculations. The declaration typename <yType> specifies the form of solution variables used in interpolation calculations.
| ostr | a reference to a data stream | |
| nn | a reference to a calc::NNurb object |
| bool stream | ( | std::ostream & | ostr, | |
| const NCube< xType, yType > & | nc | |||
| ) |
Function template prints defining calc::NCube class data to the stream ostr. The declaration typename <xType> specifies the form of independent variables used in interpolation calculations. The declaration typename <yType> specifies the form of solution variables used in interpolation calculations.
| ostr | a reference to a data stream | |
| nc | a reference to a calc::NCube object |
| bool stream | ( | std::ostream & | ostr, | |
| const NIntp< xType, yType > & | ni | |||
| ) |
Function template prints defining calc::NIntp class data to the stream ostr. The declaration typename <xType> specifies the form of independent variables used in interpolation calculations. The declaration typename <yType> specifies the form of solution variables used in interpolation calculations.
| ostr | a reference to a data stream | |
| ni | a reference to a calc::NIntp object |
| bool stream | ( | std::ostream & | ostr, | |
| const EndCube< xType, yType > * | ep, | |||
| int | n | |||
| ) |
Function template prints defining data of a calc::EndCube class array to the stream ostr. The declaration typename <yType> specifies the form of variables used in the specified template object array.
| ostr | a reference to a data stream | |
| ep | a pointer to a calc::EndCube object array | |
| n | calc::EndCube object array count |
| bool stream | ( | std::ostream & | ostr, | |
| const EndCube< xType, yType > & | ec | |||
| ) |
Function template prints defining calc::EndCube class data to the stream ostr. The declaration typename <yType> specifies the form of variables used in the specified template object.
| ostr | a reference to a data stream | |
| ec | a reference to a calc::EndCube object |
| bool stream | ( | std::ostream & | ostr, | |
| const Nurb< xType, yType > & | nu | |||
| ) | const |
Function template prints defining calc::Nurb class data to the stream ostr. The declaration typename <xType> specifies the form of independent variables used in interpolation calculations. The declaration typename <yType> specifies the form of solution variables used in interpolation calculations.
| ostr | a reference to a data stream | |
| nu | a reference to a calc::Nurb object |
| bool stream | ( | std::ostream & | ostr, | |
| const Cube< xType, yType > & | cu | |||
| ) |
Function template prints defining calc::Cube class data to the stream ostr. The declaration typename <xType> specifies the form of independent variables used in interpolation calculations. The declaration typename <yType> specifies the form of solution variables used in interpolation calculations.
| ostr | a reference to a data stream | |
| cu | a reference to a calc::Cube object |
| bool stream | ( | std::ostream & | ostr, | |
| const Intp< xType, yType > & | in | |||
| ) | const |
Function template prints defining calc::Intp class data to the stream ostr. The declaration typename <xType> specifies the form of independent variables used in interpolation calculations. The declaration typename <yType> specifies the form of solution variables used in interpolation calculations.
| ostr | a reference to a data stream | |
| in | a reference to a calc::Intp object |
| bool stream | ( | std::ostream & | ostr, | |
| const Mtx< bType > & | mt | |||
| ) | const |
Function template prints defining calc::Mtx class data to the stream ostr. The declaration typename <bType> specifies the form of variables used in the specified template object.
| ostr | a reference to a data stream | |
| mt | a reference to a calc::Mtx object |
| bool stream | ( | std::ostream & | ostr, | |
| const Cheb< xType, yType > & | ch | |||
| ) | const |
Function template prints defining calc::Cheb class data to the stream ostr. The declaration typename <xType> specifies the form of independent variables used in interpolation calculations. The declaration typename <yType> specifies the form of solution variables used in interpolation calculations.
| ostr | a reference to a data stream | |
| ch | a reference to a calc::Cheb object |
const int BUF_CNT = 10 [static] |
Temporary buffer array count (used to concatenate strings).
const int BUF_STR = 256 [static] |
Temporary buffer character length (used to concatenate strings).
const char *const DEF_LBL = "CalcLib" [static] |
default code format default data label string
const int DEF_PRC = 5 [static] |
default code format numeric precision
const char *const DEF_SPC3 = " " [static] |
default code format default margin string (3 blank spaces)
const int DEF_WDT = 13 [static] |
default code format numeric field width
const int INTP_CNT = 5 [static] |
Count of variable labels and types used in interpolation calc::Intp data arrays output.
const char *const PNAME [static] |
Initial value:
{
"char" ,
"char unsigned" ,
"short" ,
"short unsigned",
"int" ,
"int unsigned" ,
"long" ,
"long unsigned" ,
"float" ,
"double" ,
"double long" ,
}
const char *const PNAME_ENDCUBE = "EndCube" [static] |
name of a calc::EndCube derivative data object (used in calc::Cube interpolation)
const char *const SNAME_CHEB = "Cheb Function Interpolation" [static] |
calc::Cheb section title
const char *const SNAME_END = " Parameters" [static] |
section title ending nomenclature
const char *const SNAME_ENDCUBE = "EndCube Derivative Identifier" [static] |
calc::EndCube section title
const char *const SNAME_INTP = "Intp Tabular Interpolation" [static] |
calc::Intp section title
const char *const SNAME_NINTP = "NIntp Multi-Dimensional Tabular Interpolation" [static] |
calc::NIntp section title
const char *const SYM_BLANK = " " [static] |
C language blank space designation
const char *const SYM_COMMENT = "// " [static] |
C language comment line designation
const char *const SYM_CONSTANT = "const " [static] |
C language constant value designation
const char *const SYM_NULL = "" [static] |
C language null character string designation
const char *const SYM_POINTER = "*" [static] |
C language pointer designation
const char *const TNAME [static] |
Initial value:
{
"Independent" ,
"Knot Vector" ,
"Dependent" ,
"2nd Derivative" ,
"Control Polygon",
}
const char *const TNAME_CHEB = "Polynomial Coefficient" [static] |
title of a coefficient variable array implemented in a calc::Cheb object
const char *const TNAME_CNT = "Characteristic Data Point Count" [static] |
title of a data point count parameter
const char *const TNAME_END = " Data Array" [static] |
array title ending nomenclature
const char *const TNAME_NCNT = "Data Count by Dimension" [static] |
title of a data point count parameter
const char *const TNAME_OCNT = "Polynomial Data Point Count" [static] |
title of a data point count parameter
const char *const VNAME [static] |
Initial value:
{
"arX",
"arK",
"arY",
"arD",
"arP",
}
const char *const VNAME_CHEB = "arC" [static] |
name of a Chebyshev polynomial coefficient array (y units)
const char *const VNAME_CNT = "nPoints" [static] |
name of a data point count parameter
const char *const VNAME_ENDCUBE = "endCube" [static] |
name of a calc::EndCube derivative data object (used in calc::Cube interpolation)
const char *const VNAME_MTX = "arM" [static] |
name of a 2-D Matrix array
const char *const VNAME_NCNT = "arNn" [static] |
name of a polynomial data count by dimension parameter
const char *const VNAME_NDIM = "n" [static] |
name suffix of a multi-dimensional array
const char *const VNAME_OCNT = "arOn" [static] |
name of a polynomial data point count parameter
1.4.7