ug4
|
Classes | |
struct | ug::StringTableStream::RepeatedCol |
class | ug::StringTableStream |
class | ug::Table< T > |
Useful for printing a table to the terminal or into a file. More... | |
class | ug::Variant |
A variant can represent variables of different types. More... | |
Typedefs | |
typedef Table< std::stringstream > | ug::StringStreamTable |
typedef Table< std::string > | ug::StringTable |
Functions | |
template<class TType > | |
int | ug::ArrayEraseEntry (TType *array, const TType &entry, size_t size) |
removes the first occurance of the specified entry. More... | |
template<class TType > | |
bool | ug::ArrayReplaceEntry (TType *array, const TType &newEntry, const TType &oldEntry, size_t size) |
replaces the first occurance of oldEntry with newEntry More... | |
template<class TType > | |
void | ug::ArraySwapWithLast (TType *array, const TType &entry, size_t size) |
Swaps the first entry with the given value with the last entry in the list. More... | |
void | ug::StringTableStream::clear () |
RepeatedCol | ug::StringTableStream::empty_col (size_t i) |
std::string | ug::EntryToString (const Table< std::string > &table, size_t rowInd, size_t colInd) |
std::string | ug::EntryToString (const Table< std::stringstream > &table, size_t rowInd, size_t colInd) |
template<class T > | |
std::string | ug::EntryToString (const Table< T > &table, size_t rowInd, size_t colInd) |
Returns a string-representation of the current entry. More... | |
StringTableStream & | ug::StringTableStream::operator<< (const char *c) |
StringTableStream & | ug::StringTableStream::operator<< (RepeatedCol c) |
std::ostream & | ug::operator<< (std::ostream &os, const StringTableStream &sts) |
template<class T > | |
std::ostream & | ug::operator<< (std::ostream &os, const Table< T > &table) |
prints a table to the specified ostream. More... | |
StringTableStream & | ug::StringTableStream::operator<< (std::string str) |
template<typename T > | |
StringTableStream & | ug::StringTableStream::operator<< (T t) |
template<typename T > | |
RepeatedCol | ug::StringTableStream::repeat_col (size_t nrRepeat, T contentToRepeat) |
ug::StringTableStream::RepeatedCol::RepeatedCol (std::string _content, size_t _number) | |
template<typename T > | |
void | ug::StringTableStream::set (size_t r, size_t c, T t) |
ug::StringTableStream::StringTableStream () | |
StringTable & | ug::StringTableStream::table () |
template<> | |
bool | ug::Variant::to () const |
std::string | ug::StringTableStream::to_string () const |
template<> | |
Variant::Type | ug::Variant::type () |
template<> | |
const std::string & | ug::Variant::to< const std::string & > () const |
template<> | |
std::string | ug::Variant::to< std::string > () const |
template<> | |
Variant::Type | ug::Variant::type< const std::string & > () |
template<> | |
Variant::Type | ug::Variant::type< std::string > () |
Variables | |
std::string | ug::StringTableStream::RepeatedCol::content |
size_t | ug::StringTableStream::m_curCol |
size_t | ug::StringTableStream::m_curRow |
size_t | ug::StringTableStream::RepeatedCol::number |
StringTable | ug::StringTableStream::s |
Useful for printing a table like a stream to the terminal or into a file.
typedef Table<std::stringstream> ug::StringStreamTable |
typedef Table<std::string> ug::StringTable |
int ug::ArrayEraseEntry | ( | TType * | array, |
const TType & | entry, | ||
size_t | size | ||
) |
removes the first occurance of the specified entry.
Runs in O(size). copies all entries after the specified one to their predecessor. Be sure that TType supports operator= and operator==
Referenced by ug::MGEdgeInfo::remove_child(), and ug::MGFaceInfo::remove_child().
bool ug::ArrayReplaceEntry | ( | TType * | array, |
const TType & | newEntry, | ||
const TType & | oldEntry, | ||
size_t | size | ||
) |
replaces the first occurance of oldEntry with newEntry
Runs in O(size). Be sure that TType supports operator= and operator==
Referenced by ug::MGEdgeInfo::replace_child(), ug::MGFaceInfo::replace_child(), and ug::MGVolumeInfo::replace_child().
void ug::ArraySwapWithLast | ( | TType * | array, |
const TType & | entry, | ||
size_t | size | ||
) |
Swaps the first entry with the given value with the last entry in the list.
Runs in O(size). Iterates through all entries until the given one is found. Be sure that TType supports operator= and operator==
Referenced by ug::MGVolumeInfo::remove_child().
|
inline |
|
inline |
prints
* 1 * 1 * 1 *
nrRepeat | number of times to repeat |
contentToRepeat | what to repeat |
|
inline |
|
inline |
|
inline |
Returns a string-representation of the current entry.
The default implementation prints the entry to a std::stringstream and returns the associated string. Specializations exist for std::string and std::stringstream.
Referenced by ug::Table< T >::stream(), and ug::Table< T >::to_csv().
|
inline |
operator <<
c | a const char *. If contains a , sets curRow++, curCol=0 |
References ug::Table< T >::clear(), ug::StringTableStream::m_curCol, ug::StringTableStream::m_curRow, and ug::StringTableStream::s.
|
inline |
|
inline |
References ug::StringTableStream::to_string().
std::ostream & ug::operator<< | ( | std::ostream & | os, |
const Table< T > & | table | ||
) |
prints a table to the specified ostream.
Assumes that output begins at a new line. The method uses the template method size_t EstimateEntryWidth<T>(const Table<T>& table, size_t rowInd, size_t colInd). You may overload this method to adjust it to your datatypes. Note that specializations exist for std::string and std::stringstream.
References ug::Table< T >::stream().
|
inline |
|
inline |
operator <<. sets curCol++
t | anything which is ostream << -able |
References ug::StringTableStream::m_curCol, ug::StringTableStream::m_curRow, ug::StringTableStream::s, and ug::ToString().
|
inline |
prints
* 1 0 0 * 0 1 0 * 0 0 1 *
nrRepeat | number of times to repeat |
contentToRepeat | what to repeat |
References ug::ToString().
|
inline |
|
inline |
References ug::StringTableStream::s, and ug::ToString().
|
inline |
References ug::StringTableStream::m_curCol, and ug::StringTableStream::m_curRow.
|
inline |
References ug::StringTableStream::s.
|
inline |
References ug::Variant::to_bool().
|
inline |
References ug::StringTableStream::s, and ug::Table< T >::to_string().
Referenced by ug::bridge::LuaStackTraceString(), and ug::operator<<().
|
inlinestatic |
References ug::Variant::VT_BOOL.
|
inline |
|
inline |
|
inline |
|
inline |
std::string ug::StringTableStream::RepeatedCol::content |
Referenced by ug::StringTableStream::operator<<().
|
private |
|
private |
size_t ug::StringTableStream::RepeatedCol::number |
Referenced by ug::StringTableStream::operator<<().
|
private |