Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
util Namespace Reference

Namespaces

 test
 

Typedefs

typedef function< bool(string::value_type)> ChPredicate
 
typedef unsigned char uchar
 

Classes

class  _Fmt
 A front-end for using printf-style formatting. More...
 
struct  AccessCasted
 Helper template to access a given value, possibly converted or casted in a safe way. More...
 
struct  AccessCasted_O
 
class  Cloneable
 Types marked with this mix-in may be created by copy-construction (or move construction), but may be not reassigned thereafter. More...
 
struct  IDiv
 helper to treat int or long division uniformly More...
 
struct  IDiv< int >
 
struct  IDiv< long >
 
struct  IDiv< long long >
 
class  MoveAssign
 Types marked with this mix-in may be moved and move-assigned. More...
 
class  MoveOnly
 Types marked with this mix-in may be moved but not copied. More...
 
class  NoInstance
 Not meant to be instantiated in any way. More...
 
class  NonCopyable
 Any copy and copy construction prohibited. More...
 
struct  NullAccessor
 
struct  StringConv
 failsafe invocation of custom string conversion. More...
 
struct  StringConv< bool >
 
struct  StringConv< double >
 explicit specialisation to control precision of double values. More...
 
struct  StringConv< float >
 
struct  StringConv< lib::meta::Num< i > >
 
struct  StringConv< SP, show_SmartPointer< SP > >
 
struct  StringConv< std::tuple< TYPES...> >
 
struct  StringConv< X, enable_LexicalConversion< X > >
 
struct  StringConv< X, lib::meta::enable_CustomStringConversion< X > >
 
struct  WeakPtrComparator
 

Functions

template<typename MAP >
MAP::mapped_type const & access_or_default (MAP &map, typename MAP::key_type const &key, typename MAP::mapped_type const &refDefault)
 expose a reference to a map entry, with fall-back to some default object More...
 
bool almostEqual (double d1, double d2, unsigned int ulp=2)
 epsilon comparison of doubles. More...
 
template<typename IT , typename FUN >
bool and_all (IT i, IT end, FUN predicate)
 All quantification: check if all elements of a collection satisfy the given predicate. More...
 
template<typename Container , typename FUN >
enable_if< can_STL_ForEach
< Container >, bool > 
and_all (Container const &coll, FUN predicate)
 
template<typename IT , typename FUN >
enable_if< can_IterForEach< IT >
, bool > 
and_all (IT const &ii, FUN predicate)
 
template<typename CON , typename FUN , typename P1 , typename... ARGS>
bool and_all (CON const &elements, FUN function, P1 &&bind1, ARGS &&...args)
 Accept binding for arbitrary function arguments. More...
 
template<typename MAP >
bool contains (MAP &map, typename MAP::key_type const &key)
 shortcut for containment test on a map More...
 
template<typename T >
bool contains (std::set< T > const &set, T const &val)
 shortcut for set value containment test More...
 
template<typename T >
bool contains (std::string const &str, const T &val)
 shortcut for string value containment test More...
 
template<typename SEQ >
bool contains (SEQ const &cont, typename SEQ::const_reference val)
 shortcut for brute-force containment test in any sequential container More...
 
const char * cStr (string const &org)
 convenience shortcut: conversion to c-String via string. More...
 
bool endsWith (string const &str, string const &suffix)
 check if string ends with the given suffix More...
 
bool endsWith (string const &str, const char *suffix)
 
template<typename COLL >
enable_if
< treat_as_STL_Container< COLL >
, typename COLL::reference > 
first (COLL const &coll)
 access the first element of a STL-like container. More...
 
template<typename IT >
enable_if
< treat_as_LumieraIterator< IT >
, typename IT::reference > 
first (IT ii)
 extract the first element yielded by an Lumiera Forward Iterator. More...
 
template<typename I >
floordiv (I num, I den)
 floor function for integer arithmetics. More...
 
template<typename I >
IDiv< I > floorwrap (I num, I den)
 scale wrapping operation. More...
 
template<typename Container , typename FUN >
disable_if< can_IterForEach
< Container >, FUN > 
for_each (Container const &coll, FUN doIt)
 operate on all elements of a STL container. More...
 
template<typename IT , typename FUN >
enable_if< can_IterForEach< IT >
, FUN > 
for_each (IT const &ii, FUN doIt)
 operate on a Lumiera Forward Iterator until exhaustion. More...
 
template<typename CON , typename FUN , typename P1 , typename... ARGS>
void for_each (CON const &elements, FUN function, P1 &&bind1, ARGS &&...args)
 Accept binding for arbitrary function arguments. More...
 
template<typename MAP >
MAP::mapped_type getValue_or_default (MAP &map, typename MAP::key_type const &key, typename MAP::mapped_type defaultVal)
 fetch value from a Map, or return a default if not found More...
 
template<typename IT , typename FUN >
bool has_any (IT i, IT end, FUN predicate)
 Existential quantification: check if any element of a collection satisfies the given predicate. More...
 
template<typename Container , typename FUN >
enable_if< can_STL_ForEach
< Container >, bool > 
has_any (Container const &coll, FUN predicate)
 
template<typename IT , typename FUN >
enable_if< can_IterForEach< IT >
, bool > 
has_any (IT const &ii, FUN predicate)
 
template<typename CON , typename FUN , typename P1 , typename... ARGS>
bool has_any (CON const &elements, FUN function, P1 &&bind1, ARGS &&...args)
 Accept binding for arbitrary function arguments. More...
 
template<class CONT >
bool isnil (const CONT &container)
 a family of util functions providing a "no value whatsoever" test. More...
 
template<class CONT >
bool isnil (const CONT *pContainer)
 
template<class CONT >
bool isnil (CONT *pContainer)
 
bool isnil (const char *pCStr)
 
bool isnil (lib::time::Duration const &dur)
 
ChPredicate isPunct (is_space() or is_any_of(",;:#*~´`?\\=/&%![]{}<>"))
 punctuation to be replaced by '_' More...
 
template<class A , class B >
bool isSameObject (A const &a, B const &b)
 compare plain object identity, bypassing any custom comparison operators. More...
 
ChPredicate isValid (is_alnum() or is_any_of("-_.+$'()@"))
 characters to be retained More...
 
template<class CON >
string join (CON &&coll, string const &delim=", ")
 enumerate a collection's contents, separated by delimiter. More...
 
template<class X >
string join (std::initializer_list< X > const &&ili, string const &delim=", ")
 
template<typename COLL >
enable_if
< can_direct_access_Last< COLL >
, typename COLL::reference > 
last (COLL const &coll)
 access the last element of a STL-like container. More...
 
template<typename NUM , typename NB >
NUM limited (NB lowerBound, NUM val, NB upperBound)
 force a numeric to be within bounds, inclusively More...
 
 LUMIERA_ERROR_DECLARE (FORMAT_SYNTAX)
 "Syntax error in format string for boost::format" More...
 
 LUMIERA_ERROR_DEFINE (FORMAT_SYNTAX,"Syntax error in format string for boost::format")
 
