API  4.5
For C++ developers
OpenSim::IO Class Reference

A class for performing input and output with OpenSim API. More...

Static Public Member Functions

static char * ConstructDateAndTimeStamp ()
 
static std::string FixSlashesInFilePath (const std::string &path)
 
static void SetScientific (bool aTrueFalse)
 
static bool GetScientific ()
 
static void SetGFormatForDoubleOutput (bool aTrueFalse)
 
static bool GetGFormatForDoubleOutput ()
 
static void SetDigitsPad (int aPad)
 
static int GetDigitsPad ()
 
static void SetPrecision (int aPlaces)
 
static int GetPrecision ()
 
static const char * GetDoubleOutputFormat ()
 
static void SetPrintOfflineDocuments (bool aTrueFalse)
 
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)
 
static std::string ReadCharacters (std::istream &aIS, int aNChar)
 
static bool FileExists (const std::string &filePath)
 
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 ()
 
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="\)
 
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)
 
static bool StartsWith (const std::string &string, const std::string &start)
 Determine if string starts with the substring start. More...
 
static bool EndsWith (const std::string &string, const std::string &ending)
 Determine if string ends with the substring ending. More...
 
static bool StartsWithIgnoringCase (const std::string &string, const std::string &start)
 Same as StartsWith() except both arguments are first converted to lowercase before performing the check. More...
 
static bool EndsWithIgnoringCase (const std::string &string, const std::string &ending)
 Same as EndsWith() except both arguments are first converted to lowercase before performing the check. More...
 
static void eraseEmptyElements (std::vector< std::string > &list)
 

Nested Classes

class  CwdChanger
 A class that: More...
 

Detailed Description

A class for performing input and output with OpenSim API.

Version
1.0
Author
Frank C. Anderson

Member Function Documentation

◆ chDir()

static int OpenSim::IO::chDir ( const std::string &  aDirName)
static

◆ ComputeNumberOfSteps()

static int OpenSim::IO::ComputeNumberOfSteps ( double  aTI,
double  aTF,
double  aDT 
)
static

◆ ConstructDateAndTimeStamp()

static char* OpenSim::IO::ConstructDateAndTimeStamp ( )
static

◆ EndsWith()

static bool OpenSim::IO::EndsWith ( const std::string &  string,
const std::string &  ending 
)
static

Determine if string ends with the substring ending.

Examples:
example2DWalking.cpp, and example2DWalkingMetabolics.cpp.

◆ EndsWithIgnoringCase()

static bool OpenSim::IO::EndsWithIgnoringCase ( const std::string &  string,
const std::string &  ending 
)
static

Same as EndsWith() except both arguments are first converted to lowercase before performing the check.

◆ eraseEmptyElements()

static void OpenSim::IO::eraseEmptyElements ( std::vector< std::string > &  list)
static

◆ FileExists()

static bool OpenSim::IO::FileExists ( const std::string &  filePath)
static

◆ FixSlashesInFilePath()

static std::string OpenSim::IO::FixSlashesInFilePath ( const std::string &  path)
static

◆ formatText()

static std::string OpenSim::IO::formatText ( const std::string &  aComment,
const std::string &  leadingWhitespace,
int  width 
)
static

◆ getCwd()

static std::string OpenSim::IO::getCwd ( )
static

◆ GetDigitsPad()

static int OpenSim::IO::GetDigitsPad ( )
static

◆ GetDoubleOutputFormat()

static const char* OpenSim::IO::GetDoubleOutputFormat ( )
static

◆ GetFileNameFromURI()

static std::string OpenSim::IO::GetFileNameFromURI ( const std::string &  aURI)
static

◆ GetGFormatForDoubleOutput()

static bool OpenSim::IO::GetGFormatForDoubleOutput ( )
static

◆ getParentDirectory()

static std::string OpenSim::IO::getParentDirectory ( const std::string &  fileName)
static

◆ GetPrecision()

static int OpenSim::IO::GetPrecision ( )
static

◆ GetPrintOfflineDocuments()

static bool OpenSim::IO::GetPrintOfflineDocuments ( )
static

◆ GetScientific()

static bool OpenSim::IO::GetScientific ( )
static

◆ GetSuffix()

static std::string OpenSim::IO::GetSuffix ( const std::string &  aStr,
int  aLen 
)
static

◆ Lowercase()

static std::string OpenSim::IO::Lowercase ( const std::string &  aStr)
static

◆ makeDir()

static int OpenSim::IO::makeDir ( const std::string &  aDirName)
static

◆ OpenFile()

static FILE* OpenSim::IO::OpenFile ( const std::string &  aFileName,
const std::string &  aMode 
)
static

◆ OpenInputFile()

static std::ifstream* OpenSim::IO::OpenInputFile ( const std::string &  aFileName,
std::ios_base::openmode  mode = std::ios_base::in 
)
static

◆ OpenOutputFile()

static std::ofstream* OpenSim::IO::OpenOutputFile ( const std::string &  aFileName,
std::ios_base::openmode  mode = std::ios_base::out 
)
static

◆ ReadCharacters()

static std::string OpenSim::IO::ReadCharacters ( std::istream &  aIS,
int  aNChar 
)
static

◆ ReadLine()

static std::string OpenSim::IO::ReadLine ( std::istream &  aIS)
static

◆ ReadToTokenLine()

static std::string OpenSim::IO::ReadToTokenLine ( std::istream &  aIS,
const std::string &  aToken 
)
static

◆ RemoveSuffix()

static void OpenSim::IO::RemoveSuffix ( std::string &  rStr,
int  aLen 
)
static

◆ replaceSubstring()

static std::string OpenSim::IO::replaceSubstring ( const std::string &  aStr,
const std::string &  aFrom,
const std::string &  aTo 
)
static

◆ SetDigitsPad()

static void OpenSim::IO::SetDigitsPad ( int  aPad)
static

◆ SetGFormatForDoubleOutput()

static void OpenSim::IO::SetGFormatForDoubleOutput ( bool  aTrueFalse)
static

◆ SetPrecision()

static void OpenSim::IO::SetPrecision ( int  aPlaces)
static

◆ SetPrintOfflineDocuments()

static void OpenSim::IO::SetPrintOfflineDocuments ( bool  aTrueFalse)
static

◆ SetScientific()

static void OpenSim::IO::SetScientific ( bool  aTrueFalse)
static

◆ StartsWith()

static bool OpenSim::IO::StartsWith ( const std::string &  string,
const std::string &  start 
)
static

Determine if string starts with the substring start.

◆ StartsWithIgnoringCase()

static bool OpenSim::IO::StartsWithIgnoringCase ( const std::string &  string,
const std::string &  start 
)
static

Same as StartsWith() except both arguments are first converted to lowercase before performing the check.

◆ TrimLeadingWhitespace()

static void OpenSim::IO::TrimLeadingWhitespace ( std::string &  rStr)
static

◆ TrimTrailingWhitespace()

static void OpenSim::IO::TrimTrailingWhitespace ( std::string &  rStr)
static

◆ TrimWhitespace()

static void OpenSim::IO::TrimWhitespace ( std::string &  rStr)
inlinestatic

◆ Uppercase()

static std::string OpenSim::IO::Uppercase ( const std::string &  aStr)
static

The documentation for this class was generated from the following file: