|
Simpatico
v1.10
|
Miscellaneous utility classes and functions.
Classes | |
| class | Util::Bit |
| Represents a specific bit location within an unsigned int. More... | |
| class | Util::Exception |
| A user-defined exception. More... | |
| class | Util::FileMaster |
| A FileMaster manages input and output files for a simulation. More... | |
| class | Util::FlagSet |
| A set of boolean variables represented by characters. More... | |
| class | Util::Log |
| A static class that holds a log output stream. More... | |
| class | Util::Memory |
| Provides method to allocate array. More... | |
| class | Util::Notifier< Event > |
| Abstract template for a notifier (or subject) in the Observer design pattern. More... | |
| class | Util::Observer< Event > |
| Abstract class template for observer in the observer design pattern. More... | |
| class | Util::Setable< T > |
| Template for a value that can be set or declared null (i.e., unknown). More... | |
| class | Util::Timer |
| Wall clock timer. More... | |
Functions | |
| std::string | Util::toString (int n) |
| Return string representation of an integer. More... | |
| int | Util::rStrip (std::string &string) |
| Strip trailing whitespace from a string. More... | |
| void | Util::checkString (std::istream &in, const std::string &expected) |
| Extract string from stream, and compare to expected value. More... | |
| bool | Util::getLine (std::istream &in, std::stringstream &line) |
| Read the next line into a stringstream. More... | |
| bool | Util::getNextLine (std::istream &in, std::string &line) |
| Read the next non-empty line into a string, strip trailing whitespace. More... | |
| bool | Util::getNextLine (std::istream &in, std::stringstream &line) |
| Read next non-empty line into a stringstream, strip trailing whitespace. More... | |
| template<typename D , typename B , typename M > | |
| ptrdiff_t | Util::memberOffset (D &object, M B::*memPtr) |
| Template for calculating offsets of data members. More... | |
| std::string Util::toString | ( | int | n | ) |
Return string representation of an integer.
| n | integer to be converted. |
Definition at line 52 of file ioUtil.cpp.
Referenced by McMd::StructureFactor::output(), McMd::StructureFactorPGrid::output(), McMd::VanHove::output(), McMd::StructureFactorP::output(), McMd::ClusterHistogram::sample(), DdMd::ConfigWriter::sample(), and McMd::ConfigWriter::sample().
| int Util::rStrip | ( | std::string & | string | ) |
Strip trailing whitespace from a string.
| string | string (stripped upon return). |
Definition at line 18 of file ioUtil.cpp.
Referenced by Util::getNextLine(), and Util::XmlAttribute::match().
| void Util::checkString | ( | std::istream & | in, |
| const std::string & | expected | ||
| ) |
Extract string from stream, and compare to expected value.
| Exception | if input value differs from expected value. |
| in | input stream |
| expected | expected value of string read from stream |
Definition at line 37 of file ioUtil.cpp.
References Util::Log::file(), and UTIL_THROW.
Referenced by Tools::HoomdConfigWriter::readAuxiliaryFile(), Tools::HoomdConfigReader::readAuxiliaryFile(), Tools::LammpsDumpReader::readFrame(), and McMd::LammpsDumpReader::readFrame().
| bool Util::getLine | ( | std::istream & | in, |
| std::stringstream & | line | ||
| ) |
Read the next line into a stringstream.
Variant of std::getline(). Does not strip trailing whitespace.
| in | input stream from which to read. |
| line | stringstream containing line, on output. |
Definition at line 62 of file ioUtil.cpp.
| bool Util::getNextLine | ( | std::istream & | in, |
| std::string & | line | ||
| ) |
Read the next non-empty line into a string, strip trailing whitespace.
Variant of std::getline() that skips empty lines.
| in | input stream from which to read. |
| line | string with next non-empty line, on output. |
Definition at line 79 of file ioUtil.cpp.
References Util::rStrip().
Referenced by Tools::HoomdConfigWriter::readAuxiliaryFile(), Tools::HoomdConfigReader::readAuxiliaryFile(), McMd::MdSimulation::readCommands(), McMd::McSimulation::readCommands(), DdMd::Simulation::readCommands(), Tools::HoomdConfigReader::readConfig(), Tools::LammpsDumpReader::readFrame(), and McMd::LammpsDumpReader::readFrame().
| bool Util::getNextLine | ( | std::istream & | in, |
| std::stringstream & | line | ||
| ) |
Read next non-empty line into a stringstream, strip trailing whitespace.
Variant of std::getline() that skips empty lines and uses stringstream.
| in | input stream from which to read. |
| line | stringstream containing next non-empty line, on output. |
Definition at line 100 of file ioUtil.cpp.
References Util::rStrip().
1.8.11