template<class N1 , class N2 >
N1 max (N1 n1, N2 n2)
 
template<class N1 , class N2 >
N1 min (N1 n1, N2 n2)
 
template<typename NUM >
NUM noneg (NUM val)
 cut a numeric value to be >=0 More...
 
ChPredicate operator! (ChPredicate p)
 
std::ostream & operator<< (std::ostream &os, _Fmt const &fmt)
 send the formatted buffer directly to the output stream. More...
 
bool operator== (_Fmt const &left, _Fmt const &right)
 
bool operator== (_Fmt const &fmt, string const &str)
 
bool operator== (_Fmt const &fmt, const char *const cString)
 
bool operator== (string const &str, _Fmt const &fmt)
 
bool operator== (const char *const cString, _Fmt const &fmt)
 
template<typename SIG >
bool rawComparison (function< SIG > const &f1, function< SIG > const &f2)
 temporary workaround: tr1/functional should define public comparison operators for functor objects, but in the implementation provided by boost 1.34 it doesn't. More...
 
template<typename SIG1 , typename SIG2 >
bool rawComparison (function< SIG1 > const &, function< SIG2 > const &)
 catch-all for the comparison: functors with different base type are always "different" More...
 
bool rawComparison (void *f1, void *f2)
 variant with unchecked access More...
 
template<typename SIG >
HashVal rawHashValue (function< SIG > const &fun)
 workaround to calculate a hash value for a given function object. More...
 
template<class SET , typename PRD >
bool remove_if (SET &set, PRD test)
 remove all elements fulfilling a given predicate from a (sorted) set. More...
 
template<typename SEQ >
SEQ::iterator removeall (SEQ &coll, typename SEQ::value_type &val)
 shortcut for removing all copies of an Element in any sequential collection More...
 
void removePrefix (string &str, string const &prefix)
 
void removeSuffix (string &str, string const &suffix)
 
string sanitise (string const &org)
 produce an identifier based on the given string. More...
 
template<class NUM >
int sgn (NUM n)
 
template<typename X >
std::string showAddr (X &elm) noexcept
 
ostream & showAddr (std::ostream &, void const *addr)
 preconfigured format for pretty-printing of addresses More...
 
string showAddr (void const *addr) noexcept
 pretty-print an address as hex-suffix More...
 
std::string showBool (bool yes) noexcept
 human readable display of boolean values More...
 
string showDouble (double) noexcept
 pretty-print a double in fixed-point format More...
 
string showFloat (float val) noexcept
 
template<typename X >
std::string showPtr (X *ptr=nullptr)
 diagnostics helper for explicitly indicating pointers More...
 
string showSize (size_t val) noexcept
 
template<typename SP >
std::string showSmartPtr (SP const &smPtr, std::string label="smP")
 
int sNum (const char *pCStr)
 
int sNum (string const &spec)
 
bool startsWith (string const &str, string const &prefix)
 check if string starts with a given prefix More...
 
bool startsWith (string const &str, const char *prefix)
 
template<class CON , typename... ELMS>
CON stringify (ELMS const &...elms)
 convert a sequence of elements to string More...
 
template<class IT >
auto stringify (IT &&src)
 convert to string as transforming step in a pipeline More...
 
template<typename TY >
std::string toString (TY const &val) noexcept
 get some string representation of any object, reliably. More...
 
string trim (string const &org)
 remove leading and trailing whitespace More...
 
template<typename TY >
std::string typedString (TY const &val) noexcept
 indicate type and possibly a (custom) conversion to string More...
 
template<class OBJ >
OBJ * unConst (const OBJ *o)
 shortcut to save some typing when having to define const and non-const variants of member functions More...
 
template<class OBJ >
OBJ & unConst (OBJ const &ro)
 
uint uNum (const char *pCStr)
 positive integral number from textual representation More...
 
uint uNum (string const &spec)
 

Typedef Documentation

typedef unsigned char uchar

Definition at line 139 of file format-string.hpp.

typedef function<bool(string::value_type)> ChPredicate

Definition at line 48 of file util.cpp.

Function Documentation

std::string showDouble ( double  val)
noexcept

pretty-print a double in fixed-point format

Returns
fixed point string representation, never empty
Note
we set an explicit precision, since this is a diagnostic facility
Remarks
typically do not want to see all digits, but, for test code, we do want a predictable string representation of simple fractional values like 0.1 (which can not be represented as binary floats)

Definition at line 340 of file format-obj.cpp.

Referenced by StringConv< double >::invoke().

+ Here is the caller graph for this function:

std::string showFloat ( float  val)
noexcept

Definition at line 352 of file format-obj.cpp.

Referenced by StringConv< float >::invoke().

+ Here is the caller graph for this function:

std::string showSize ( size_t  val)
noexcept

Definition at line 364 of file format-obj.cpp.

Referenced by FamilyMember< TY >::operator string().

+ Here is the caller graph for this function:

std::ostream & showAddr ( ostream &  stream,
void const *  addr 
)

preconfigured format for pretty-printing of addresses

Note
show only the trailing X bytes of any address

Definition at line 376 of file format-obj.cpp.

Referenced by showAddr(), showPtr(), and showSmartPtr().

+ Here is the caller graph for this function:

std::string showAddr ( void const *  addr)
noexcept

pretty-print an address as hex-suffix

Definition at line 390 of file format-obj.cpp.

References showAddr().

+ Here is the call graph for this function:

std::string toString ( TY const &  val)
inlinenoexcept

get some string representation of any object, reliably.

A custom string conversion operator is invoked, if applicable, while all lexically convertible types (numbers etc) are treated by boost::lexical_cast. For double or float values, hard wired rounding to a fixed number of digits will be performed, to yield a predictable display of printed unit-test results.

Definition at line 174 of file format-obj.hpp.

References StringConv< X, COND >::invoke().

Referenced by FormatHelper_test::check2String(), Record< VAL >::child(), TupleElementDisplayer< TY, BASE, TUP, idx >::dump(), AbstractTangible_test::invokeCommand(), MementoTie< SIG, MEM >::operator std::string(), SubId< I >::operator string(), Index< POA >::Cluster::operator string(), ElementExtractor< lib::diff::Rec, std::tuple< TYPES...> >::Access< i >::operator TargetType< i >(), proc::control::test::protocolled(), UICoord::Builder::tab(), EventLog::verifyEvent(), and Nexus::wasInvoked().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string util::typedString ( TY const &  val)
inlinenoexcept

indicate type and possibly a (custom) conversion to string

Returns
human readable type name '|' string representation. or just the type, when no string representation available

Definition at line 187 of file format-obj.hpp.

References StringConv< X, COND >::invoke(), and lib::meta::typeStr().

+ Here is the call graph for this function:

std::ostream& util::operator<< ( std::ostream &  os,
_Fmt const &  fmt 
)

send the formatted buffer directly to the output stream.

