casa::utilj Namespace Reference

Classes

class  AipsErrorTrace
class  Strings
class  FirstFunctor
class  SecondFunctor
class  MemoryStatistics
class  IoStatistics
class  ThreadTimes
class  DeltaThreadTimes
class  RUsage
class  ComposedFunctor
 prints out 104 116 136 More...
class  UnaryFunctor
class  Z

Functions

template<typename Container >
Bool containsKey (const typename Container::key_type &key, const Container &container)
 template <typename Element, typename Container> Bool contains (const Element & e, const Container & c) { return c.find(e) != c.end(); }
template<typename Container >
Bool contains (const typename Container::value_type &e, const Container &c)
template<typename F , typename S >
F & first (std::pair< F, S > &pair)
template<typename F , typename S >
const F & first (const std::pair< F, S > &pair)
template<typename Container , typename Element >
Container fillContainer (Element sentinel,...)
template<typename F , typename S >
FirstFunctor< F, S > firstFunctor ()
*String formatV (const String &formatString, va_list vaList)
 DEPRECATED (String format (const char * formatString, .
template<typename T >
getEnv (const String &name, const T &defaultValue)
Bool getEnv (const String &name, const Bool &defaultValue)
Int getEnv (const String &name, const Int &defaultValue)
String getTimestamp ()
Bool isEnvDefined (const String &name)
std::vector< String > split (const String &string, const String &splitter, Bool ignoreConsecutiveSplitters=False)
template<typename Itr >
String join (Itr begin, Itr end, const String &delimiter)
template<typename T >
String join (const T &strings, const String &delimiter)
template<typename Itr , typename F >
String join (Itr begin, Itr end, F f, const String &delimiter)
template<typename K , typename V >
std::vector< K > mapKeys (const std::map< K, V > &aMap)
AipsError repackageAipsError (AipsError &error, const String &message, const String &file, Int line, const String &func)
template<typename F , typename S >
F & second (std::pair< F, S > &pair)
template<typename F , typename S >
const F & second (const std::pair< F, S > &pair)
template<typename F , typename S >
SecondFunctor< F, S > secondFunctor ()
template<typename K , typename V >
std::vector< V > mapValues (const std::map< K, V > &aMap)
void printBacktrace (ostream &os, const String &prefix="")
long round (Double d)
void sleepMs (Int milliseconds)
void toStdError (const String &m, const String &prefix="*E* ")
void throwIf (Bool condition, const String &message, const String &file, Int line, const String &func=String())
void throwIfError (Int errorCode, const String &prefix, const String &file, Int line, const String &func=String())
template<typename It , typename Obj >
string containerToString (It begin, It end, String(Obj::*func)() const, const String &delimiter=",", const String &wrapper="")
 transform (a.begin(), a.end(), std::ostream_iterator< int >(cout,"\n"), compose(unary(h), compose(unary(f), unary(f))))
 Global Functions.
template<typename F , typename G >
ComposedFunctor< F, G > compose (F f, G g)
template<typename D , typename R >
UnaryFunctor< D, R > unary (R(*f)(D))

Function Documentation

template<typename F , typename G >
ComposedFunctor<F, G> casa::utilj::compose ( f,
g 
) [inline]

Definition at line 631 of file UtilJ.h.

template<typename It , typename Obj >
string casa::utilj::containerToString ( It  begin,
It  end,
String(Obj::*)() const   func,
const String &  delimiter = ",",
const String &  wrapper = "" 
) [inline]

Definition at line 271 of file UtilJ.h.

References String.

template<typename Container >
Bool casa::utilj::contains ( const typename Container::value_type &  e,
const Container &  c 
) [inline]

For set and map use containsKey; will work for set but use with map requires specifying a pair as the first argument

Definition at line 88 of file UtilJ.h.

template<typename Container >
Bool casa::utilj::containsKey ( const typename Container::key_type &  key,
const Container &  container 
) [inline]

template <typename Element, typename Container> Bool contains (const Element & e, const Container & c) { return c.find(e) != c.end(); }

Definition at line 80 of file UtilJ.h.

template<typename Container , typename Element >
Container casa::utilj::fillContainer ( Element  sentinel,
  ... 
) [inline]

Definition at line 112 of file UtilJ.h.

References casacore::C::e.

template<typename F , typename S >
const F& casa::utilj::first ( const std::pair< F, S > &  pair  )  [inline]

Definition at line 101 of file UtilJ.h.

template<typename F , typename S >
F& casa::utilj::first ( std::pair< F, S > &  pair  )  [inline]

Definition at line 98 of file UtilJ.h.

template<typename F , typename S >
FirstFunctor<F,S> casa::utilj::firstFunctor (  )  [inline]

Definition at line 138 of file UtilJ.h.

* String casa::utilj::formatV ( const String &  formatString,
va_list  vaList 
)

DEPRECATED (String format (const char * formatString, .

..) /* "Use String::format"

Int casa::utilj::getEnv ( const String &  name,
const Int &  defaultValue 
)
Bool casa::utilj::getEnv ( const String &  name,
const Bool &  defaultValue 
)
template<typename T >
T casa::utilj::getEnv ( const String &  name,
const T &  defaultValue 
) [inline]

Definition at line 146 of file UtilJ.h.

References casa::SynthesisUtils::getenv(), and casacore::value().

String casa::utilj::getTimestamp (  ) 
Bool casa::utilj::isEnvDefined ( const String &  name  ) 
template<typename Itr , typename F >
String casa::utilj::join ( Itr  begin,
Itr  end,
f,
const String &  delimiter 
) [inline]

Definition at line 200 of file UtilJ.h.

References String.

template<typename T >
String casa::utilj::join ( const T &  strings,
const String &  delimiter 
) [inline]

Definition at line 193 of file UtilJ.h.

References join().

template<typename Itr >
String casa::utilj::join ( Itr  begin,
Itr  end,
const String &  delimiter 
) [inline]

Definition at line 174 of file UtilJ.h.

References String.

Referenced by join().

template<typename K , typename V >
std::vector<K> casa::utilj::mapKeys ( const std::map< K, V > &  aMap  )  [inline]

Definition at line 220 of file UtilJ.h.

References transform().

template<typename K , typename V >
std::vector<V> casa::utilj::mapValues ( const std::map< K, V > &  aMap  )  [inline]

Definition at line 249 of file UtilJ.h.

References transform().

void casa::utilj::printBacktrace ( ostream &  os,
const String &  prefix = "" 
)
AipsError casa::utilj::repackageAipsError ( AipsError &  error,
const String &  message,
const String &  file,
Int  line,
const String &  func 
)
long casa::utilj::round ( Double  d  ) 
template<typename F , typename S >
const F& casa::utilj::second ( const std::pair< F, S > &  pair  )  [inline]

Definition at line 236 of file UtilJ.h.

template<typename F , typename S >
F& casa::utilj::second ( std::pair< F, S > &  pair  )  [inline]

Definition at line 233 of file UtilJ.h.

template<typename F , typename S >
SecondFunctor<F,S> casa::utilj::secondFunctor (  )  [inline]

Definition at line 245 of file UtilJ.h.

void casa::utilj::sleepMs ( Int  milliseconds  ) 
std::vector<String> casa::utilj::split ( const String &  string,
const String &  splitter,
Bool  ignoreConsecutiveSplitters = False 
)
void casa::utilj::throwIf ( Bool  condition,
const String &  message,
const String &  file,
Int  line,
const String &  func = String() 
)
void casa::utilj::throwIfError ( Int  errorCode,
const String &  prefix,
const String &  file,
Int  line,
const String &  func = String() 
)
void casa::utilj::toStdError ( const String &  m,
const String &  prefix = "*E* " 
)
casa::utilj::transform ( a.  begin(),
a.  end(),
std::ostream_iterator< int >  cout,"\n",
compose(unary(h), compose(unary(f), unary(f)))   
)
template<typename D , typename R >
UnaryFunctor<D, R> casa::utilj::unary ( R(*)(D)  f  )  [inline]

Definition at line 651 of file UtilJ.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1