Static Public Member Functions |
static char * | ConstructDateAndTimeStamp () |
| Construct a date and time stamp with the format YYYYMMDD_HHMMSS.
|
static std::string | FixSlashesInFilePath (const std::string &path) |
| Ensures slashes are back slashes ('\') in Windows and forward slashes ('/') in Linux.
|
static void | SetScientific (bool aTrueFalse) |
| Set whether or not output of numbers should be in scientific or float format.
|
static bool | GetScientific () |
| Set whether or not output of numbers should be in scientific or float format.
|
static void | SetGFormatForDoubleOutput (bool aTrueFalse) |
| Set whether or not output of numbers should be printed using g.
|
static bool | GetGFormatForDoubleOutput () |
static void | SetDigitsPad (int aPad) |
| Set the number of digits with which to pad output of numbers.
|
static int | GetDigitsPad () |
| Get the number of digits with which output of numbers is padded.
|
static void | SetPrecision (int aPlaces) |
| Set the precision with which numbers are output.
|
static int | GetPrecision () |
| Get the precision with which numbers are output.
|
static const char * | GetDoubleOutputFormat () |
| Get the current output format for numbers of type double.
|
static void | SetPrintOfflineDocuments (bool aTrueFalse) |
| If Object::print is called and an xml node has a file attribute pointing to an external file, then the _PrintOfflineDocuments determines whether that file's contents will be printed to that file or not.
|
static bool | GetPrintOfflineDocuments () |
static std::string | ReadToTokenLine (std::istream &aIS, const std::string &aToken) |
static std::string | ReadLine (std::istream &aIS) |
static 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.
|
static std::string | ReadCharacters (std::istream &aIS, int aNChar) |
static FILE * | OpenFile (const std::string &aFileName, const std::string &aMode) |
static std::ifstream * | OpenInputFile (const std::string &aFileName, std::ios_base::openmode mode=std::ios_base::in) |
static std::ofstream * | OpenOutputFile (const std::string &aFileName, std::ios_base::openmode mode=std::ios_base::out) |
static int | makeDir (const std::string &aDirName) |
static int | chDir (const std::string &aDirName) |
static std::string | getCwd () |
| Get current working directory.
|
static std::string | getParentDirectory (const std::string &fileName) |
static std::string | GetFileNameFromURI (const std::string &aURI) |
static std::string | formatText (const std::string &aComment, const std::string &leadingWhitespace, int width, const std::string &endlineTokenToInsert="\n") |
static std::string | GetSuffix (const std::string &aStr, int aLen) |
static void | RemoveSuffix (std::string &rStr, int aLen) |
static std::string | replaceSubstring (const std::string &aStr, const std::string &aFrom, const std::string &aTo) |
static void | TrimLeadingWhitespace (std::string &rStr) |
static void | TrimTrailingWhitespace (std::string &rStr) |
static void | TrimWhitespace (std::string &rStr) |
static std::string | Lowercase (const std::string &aStr) |
static std::string | Uppercase (const std::string &aStr) |
A class for performing input and output with OpenSim API.
int IO::GetDigitsPad |
( |
|
) |
[static] |
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.
- Returns:
- aPad Number of digits with which output of number is padded.
const char * IO::GetDoubleOutputFormat |
( |
|
) |
[static] |
Get the current output format for numbers of type double.
The format is maintained as a static variable in class IO, so any changes made to the output parameters in class IO 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.
- Returns:
- Format string for output of doubles.
- See also:
- SetScientific(), SetDigitsPad, SetPrecision.
void IO::SetDigitsPad |
( |
int |
aPad |
) |
[static] |
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.
- Parameters:
-
| aPad | Number of digits with which output of numbers is padded. |