Note
this is more efficient than creating a string and outputting that, because boost::format internally uses a string-stream to generate the formatted representation, relying on the C++ output framework

Definition at line 246 of file format-string.cpp.

References _Fmt::formatter_.

util::LUMIERA_ERROR_DEFINE ( FORMAT_SYNTAX  ,
"Syntax error in format string for boost::format"   
)
util::LUMIERA_ERROR_DECLARE ( FORMAT_SYNTAX  )

"Syntax error in format string for boost::format"

bool util::operator== ( _Fmt const &  left,
_Fmt const &  right 
)
inline

Definition at line 474 of file format-string.hpp.

bool util::operator== ( _Fmt const &  fmt,
string const &  str 
)
inline

Definition at line 480 of file format-string.hpp.

bool util::operator== ( _Fmt const &  fmt,
const char *const  cString 
)
inline

Definition at line 486 of file format-string.hpp.

bool util::operator== ( string const &  str,
_Fmt const &  fmt 
)
inline

Definition at line 492 of file format-string.hpp.

bool util::operator== ( const char *const  cString,
_Fmt const &  fmt 
)
inline

Definition at line 498 of file format-string.hpp.

CON util::stringify ( ELMS const &...  elms)
inline

convert a sequence of elements to string

Parameters
elmssequence of arbitrary elements
Template Parameters
CONthe container type to collect the results
Returns
a collection of type CON, initialised by the string representation of the given elements

Definition at line 119 of file format-util.hpp.

Referenced by FormatHelper_test::checkStringify(), join(), and TreeMutatorBinding_test::mutateCollection().

+ Here is the caller graph for this function:

auto util::stringify ( IT &&  src)
inline

convert to string as transforming step in a pipeline

Parameters
srca "Lumiera Forward Iterator" with arbitrary result type
Returns
a "Lumiera Forward Iterator" with string elements
See also
FormatHelper_test::checkStringify()

Definition at line 133 of file format-util.hpp.

References lib::transformIterator().

+ Here is the call graph for this function:

string util::join ( CON &&  coll,
string const &  delim = ", " 
)
inline

enumerate a collection's contents, separated by delimiter.

Parameters
collsomething that is standard-iterable
Returns
all contents converted to string and joined into a single string, with separators interspersed.
Remarks
based ostringstream; additionally, we use our failsafe string conversion, which in turn invokes custom string conversion, or lexical_cast as appropriate.
alternatively, the boost::join library function could be used, which works on arbitrary sequences, which incurs some additional weight (both in terms of header include and debug code size). And failures on template substitution tend to be hard to understand, since this generic sequence concept is just so danm absolutely generic (In fact that was the reason why I gave up and just rolled our own join utility)

Definition at line 191 of file format-util.hpp.

References stringify().

Referenced by EventMatch::arg(), EventMatch::argMatch(), BusTerm_test::attachNewBusTerm(), PlaceholderCommand< ARGS >::capture(), BusTerm_test::captureStateMark(), FormatHelper_test::checkStringJoin(), BusTerm_test::clearStates(), BusTerm_test::commandInvocation(), IterTreeExplorer_test::demonstrate_LayeredEvaluation(), MutationMessage_test::demonstrate_treeApplication(), BuilderDoxygen::DoxySourceScan(), AbstractTangible_test::invokeCommand(), join(), AbstractTangible_test::markState(), AbstractTangible_test::mutate(), TreeMutatorBinding_test::mutateAttribute(), TreeMutatorBinding_test::mutateCollection(), TreeMutatorBinding_test::mutateDummy(), AbstractTangible_test::notify(), Record< VAL >::operator std::string(), Cmdline::operator string(), LocationRule::operator string(), SessionCommandFunction_test::perform_massivelyParallel(), BusTerm_test::pushDiff(), ThreadLocal_test::run(), DiffTreeApplication_test::run(), util::test::show(), TestMutationTarget::showContent(), TestMutationTarget::showSrcBuffer(), TreeMutator_test::simpleCollectionBinding(), IterCursor_test::simpleIteration(), GenericRecordRepresentation_test::simpleUsage(), IterCursor_test::switchDirection(), UICoordResolver_test::verify_backingQuery(), UICoord_test::verify_basics(), PathArray_test::verify_boundaries(), TestEventLog_test::verify_callLogging(), MutationMessage_test::verify_diagnostics(), TestEventLog_test::verify_eventLogging(), TestEventLog_test::verify_genericLogging(), DiagnosticContext_test::verify_heavilyParallelUsage(), PathArray_test::verify_iteration(), TestEventLog_test::verify_logJoining(), AbstractTangible_test::verify_mockManipulation(), TestEventLog_test::verify_simpleUsage(), and BusTerm_test::verifyNotifications().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string util::join ( std::initializer_list< X > const &&  ili,
string const &  delim = ", " 
)
inline

Definition at line 211 of file format-util.hpp.

References join().

+ Here is the call graph for this function:

bool util::rawComparison ( function< SIG > const &  f1,
function< SIG > const &  f2 
)
inline

temporary workaround: tr1/functional should define public comparison operators for functor objects, but in the implementation provided by boost 1.34 it doesn't.

To get at least some comparison capability, we do a brute force comparison of the functor's internal data.

Note
use with caution. This implementation relies on internal details of boost/function; but it is rather conservative and might deem functors "different" erroneously, due to garbage in the internal functor data's storage

Definition at line 123 of file functor-util.hpp.

Referenced by Comparator< function< SIG > >::equals(), and FunctorUtil_test::verifyBruteForceComparison().

+ Here is the caller graph for this function:

bool util::rawComparison ( function< SIG1 > const &  ,
function< SIG2 > const &   
)
inline

catch-all for the comparison: functors with different base type are always "different"

Definition at line 136 of file functor-util.hpp.

bool util::rawComparison ( void *  f1,
void *  f2 
)
inline

variant with unchecked access

Definition at line 144 of file functor-util.hpp.

HashVal util::rawHashValue ( function< SIG > const &  fun)
inline

workaround to calculate a hash value for a given function object.

Note
use with caution. This implementation relies on internal details of boost/function; it can be expected to be rather conservative, i.e. yielding different hash values for objects, which actually are semantically equivalent.
Warning
especially function objects bound to member functions aren't fully supported. It may happen that we miss differences on the offset part and only hash the "this" pointer on some platform.

Definition at line 165 of file functor-util.hpp.

std::string util::showAddr ( X &  elm)
inlinenoexcept

Definition at line 375 of file meta/util.hpp.

References showAddr().

+ Here is the call graph for this function:

std::string util::showPtr ( X *  ptr = nullptr)
inline

diagnostics helper for explicitly indicating pointers

Definition at line 384 of file meta/util.hpp.

References lib::meta::BOTTOM_INDICATOR, StringConv< X, COND >::invoke(), showAddr(), and lib::meta::typeStr().

+ Here is the call graph for this function:

std::string util::showSmartPtr ( SP const &  smPtr,
std::string  label = "smP" 
)
inline

