#include <rdIO.h>
Static Public Member Functions | |
| void | SetScientific (bool aTrueFalse) |
| Set whether or not output of numbers should be in scientific or float format. | |
| bool | GetScientific () |
| Set whether or not output of numbers should be in scientific or float format. | |
| void | SetDigitsPad (int aPad) |
| Set the number of digits with which to pad output of numbers. | |
| int | GetDigitsPad () |
| Get the number of digits with which output of numbers is padded. | |
| void | SetPrecision (int aPlaces) |
| Set the precision with which numbers are output. | |
| int | GetPrecision () |
| Get the precision with which numbers are output. | |
| const char * | GetDoubleOutputFormat () |
| Get the current output format for numbers of type double. | |
| char * | ReadToTokenLine (FILE *aFP, const char *aToken) |
| Read lines from the file until a line consisting entirely of a token is read or until the end of the file. | |
| char * | ReadLine (FILE *aFP) |
| Read a line of text from file. | |
| int | ComputeLineLength (FILE *aFP) |
| Compute the length of a line. | |
| int | ComputeNumberOfSteps (double aTI, double aTF, double aDT) |
| Compute the number of steps of a given size to get from some initial time to some final time. | |
| char * | ReadCharacters (FILE *aFP, int aNChar) |
| Read a specified number of characters from file. | |
| FILE * | OpenFile (const char *aFileName, const char *aMode) |
| Open a file. | |
Static Public Attributes | |
| const int | STRLEN = rdIO_STRLEN |
| Default size of a statically or locally allocated character array. | |
| const int | STRING_INCREMENT = rdIO_STRING_INCREMENT |
| Increment by which the size of character strings are incremented. | |
Static Private Member Functions | |
| void | ConstructDoubleOutputFormat () |
| Construct a valid output format for numbers of type double. | |
Static Private Attributes | |
| bool | _Scientific = false |
| Specifies whether number output is in scientific or float format. | |
| int | _Pad = 8 |
| Specifies number of digits of padding in number output. | |
| int | _Precision = 8 |
| Specifies the precision of number output. | |
| char | _DoubleFormat [256] = "%16.8lf" |
| The output format string. | |
|
|
Compute the length of a line. A carriage return defines the end of a line.
|
|
||||||||||||||||
|
Compute the number of steps of a given size to get from some initial time to some final time. If (aTF-aTI)/aDT has a remainder that is greater than 1% of the step size, an additional step is assumed to be needed to step completely to the end of the interval.
|
|
|
Construct a valid output format for numbers of type double. This method is called each time a change is made to any of the output format parameters.
|
|
|
Get the number of digits with which output of numbers is padded. The pad number is used to set the minimum field width by the following formula: width = pad + precision The formated output string, for example, would have the form width.precisionlf.
|
|
|
Get the current output format for numbers of type double. The format is maintained as a static variable in class rdIO, so any changes made to the output parameters in class rdIO will be seen globally by all classes using this method. The returned output format will be of the form "% width.precision lf" (if not scientific) or "% width.precision le" (if scientific), where the spaces have been removed and width = pad + precision.
|
|
|
Get the precision with which numbers are output. The precision is usually simply the number of decimal places.
|
|
|
Set whether or not output of numbers should be in scientific or float format.
|
|
||||||||||||
|
Read a specified number of characters from file. Memory is allocated for the returned string, so the caller is responsible for deleting this memory.
|
|
|
Read a line of text from file. The terminating carriage return is not included in the returned string. This routine allocates memory to store the line, so the caller is responsible for deleting this memory.
|
|
||||||||||||
|
Read lines from the file until a line consisting entirely of a token is read or until the end of the file. The file pointer is advanced to the first character after the token. Memory is allocated for the description, so the caller is responsible for deleting the returned description.
|
|
|
Set the number of digits with which to pad output of numbers. The pad number is used to set the minimum field width by the following formula: width = pad + precision The formated output string, for example, would have the form width.precisionlf.
|
|
|
Set the precision with which numbers are output. The precision is usually simply the number of decimal places.
|
|
|
Set whether or not output of numbers should be in scientific or float format.
|
1.3