Base Class Reference

Abstract class provides foundation class functions for other CalcLib classes. More...

#include <Base.h>

Inherited by Cheb, EndCube, Intg, Intp, Mtx, NIntp, Ode, and OptIntp.

Inheritance diagram for Base:

Inheritance graph
[legend]
List of all members.

Public Types

enum  BOUND { LO = 0, HI, BOUND_CNT }
 BOUND_CNT
 HI
 LO = 0

Public Member Functions

bool isInit (void) const

Static Public Attributes

static const double PI = 3.141592653589793238462643

Protected Member Functions

 Base (const Base &ca)
 Base (void)
virtual void varInit (void)=0
 ~Base (void)

Static Protected Member Functions

template<typename T>
static T abs (const T &x)
template<typename T>
static bool memComp (const T *arr1, const T *arr2, int nCnt)
template<typename T>
static T * memCopy (T *aDst, const T *aSrc, int nCnt)
template<typename T>
static bool memSet (T *arr, int x, int nCnt)
template<typename T>
static void swap (T &x1, T &x2)

Protected Attributes

bool nogo

Detailed Description

Abstract class provides foundation class functions for other CalcLib classes.

Object instantiation should be made only through classes which inherit this class. This class provides for an initialization flag that may indicate variable initialization or memory allocation errors.

Author
efgeorge
Date
2006/07/19 13:21:43
Revision
1.2


Member Enumeration Documentation

enum BOUND

Enumeration assigns a two-count index to a lower / upper boundary.

Enumerator:
LO  index of lower boundary
HI  index of upper boundary
BOUND_CNT  boundary index count


Constructor & Destructor Documentation

Base ( void   )  [protected]

Constructor initializes a CalcLib foundation class object to an object state not initialized with data.

Remarks:
The flag must be cleared after initialization of the object is complete.

Base ( const Base ca  )  [protected]

Copy constructor initializes a CalcLib foundation class object from the specified existing base class object.

Parameters:
ca a reference to a CalcLib base class object

~Base ( void   )  [protected]

Destructor is a place holder, no dynamic memory is allocated.


Member Function Documentation

static T abs ( const T &  x  )  [static, protected]

Template function returns an absolute value of the specified value, which is defined as greater than (T)(0). The declaration typename <T> specifies the form of variables used in the function template.

Parameters:
x a reference to a variable to calculate the non-negative value of
Returns:
the absolute value of the value x

bool isInit ( void   )  const

Function returns the initialization status of the object.

Returns:
status flag
  • false (object is not initialized for data calculations)
  • true (object is initialized for data calculations)

static bool memComp ( const T *  arr1,
const T *  arr2,
int  nCnt 
) [static, protected]

Template function compares the values of two designated arrays arr1 and arr2 to see that the arrays are equal. This function corresponds to the <cstring> memory function std::memcmp(). The declaration typename <T> specifies the form of variables used in the function template.

Parameters:
arr1 a pointer to an array to be compared
arr2 a pointer to an array to be compared
nCnt number of array values to be compared
Returns:
status flag
  • false (the arrays are equal)
  • true (the arrays are not equal)

static T* memCopy ( T *  aDst,
const T *  aSrc,
int  nCnt 
) [static, protected]

Template function copies the values from a designated array aSrc to a designated array aDst. This function corresponds to the <cstring> memory function std::memcpy(). The declaration typename <T> specifies the form of variables used in the function template.

Parameters:
aDst a pointer to a destination array to be copied to
aSrc a pointer to a source array to be copied from
nCnt number of array values to be copied
Returns:
a pointer to the destination array aDst

static bool memSet ( T *  arr,
int  x,
int  nCnt 
) [static, protected]

Template function initializes the values of the designated array arr to the specified value x. This function corresponds to the <cstring> memory function std::memset(). The declaration typename <T> specifies the form of variables used in the function template.

Parameters:
arr a pointer to an array to be initialized
x a reference to an initializing value
nCnt number of array values to be compared
Returns:
a pointer to the array arr

static void swap ( T &  x1,
T &  x2 
) [static, protected]

Template function interchanges two stored values. The declaration typename <T> specifies the form of variables used in the function template.

Parameters:
x1 a reference to a variable to interchange
x2 a reference to a variable to interchange

virtual void varInit ( void   )  [protected, pure virtual]

Virtual function assigns default values to all data member variables.


Member Data Documentation

bool nogo [protected]

object initialization flag

const double PI = 3.141592653589793238462643 [static]

circle circumference:diameter ratio

Examples:
example_Cheb.txt, example_Intg.txt, example_Intp.txt, and example_Ode.txt.


The documentation for this class was generated from the following file:
Generated on Wed Jul 19 09:24:04 2006 for CalcLib by  doxygen 1.4.7