Definition at line 392 of file meta/util.hpp.

References lib::meta::BOTTOM_INDICATOR, showAddr(), and lib::meta::typeStr().

Referenced by _Fmt::Converter< SP, lib::meta::enable_if< _shall_show_smartWrapper< SP > > >::dump(), and StringConv< SP, show_SmartPointer< SP > >::invoke().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string util::showBool ( bool  yes)
inlinenoexcept

human readable display of boolean values

Returns
"`true`" or "`false`"

Definition at line 404 of file meta/util.hpp.

References lib::meta::BOOL_FALSE_STR, and lib::meta::BOOL_TRUE_STR.

Referenced by StringConv< bool >::invoke().

+ Here is the caller graph for this function:

bool util::isnil ( lib::time::Duration const &  dur)
inline

Definition at line 642 of file timevalue.hpp.

Referenced by SubsystemRunner::allDead(), UICoord::Builder::append(), lib::query::appendTerms(), ProcPatt::attach(), StreamTypeBasics_test::basicStreamTypeProperties(), Binding::Binding(), TimeValue_test::buildDuration(), IterTools_test::buildFilterIterator(), ScopedCollection_test::building_RAII_Style(), AbstractMO::buildShortID(), IterTools_test::buildWrappedSingleElement(), QueryUtils_test::check_extractID(), CommandArgument_test::checkArgumentComparison(), MObjectRef_test::checkBuildMObjectRef(), Media::checkCompound(), DependentAssets_test::checkDependencyMechanics(), Symbol_test::checkEmptyLiteral(), OpaqueHolder_test::checkHandling(), SymbolHashtable_test::checkHashFunction(), IterAdapterSTL_test::checkIteratorSnapshot(), JobPlanning::checkPoint(), FormatHelper_test::checkPrefixSuffix(), OpaqueHolder_test::checkSpecialSubclass(), ScopedHolder_test::checkSTLContainer(), FormatHelper_test::checkStringify(), Symbol_test::checkSymbolCreation(), DependentAssets_test::checkUnlinking(), ScopePath_test::clear(), BusTerm_test::clearStates(), Builder< TimeGrid >::commit(), ToolFactory::configureFabrication(), GenericRecordRepresentation_test::copy_and_move(), TimeGridBasics_test::createGrid_simplified(), StructFactoryImpl::createIdent(), QueryFocusStack_test::createStack(), CommandArgument_test::createTuples(), OutputMapping_test::default_mapping(), IterTreeExplorer_test::demonstrate_LayeredEvaluation(), MutationMessage_test::demonstrate_standardUsage(), MutationMessage_test::demonstrate_treeApplication(), ScopedPtrVect_test::detaching(), lumiera::error::detailInfo(), MockTable::detect_case(), GenNodeLocationQuery::determineAnchor(), JobPlanning::discoverPrerequisites(), MockElm::doClearMsg(), TestOption_test::doIt(), QueryText_test::emptyRepresentation(), Suite::enrol(), EventMatch::evaluateQuery(), JobTicket::ExplorationState::ExplorationState(), Error::extractCauseMsg(), StructFactoryImpl::fabricate(), MockTable::fabricate_Sequence_on_demand(), MockTable::fabricate_Timeline_on_demand(), Appconfig_test::fetchSetupValue(), WindowLocator::findActiveWindow(), EventMatch::findEvent(), WindowLocator::findFocusWindow(), EventMatch::foundSolution(), Config::get(), StructFactoryImpl::getFork_forSequence(), UICoord::getPath(), Query< Placement< MO > >::getQueryDefinition(), OutputMapping_test::instance_copy(), ScopePath_test::invalidPath(), UICoord::isComplete(), MockElm::isError(), UICoord::isExtendedBelow(), UICoord::isIncomplete(), UICoord::isPresent(), Label::isValid(), ExecResult::isValid(), Clip::isValid(), Result< void >::isValid(), Asset::Ident::isValid(), ScopedPtrVect_test::iterating(), ScopedCollection_test::iterating(), LinkedElements_test::iterating(), TestMutationTarget::logSkip(), lumiera_get_plugin_path_default(), lumiera::error::lumiera_unexpectedException(), OutputMapping_test::map_and_retrieve(), EventMatch::matchArgsRegExp(), EventMatch::matchArguments(), ExecResult::maybeThrow(), AbstractTangible_test::mutate(), TreeMutatorBinding_test::mutateAttribute(), TreeMutatorBinding_test::mutateCollection(), TreeMutatorBinding_test::mutateDummy(), TreeMutatorBinding_test::mutateGenNode(), StructFactory::newInstance(), lib::query::normaliseID(), AbstractTangible_test::notify(), GenNodeBasic_test::objectShortcut(), EventMatch::operator bool(), JobPlanning::operator Job(), Record< VAL >::operator std::string(), Category::operator string(), ScopePath::operator string(), UICoord::operator string(), MediaFactory::operator()(), lib::operator==(), UICoordResolver::pathResolution(), Pipe::Pipe(), PlayProcess::PlayProcess(), LinkedElements_test::populate_by_iterator(), lib::meta::primaryTypeComponent(), MultiFact_test::produce_simple_values(), MultiFact_test::produce_smart_pointers(), JobTicket::ExplorationState::pushAllPrerequisites(), BusTerm_test::pushDiff(), MediaAccessMock::queryFile(), MediaAccessFacade::queryFile(), QueryKey::QueryKey(), TimeValue_test::random_or_get(), TimeQuantisation_test::random_or_get(), TimeMutation_test::random_or_get(), TimeControl_test::random_or_get(), AllocationCluster::MemoryManager::reset(), LookupPreconfigured< TY, BASE >::resolve(), HelloWorld_test::run(), CompoundMedia_test::run(), TimeBasics_test::run(), CreateAsset_test::run(), IdentityOfAssets_test::run(), StateMapGroupingStorage_test::run(), IterQueue_test::run(), MakeClip_test::run(), IterStack_test::run(), BasicPipe_test::run(), QueryUtils_test::run(), SymbolHashtable_test::run(), UniqueMallocOwner_test::run(), Singleton_test::run(), DefsManager_test::run(), DiffListGeneration_test::run(), SingletonSubclass_test::run(), DiffListApplication_test::run(), MultiFactSingleton_test::run(), UtilFloordiv_test::run(), Digxel_test::run(), DiffTreeApplication_test::run(), GenNodeBasic_test::sequenceIteration(), Record< VAL >::Mutator::set(), UICoord::setTailSequence(), MObject::shortID(), MaybeValue_test::show_basicOperations(), SubsystemRunner::sigTerm(), UILocationSolver_test::simple_usage_example(), TreeMutator_test::simpleAttributeBinding(), TreeMutator_test::simpleCollectionBinding(), IterCursor_test::simpleIteration(), ScopedPtrVect_test::simpleUsage(), ScopedCollection_test::simpleUsage(), LinkedElements_test::simpleUsage(), TypedCounter_test::simpleUsageTest(), CommandArgument_test::simulateCmdLifecycle(), SessionCommandFunction_test::startDispatcher(), Suite::Suite(), IterCursor_test::switchDirection(), GenNodeBasic_test::symbolReference(), PlanningState::usingSequence(), IterTreeExplorer_test::verify_asIterSource(), UICoordResolver_test::verify_backingQuery(), PathArray_test::verify_basics(), UICoord_test::verify_basics(), MutationMessage_test::verify_builder(), PathArray_test::verify_comparisons(), UILocationSolver_test::verify_cornerCases(), ScopedCollection_test::verify_defaultPopulator(), CommandSetup_test::verify_DefinitionRegistration(), MutationMessage_test::verify_diagnostics(), VirtualCopySupport_test::verify_disabledCopySupport(), LinkedElements_test::verify_ExceptionSafety(), IterTools_test::verify_filterExtension(), IterTreeExplorer_test::verify_FilterIterator(), IterTools_test::verify_filterRepetitions(), VirtualCopySupport_test::verify_fullVirtualCopySupport(), TimeValue_test::verify_invalidFramerateProtection(), PathArray_test::verify_iteration(), ScopedCollection_test::verify_iteratorPopulator(), IterTreeExplorer_test::verify_IterSource(), UICoordResolver_test::verify_mutateCoverPartially(), VirtualCopySupport_test::verify_noAssignementSupport(), LinkedElements_test::verify_nonOwnership(), VirtualCopySupport_test::verify_onlyMovableSupport(), IterTreeExplorer_test::verify_scheduledExpansion(), IterSource_test::verify_simpleIters(), TestEventLog_test::verify_simpleUsage(), CallQueue_test::verify_SimpleUse(), IterSource_test::verify_singleValIter(), DispatcherInterface_test::verify_standardDispatcherUsage(), ScopedCollection_test::verify_subclassPopulator(), VirtualCopySupport_test::verify_TestFixture(), IterSource_test::verify_transformIter(), IterTreeExplorer_test::verify_transformOperation(), IterTreeExplorer_test::verify_treeExpandingIterator(), IterTreeExplorer_test::verify_wrappedIterator(), IterTreeExplorer_test::verify_wrappedState(), TypedID_test::verifyAutomaticCleanup(), CommandQueue_test::verifyBasics(), IterExplorer_test::verifyChainedIterators(), IterCursor_test::verifyComparisons(), IterTools_test::verifyComparisons(), IterAdapter_test::verifyComparisons(), GenericRecordRepresentation_test::verifyCreation(), CommandEquality_test::verifyMementoEquality(), GenericRecordRepresentation_test::verifyMutations(), IterTools_test::verifyPullLast(), IterExplorer_test::verifyRawChainedIterators(), IterExplorer_test::verifyStateAdapter(), Error::what(), and IterAdapter_test::wrapIterRange().

