lsst.utils  16.0-13-g80874fd+2
Namespaces | Classes | Functions
lsst::utils Namespace Reference

Namespaces

 backtrace
 
 doImport
 
 get_caller_name
 
 python
 
 tests
 
 version
 
 wrappers
 

Classes

class  Backtrace
 Singleton, enables automatic backtraces on the following signals: More...
 
class  Cache
 Cache of most recently used values. More...
 
struct  key
 
struct  n
 
class  Symbol
 

Functions

std::string demangleType (std::string const _typeName)
 
std::string getPackageDir (std::string const &packageName)
 return the root directory of a setup package More...
 
std::size_t hashCombine (std::size_t seed)
 Combine hashes. More...
 
template<typename T , typename... Rest>
std::size_t hashCombine (std::size_t seed, const T &value, Rest... rest)
 Combine hashes. More...
 

Function Documentation

◆ demangleType()

std::string lsst::utils::demangleType ( std::string const  _typeName)

Definition at line 113 of file Demangle.cc.

◆ getPackageDir()

std::string lsst::utils::getPackageDir ( std::string const &  packageName)

return the root directory of a setup package

Parameters
[in]packageNamename of package (e.g. "utils")
Exceptions
lsst::pex::exceptions::NotFoundErrorif desired version can't be found

Definition at line 33 of file packaging.cc.

◆ hashCombine() [1/2]

std::size_t lsst::utils::hashCombine ( std::size_t  seed)
inline

Combine hashes.

This is provided as a convenience for those who need to hash a composite. C++11 includes std::hash, but neglects to include a facility for combining hashes.

To use it:

std::size_t seed = 0; result = hashCombine(seed, obj1, obj2, obj3);

This solution is provided by Matteo Italia https://stackoverflow.com/a/38140932/834250

Definition at line 45 of file hashCombine.h.

◆ hashCombine() [2/2]

template<typename T , typename... Rest>
std::size_t lsst::utils::hashCombine ( std::size_t  seed,
const T &  value,
Rest...  rest 
)

Combine hashes.

This is provided as a convenience for those who need to hash a composite. C++11 includes std::hash, but neglects to include a facility for combining hashes.

To use it:

std::size_t seed = 0; result = hashCombine(seed, obj1, obj2, obj3);

This solution is provided by Matteo Italia https://stackoverflow.com/a/38140932/834250

Definition at line 48 of file hashCombine.h.