enable_if< treat_as_STL_Container<COLL>, typename COLL::reference > util::first ( COLL const &  coll)
inline

access the first element of a STL-like container.

Note
the container is taken by const& and the const is stripped before access.

Definition at line 107 of file util-coll.hpp.

References lib::meta::unwrap().

Referenced by lib::query::normaliseID(), Index< POA >::Entry::operator string(), Sequence::populateDummySequence(), PlacementIndex::Table::remove_all_from_scope(), Tree< T, tree_node_allocator >::reparent(), Tree< T, tree_node_allocator >::replace(), Query< RES >::resolveBy(), IterSource< const TestFrame >::startIteration(), and UtilCollection_test::verify_accessFirstLast().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

enable_if< can_direct_access_Last<COLL>, typename COLL::reference > util::last ( COLL const &  coll)
inline

access the last element of a STL-like container.

Note
the container is taken by const& and the const is stripped before access.

Definition at line 123 of file util-coll.hpp.

References lib::meta::unwrap().

Referenced by ProcPatt::attach(), Tree< T, tree_node_allocator >::reparent(), Tree< T, tree_node_allocator >::replace(), UICoord::setTailSequence(), UtilCollection_test::verify_accessFirstLast(), and DispatcherInterface_test::verify_standardDispatcherUsage().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

enable_if< treat_as_LumieraIterator<IT>, typename IT::reference > util::first ( IT  ii)
inline

extract the first element yielded by an Lumiera Forward Iterator.

Warning
the iterator is modified.

Definition at line 139 of file util-coll.hpp.

bool util::and_all ( IT  i,
IT  end,
FUN  predicate 
)
inline
bool util::has_any ( IT  i,
IT  end,
FUN  predicate 
)
inline

Existential quantification: check if any element of a collection satisfies the given predicate.

Actually, a short-circuit evaluation is performed.

Definition at line 94 of file util-foreach.hpp.

Referenced by UtilForeach_test::check_existence_quant(), UtilForeach_test::check_foreach_bind(), UtilForeach_test::check_foreach_bind_const(), UtilForeach_test::check_foreach_lambda(), UtilForeach_test::check_foreach_memFun(), UtilForeach_test::check_foreach_plain(), UtilForeach_test::check_invoke_on_each(), UtilForeach_test::check_ref_argument_bind(), PlacementIndex::Validator::checkEntry(), and has_any().

+ Here is the caller graph for this function:

disable_if< can_IterForEach<Container>, FUN > util::for_each ( Container const &  coll,
FUN  doIt 
)
inline

operate on all elements of a STL container.

Note
the container is taken by const& and the const is stripped before iteration.
Todo:
reconsider if using rvalue references covers the "inline iteration" use case sufficiently, so that we can get rid of the unwrapping and thus get back to strict const correctness.
Note
this case is the default and kicks in unless we detect a Lumiera iterator. The handling is different for and_all

Definition at line 122 of file util-foreach.hpp.

References for_each(), and lib::meta::unwrap().

Referenced by SubID_test::buildHashtable(), UtilForeach_test::check_foreach_bind(), UtilForeach_test::check_foreach_bind_const(), UtilForeach_test::check_foreach_lambda(), UtilForeach_test::check_foreach_memFun(), UtilForeach_test::check_foreach_plain(), UtilForeach_test::check_invoke_on_each(), QueryUtils_test::check_normaliseID(), UtilForeach_test::check_ref_argument_bind(), UtilForeach_test::check_wrapped_container_passing(), AllocationCluster_test::checkAllocation(), TestHelper_test::checkGarbageStr(), PlacementIndex::Validator::checkScope(), ElementTracker< asset::Timeline >::clear(), CommandArgument_test::createTuples(), DefsRegistry::dump(), proc::asset::dumpAssetManager(), Asset::enable(), for_each(), Index< POA >::isValid(), AssetManager::remove(), OpaqueHolder_test::run(), PolymorphicValue_test::run(), CommandArgument_test::serialiseArgTuples(), SubsystemRunner::shutdownAll(), IterAdapter_test::simpleUsage(), CmdlineWrapper_test::testLine(), TypedCounter_test::tortureTest(), SubsystemRunner::triggerStartup(), Asset::unlink(), IterAdapter_test::useSimpleWrappedContainer(), PlacementIndex::Validator::Validator(), Table::verify_all_buffers_freed(), TypedID_test::verifyAssetFrontend(), TypedID_test::verifyInstanceAccess(), and BufferProviderProtocol_test::verifyStandardCase().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

enable_if< can_IterForEach<IT>, FUN > util::for_each ( IT const &  ii,
FUN  doIt 
)
inline

operate on a Lumiera Forward Iterator until exhaustion.

Definition at line 138 of file util-foreach.hpp.

References for_each().

+ Here is the call graph for this function:

enable_if< can_STL_ForEach<Container>, bool > util::and_all ( Container const &  coll,
FUN  predicate 
)
inline

Definition at line 151 of file util-foreach.hpp.

References and_all(), and lib::meta::unwrap().

+ Here is the call graph for this function:

enable_if< can_IterForEach<IT>, bool > util::and_all ( IT const &  ii,
FUN  predicate 
)
inline

Definition at line 166 of file util-foreach.hpp.

References and_all().

+ Here is the call graph for this function:

enable_if< can_STL_ForEach<Container>, bool > util::has_any ( Container const &  coll,
FUN  predicate 
)
inline

Definition at line 178 of file util-foreach.hpp.

References has_any(), and lib::meta::unwrap().

+ Here is the call graph for this function:

enable_if< can_IterForEach<IT>, bool > util::has_any ( IT const &  ii,
FUN  predicate 
)
inline

Definition at line 193 of file util-foreach.hpp.

References has_any().

+ Here is the call graph for this function:

void util::for_each ( CON const &  elements,
FUN  function,
P1 &&  bind1,
ARGS &&...  args 
)
inline

Accept binding for arbitrary function arguments.

Note
obviously one of those arguments must be a placeholder

Definition at line 208 of file util-foreach.hpp.

References for_each().

Referenced by for_each().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool util::and_all ( CON const &  elements,
FUN  function,
P1 &&  bind1,
ARGS &&...  args 
)
inline

Accept binding for arbitrary function arguments.

Note
obviously one of those arguments must be a placeholder

Definition at line 221 of file util-foreach.hpp.

References and_all().

+ Here is the call graph for this function:

bool util::has_any ( CON const &  elements,
FUN  function,
P1 &&  bind1,
ARGS &&...  args 
)
inline

Accept binding for arbitrary function arguments.

Note
obviously one of those arguments must be a placeholder

Definition at line 234 of file util-foreach.hpp.

References has_any().

+ Here is the call graph for this function:

I util::floordiv ( num,
den 
)
inline

floor function for integer arithmetics.

Unlike the built-in integer division, this function always rounds towards the next smaller integer, even for negative numbers.

Warning
floor on doubles performs way better
See also
UtilFloordiv_test

Definition at line 91 of file util-quant.hpp.

References IDiv< I >::quot, and IDiv< I >::rem.

Referenced by lumiera_time_frames(), lib::time::operator*(), UtilFloordiv_test::runPerformanceTest(), UtilFloordiv_test::verifyBehaviour(), and UtilFloordiv_test::verifyIntegerTypes().

+ Here is the caller graph for this function:

IDiv<I> util::floorwrap ( num,
den 
)
inline

scale wrapping operation.

Quantises the numerator value into the scale given by the denominator. Unlike the built-in integer division, this function always rounds towards the next smaller integer and also relates the remainder (=modulo) to this next lower scale grid point.

Returns
quotient and remainder packed into a struct
See also
UtilFloorwarp_test

Definition at line 113 of file util-quant.hpp.

References IDiv< I >::quot, and IDiv< I >::rem.

Referenced by UtilFloorwrap_test::showWrap().

+ Here is the caller graph for this function:

bool util::almostEqual ( double  d1,
double  d2,
unsigned int  ulp = 2 
)
inline

epsilon comparison of doubles.

Remarks
Floating point calculations are only accurate up to a certain degree, and we need to adjust for the magnitude of the involved numbers, since floating point numbers are scaled by the exponent. Moreover, we need to be careful with very small numbers (close to zero), where calculating the difference could yield coarse grained 'subnormal' values.
Parameters
ulpnumber of grid steps to allow for difference (default = 2). Here, a 'grid step' is the smallest difference to 1.0 which can be represented in floating point ('units in the last place')
Warning
don't use this for comparison against zero, rather use an absolute epsilon then.
See also
https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon
https://en.wikipedia.org/wiki/Unit_in_the_last_place

Definition at line 143 of file util-quant.hpp.

Referenced by GenNodeBasic_test::objectShortcut(), GenNodeBasic_test::sequenceIteration(), and GenNodeBasic_test::simpleUsage().

+ Here is the caller graph for this function:

ChPredicate util::operator! ( ChPredicate  p)

Definition at line 49 of file util.cpp.

ChPredicate util::isValid ( is_alnum() or is_any_of("-_.+$'()@")  )
ChPredicate util::isPunct ( is_space() or is_any_of(",;:#*~´`?\\=/&%![]{}<>")  )

punctuation to be replaced by '_'

Referenced by sanitise().

+ Here is the caller graph for this function:

string sanitise ( string const &  org)

produce an identifier based on the given string.

remove non-standard-chars, reduce sequences of punctuation and whitespace to single underscores. The sanitised string will start with an alphanumeric character.

Example Conversions
   "Word"                             --> 'Word'
   "a Sentence"                       --> 'a_Sentence'
   "trailing Withespace  \t \n"       --> 'trailing_Withespace'
   "with    a   lot  \nof Whitespace" --> 'with_a_lot_of_Whitespace'
   "with\"much (punctuation)[]!"      --> 'withmuch_(punctuation)'
   "§&Ω%€  leading garbage"           --> 'leading_garbage'
   "mixed    Ω   garbage"             --> 'mixed_garbage'
   "Bääääh!!"                         --> 'Bh'
See also
sanitised-identifier-test.cpp
lib::meta::sanitisedSymbol()

Definition at line 57 of file util.cpp.

References isPunct(), and isValid().

Referenced by lib::query::normaliseID(), SanitizedIdentifier_test::print_clean(), and lib::meta::sanitisedFullTypeName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string trim ( string const &  org)

remove leading and trailing whitespace

Remarks
this function just forwards to boost::algorithm::trim_copy. Use this call when boost header inclusion is an issue, otherwise a direct invocation is likely to perform better, due to inlining.
Returns
a trimmed copy (default locale)

Definition at line 85 of file util.cpp.

Referenced by Record< VAL >::extractKey(), Record< VAL >::extractVal(), and Suite::run().

+ Here is the caller graph for this function:

int util::sgn ( NUM  n)
inline

Definition at line 56 of file util.hpp.

N1 util::min ( N1  n1,
N2  n2 
)
inline

Definition at line 63 of file util.hpp.

Referenced by limited().

+ Here is the caller graph for this function:

N1 util::max ( N1  n1,
N2  n2 
)
inline

Definition at line 70 of file util.hpp.

Referenced by limited().

+ Here is the caller graph for this function:

NUM util::noneg ( NUM  val)
inline

cut a numeric value to be >=0

Definition at line 78 of file util.hpp.

NUM util::limited ( NB  lowerBound,
NUM  val,
NB  upperBound 
)
inline

force a numeric to be within bounds, inclusively

Definition at line 86 of file util.hpp.

References max(), and min().

Referenced by sNum(), and uNum().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint util::uNum ( const char *  pCStr)
inline

positive integral number from textual representation

Returns
always a number, 0 in case of unparseable text, limited to 0 <= num <= LUMIERA_MAX_ORDINAL_NUMBER

Definition at line 96 of file util.hpp.

References limited(), and LUMIERA_MAX_ORDINAL_NUMBER.

Referenced by StructFactoryImpl::createIdent(), proc::mobject::_mapping::is_defaults_query_with_channel(), and uNum().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int util::sNum ( const char *  pCStr)
inline

Definition at line 104 of file util.hpp.

References limited(), and LUMIERA_MAX_ORDINAL_NUMBER.

Referenced by sNum().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint util::uNum ( string const &  spec)
inline

Definition at line 112 of file util.hpp.

References uNum().

+ Here is the call graph for this function:

int util::sNum ( string const &  spec)
inline

Definition at line 118 of file util.hpp.

References sNum().

+ Here is the call graph for this function:

bool util::isnil ( const CONT &  container)
inline

a family of util functions providing a "no value whatsoever" test.

Works on strings and all STL containers, includes NULL test for pointers

Definition at line 131 of file util.hpp.

bool util::isnil ( const CONT *  pContainer)
inline

Definition at line 138 of file util.hpp.

bool util::isnil ( CONT *  pContainer)
inline

Definition at line 145 of file util.hpp.

bool util::isnil ( const char *  pCStr)
inline

Definition at line 151 of file util.hpp.

bool util::startsWith ( string const &  str,
string const &  prefix 
)
inline

check if string starts with a given prefix

Definition at line 160 of file util.hpp.

Referenced by FormatHelper_test::checkPrefixSuffix(), GenNode::isNamed(), DispatcherLoop::processCommands(), and removePrefix().

+ Here is the caller graph for this function:

bool util::startsWith ( string const &  str,
const char *  prefix 
)
inline

Definition at line 166 of file util.hpp.

bool util::endsWith ( string const &  str,
string const &  suffix 
)
inline

check if string ends with the given suffix

Definition at line 173 of file util.hpp.

Referenced by FormatHelper_test::checkPrefixSuffix(), endsWith(), and removeSuffix().

+ Here is the caller graph for this function:

bool util::endsWith ( string const &  str,
const char *  suffix 
)
inline

Definition at line 182 of file util.hpp.

References endsWith().

+ Here is the call graph for this function:

void util::removePrefix ( string &  str,
string const &  prefix 
)
inline

Definition at line 188 of file util.hpp.

References startsWith().

Referenced by FormatHelper_test::checkPrefixSuffix().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void util::removeSuffix ( string &  str,
string const &  suffix 
)
inline

Definition at line 195 of file util.hpp.

References endsWith().

Referenced by FormatHelper_test::checkPrefixSuffix(), and lib::meta::primaryTypeComponent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool util::contains ( MAP &  map,
typename MAP::key_type const &  key 
)
inline

shortcut for containment test on a map

Definition at line 205 of file util.hpp.

Referenced by BasicSetup::__ensure_hasKey(), IndexTable< Val >::__rejectDuplicate(), SessionModifyParts_test::addForks(), UICoordResolver::attempt_trivialResolution(), QueryText_test::build_from_string(), DependentAssets_test::checkDependencyMechanics(), HashStandardToBoostBridge_test::checkHashtableUsage(), DependentAssets_test::checkUnlinking(), ModelPortRegistry::contains(), CommandInstanceManager::contains(), PlacementIndex::Table::contains(), Fab< SIG_Fab, ID >::contains(), Record< VAL >::contains(), OutputMapping< DEF >::contains(), TimelineWidget::create_timeline_tracks_from_branch(), BasicPipe_test::createExplicit(), ClipTrack::createTimelineClips(), Variant_test::createVariant(), Asset::defineDependency(), HashGenerator_test::demonstrate_boost_hash_weakness(), proc::asset::dependencyCheck(), EventMatch::find(), EventMatch::findCall(), EventMatch::findEvent(), TimelineLayoutHelper::get_track_header_rect(), QueryText::hasAtom(), TimelineSequenceHandling_test::indirect_SequenceHandling(), UICoord::isExplicit(), ModelPortRegistry::isRegistered(), TimelinePanelObsolete::loadState(), EventMatch::matchArguments(), EventMatch::matchAttribute(), EventMatch::matchType(), TreeMutatorBinding_test::mutateCollection(), TreeMutatorBinding_test::mutateDummy(), TreeMutatorBinding_test::mutateGenNode(), ConfigSelector< WiringDescriptorFactory, FunctionType, AllocationCluster & >::operator[](), OutputMapping< DEF >::operator[](), proc::control::test::protocolled(), ServiceAccessPoint< SessionServiceMutate, IMPL >::purgeScopeRecursively(), BusTerm_test::pushDiff(), CommandRegistry::remove(), PlacementIndex::Table::remove_all_from_scope(), PlacementIndex::Table::removeAll(), PlacementIndex::Table::removeEntry(), ClipTrack::removeOrphanedClips(), SessionModifyParts_test::removeParts(), QueryUtils_test::run(), Suite::run(), SymbolHashtable_test::run(), SessionElementQuery_test::run(), TimelineWidget::search_orphaned_tracks_in_branch(), GenNodeBasic_test::simpleUsage(), GenericRecordRepresentation_test::simpleUsage(), CommandUse1_test::standardUse(), GenNodeBasic_test::symbolReference(), CommandRegistry::track(), TrackingInMemoryBlockSequence::trackFrame(), TimelineSequenceHandling_test::verify_creation(), FormatString_test::verify_customType(), MutationMessage_test::verify_diagnostics(), HashGenerator_test::verify_Knuth_workaround(), TimelineSequenceHandling_test::verify_removalBinding(), TimelineSequenceHandling_test::verify_removalSequence(), and TrackingInMemoryBlockSequence::wasAllocated().

+ Here is the caller graph for this function:

bool util::contains ( std::set< T > const &  set,
T const &  val 
)
inline

shortcut for set value containment test

Definition at line 213 of file util.hpp.

bool util::contains ( std::string const &  str,
const T &  val 
)
inline

shortcut for string value containment test

Definition at line 221 of file util.hpp.

bool util::contains ( SEQ const &  cont,
typename SEQ::const_reference  val 
)
inline

shortcut for brute-force containment test in any sequential container

Definition at line 230 of file util.hpp.

References proc::mobject::session::test::find().

+ Here is the call graph for this function:

MAP::mapped_type util::getValue_or_default ( MAP &  map,
typename MAP::key_type const &  key,
typename MAP::mapped_type  defaultVal 
)
inline

fetch value from a Map, or return a default if not found

Definition at line 241 of file util.hpp.

Referenced by CommandRegistry::findDefinition(), and CommandRegistry::queryIndex().

+ Here is the caller graph for this function:

MAP::mapped_type const& util::access_or_default ( MAP &  map,
typename MAP::key_type const &  key,
typename MAP::mapped_type const &  refDefault 
)
inline

expose a reference to a map entry, with fall-back to some default object

Note
exposing a const reference; especially the default needs to reside somewhere at a safe storage location.
See also
lib::NullValue

Definition at line 258 of file util.hpp.

SEQ::iterator util::removeall ( SEQ &  coll,
typename SEQ::value_type &  val 
)
inline

shortcut for removing all copies of an Element in any sequential collection

Definition at line 272 of file util.hpp.

Referenced by SubsystemRunner::sigTerm(), and Asset::unlink().

+ Here is the caller graph for this function:

bool util::remove_if ( SET &  set,
PRD  test 
)

remove all elements fulfilling a given predicate from a (sorted) set.

Returns
true if anything has been removed.

Definition at line 285 of file util.hpp.

Referenced by ProcessTable::endProcess(), DefsRegistry::forget(), and RemoveFromSet_test::test_remove().

+ Here is the caller graph for this function:

OBJ* util::unConst ( const OBJ *  o)

shortcut to save some typing when having to define const and non-const variants of member functions

Definition at line 319 of file util.hpp.

Referenced by UICoord::accesComponent(), TrackingInMemoryBlockSequence::accessBlock(), TrackingInMemoryBlockSequence::accessFrame(), ScopedPtrVect< node::DummyTick >::allPtrs(), DispatcherLoop::awaitStateProcessed(), UICoordResolver::canAnchor(), UICoordResolver::canCover(), CombinedIteratorEvaluation< ITI, SEQ(SEQ), UnalteredPassThrough >::checkPoint(), RecursiveSelfIntegration< SRC, FUN >::checkPoint(), DataCap::childIter(), StateMapGroupingStorage::clearProperty(), CommandInstanceManager::contains(), IterTreeExplorer_test::demonstrate_LayeredEvaluation(), EvaluationBufferStrategy< IT, IterStack >::emptySequence(), DataCap::expand(), IterExploreSource< VAL >::expandableSource(), RecursiveExhaustingEvaluation< SRC, FUN, DepthFirstEvaluationBuffer >::feed(), ReplaceableItem< MEM >::get(), Variant< DataValues >::get(), DataCap::get(), IterTool< TransformingCore< IT, VAL > >::hasData(), UICoord::isPresent(), Extension::isValid(), Index< POA >::isValid(), UICoord::isWildcard(), GenNode::ScopeExplorerIterator::level(), DataCap::matchBool(), DataCap::matchLuid(), DataCap::matchRec(), NotificationService::mutate(), Extension::newCopy(), DiffLanguage< I, E >::DiffStep::operator string(), ReplaceableItem< X, COND >::operator X const &(), UICoord::pathSeq(), StateMapGroupingStorage::record(), DataCap::recordType(), IterStack< IT >::size(), Extension::size(), IterQueue< Operation >::size(), IterAdapter< Pos, DataHandle >::source(), IterDequeStorage< Operation >::yield(), JobPlanning::yield(), DiffDetector< SEQ >::DiffFrame::yield(), PlanningStepGenerator::yield(), and LinkedElements< N, ALO >::IterationState::yield().

+ Here is the caller graph for this function:

OBJ& util::unConst ( OBJ const &  ro)

Definition at line 326 of file util.hpp.

bool util::isSameObject ( A const &  a,
B const &  b 
)
inline

compare plain object identity, bypassing any custom comparison operators.

Definition at line 337 of file util.hpp.

Referenced by ModelPortRegistry_test::accessing_ModelPorts(), QueryFocusStack_test::automaticFrameHandling(), HashIndexed_test::buildHashtable(), ScopePath_test::check_Identity_and_Copy(), ScopePath_test::check_RefcountProtection(), CommandRegistry_test::checkAllocation(), Symbol_test::checkComparisons(), Digxel_test::checkCopy(), EntryID_test::checkCreation(), EntryID_test::checkErasure(), OpaqueHolder_test::checkHandling(), Symbol_test::checkLiteral(), PlacementIndexQuery_test::checkQueryResolver(), ScopePath_test::checkRelations(), PlacementIndex_test::checkSimpleAccess(), Symbol_test::checkSymbolCreation(), PlacementIndex_test::checkTypedAccess(), GenericRecordRepresentation_test::copy_and_move(), ScopePath_test::invalidPath(), ScopePath_test::navigate(), PolymorphicValue_test::operate(), ReplaceableItem< MEM >::operator=(), ScopePath::operator=(), SmpteTC::operator=(), ItemWrapper< VAL >::operator=(), Provision< AD >::operator=(), InPlaceAnyHolder< siz, InPlaceAnyHolder_useCommonBase< BA > >::operator=(), MultiFact_test::pass_additional_arguments(), MultiFact_test::produce_simple_values(), MultiFact_test::produce_smart_pointers(), StateMapGroupingStorage_test::run(), PlacementRef_test::run(), NullValue_test::run(), Singleton_test::run(), TypedAllocationManager_test::run(), AccessCasted_test::run(), SingletonSubclass_test::run(), SimpleAllocator_test::run(), MultiFactSingleton_test::run(), GenNodeBasic_test::symbolReference(), TestFrame_test::useFrameTable(), CommandUse1_test::usePrototype(), Job::usesClosure(), DependencyFactory_test::verify_automaticReplacement(), DependencyConfiguration_test::verify_customFactory(), DependencyFactory_test::verify_defaultSingletonCreation(), DependencyFactory_test::verify_FactoryDefinition_is_sticky(), JobHash_test::verify_job_identity(), LinkedElements_test::verify_nonOwnership(), DependencyConfiguration_test::verify_Singleton(), DependencyFactory_test::verify_SubclassCreation(), BufferMetadata_test::verifyBasicProperties(), CommandEquality_test::verifyCommandEquality(), PolymorphicValue_test::verifyCreation_and_Copy(), ItemWrapper_test::verifyFunctionRefResult(), PlacementScope_test::verifyLookup(), PlacementScope_test::verifyNavigation(), BufferProviderProtocol_test::verifyObjectAttachment(), IterExplorer_test::verifyRawChainedIterators(), ItemWrapper_test::verifySaneMoveHandling(), ReplaceableItem_test::verifyUsage(), ReplaceableItem_test::verifyWrappedPtr(), ItemWrapper_test::verifyWrappedRef(), BufferProvider::was_created_by_this_provider(), and GenericRecordRepresentation_test::wrapRef().

+ Here is the caller graph for this function: