cmake C++ API Reference

struct default_policy

Subclassed by scitbx::boost_python::container_conversions::linked_list_policy, scitbx::boost_python::container_conversions::set_policy, scitbx::boost_python::container_conversions::variable_capacity_policy

Public Static Functions

static inline bool check_convertibility_per_element()
template<typename ContainerType>
static inline bool check_size(boost::type<ContainerType>, std::size_t)
template<typename ContainerType>
static inline void assert_size(boost::type<ContainerType>, std::size_t)
template<typename ContainerType>
static inline void reserve(ContainerType &a, std::size_t sz)
struct djb2_hash
#include <hash_map.h>

Subclassed by __gnu_cxx::hash< std::string >

Public Functions

inline size_t operator()(const std::string &x) const
struct fixed_capacity_policy : public scitbx::boost_python::container_conversions::variable_capacity_policy

Public Static Functions

template<typename ContainerType>
static inline bool check_size(boost::type<ContainerType>, std::size_t sz)
struct fixed_size_policy

Public Static Functions

static inline bool check_convertibility_per_element()
template<typename ContainerType>
static inline bool check_size(boost::type<ContainerType>, std::size_t sz)
template<typename ContainerType>
static inline void assert_size(boost::type<ContainerType>, std::size_t sz)
template<typename ContainerType>
static inline void reserve(ContainerType&, std::size_t sz)
template<typename ContainerType, typename ValueType>
static inline void set_value(ContainerType &a, std::size_t i, ValueType const &v)
class freeze : public boost::python::def_visitor<freeze>
#include <pybindings.hpp>

Public Functions

template<class classT>
inline void visit(classT &c) const

Public Static Functions

static inline void setattr_with_dynamism_disabled(const boost::python::object &obj, const boost::python::object &name, const boost::python::object &value)

Private Static Functions

static inline int HasAttrWithException(PyObject *v, PyObject *name)
template<typename ContainerType, typename ConversionPolicy>
struct from_python_sequence

Public Types

typedef ContainerType::value_type container_element_type

Public Functions

inline from_python_sequence()

Public Static Functions

static inline void *convertible(PyObject *obj_ptr)
static inline bool all_elements_convertible(boost::python::handle<> &obj_iter, bool is_range, std::size_t &i)
static inline void construct(PyObject *obj_ptr, boost::python::converter::rvalue_from_python_stage1_data *data)
struct group_registerer
#include <I3Test.h>

Public Functions

group_registerer(test_group *group, const std::string &name)
template<>
struct hash<std::string> : public djb2_hash
#include <hash_map.h>
class I3TestException
#include <I3Test.h>

Subclassed by I3Test::test_failure

Public Functions

inline explicit I3TestException(const std::string &s)
inline virtual ~I3TestException()
inline virtual const char *what() const

Private Members

std::string message
struct linked_list_policy : public scitbx::boost_python::container_conversions::default_policy

Public Static Functions

template<typename ContainerType, typename ValueType>
static inline void set_value(ContainerType &a, std::size_t, ValueType const &v)
struct set_policy : public scitbx::boost_python::container_conversions::default_policy

Public Static Functions

template<typename ContainerType, typename ValueType>
static inline void set_value(ContainerType &a, std::size_t, ValueType const &v)
struct string_deleter
#include <pybindings.hpp>

Public Functions

inline string_deleter(char *s_)
inline operator char*()
inline ~string_deleter()

Public Members

char *s
struct test_failure : public I3Test::I3TestException
#include <I3Test.h>

Public Functions

test_failure(const std::string &file_, unsigned line_, const std::string &predicate_, const std::string &message_ = "(none)")
inline ~test_failure()
std::string to_string(const std::string &name) const

Public Members

unsigned line
std::string file
std::string predicate
std::string message
struct test_group
#include <I3Test.h>

Public Functions

void runtests(bool xml = false)
void run(const std::string &unit, bool xml = false)
void report(const std::string &group_name)
void list(const std::string &s)

Public Members

std::map<std::string, voidfunc> units
std::map<std::string, boost::shared_ptr<test_failure>> failures
std::set<std::string> successes

Public Static Functions

static void first(const std::string &s, const std::pair<std::string, voidfunc> &p)
struct test_registerer
#include <I3Test.h>

Public Functions

test_registerer(const std::string &group, const std::string &unit, voidfunc f)
struct test_suite
#include <I3Test.h>

Public Functions

void runtests(bool xml = false)
bool report()
void list()
void make_dartfiles(const std::string &path)
void run(const std::string &s)

Public Members

std::map<std::string, test_group*> groups

Public Static Functions

static void first(const std::pair<std::string, test_group*> &p)
template<typename ContainerType>
struct to_tuple

Public Static Functions

static inline PyObject *convert(ContainerType const &a)
template<typename ContainerType>
struct to_tuple_mapping

Subclassed by scitbx::boost_python::container_conversions::tuple_mapping< ContainerType, ConversionPolicy >

Public Functions

inline to_tuple_mapping()
template<typename ContainerType, typename ConversionPolicy>
struct tuple_mapping : public scitbx::boost_python::container_conversions::to_tuple_mapping<ContainerType>

Public Functions

inline tuple_mapping()
template<typename ContainerType>
struct tuple_mapping_fixed_capacity

Public Functions

inline tuple_mapping_fixed_capacity()
template<typename ContainerType>
struct tuple_mapping_fixed_size

Public Functions

inline tuple_mapping_fixed_size()
template<typename ContainerType>
struct tuple_mapping_set

Public Functions

inline tuple_mapping_set()
template<typename ContainerType>
struct tuple_mapping_variable_capacity

Public Functions

inline tuple_mapping_variable_capacity()
struct variable_capacity_policy : public scitbx::boost_python::container_conversions::default_policy

Subclassed by scitbx::boost_python::container_conversions::fixed_capacity_policy

Public Static Functions

static inline bool check_convertibility_per_element()
template<typename ContainerType>
static inline void reserve(ContainerType &a, std::size_t sz)
template<typename ContainerType, typename ValueType>
static inline void set_value(ContainerType &a, std::size_t i, ValueType const &v)
namespace __gnu_cxx
namespace I3
namespace I3Test

Copyright (C) 2007 Troy D. Straszheim troy@icecube.umd.edu Copyright (C) 2007 the IceCube Collaboration http://www.icecube.wisc.edu

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

SPDX-License-Identifier: BSD-2-Clause

Typedefs

typedef void (*voidfunc)()

Functions

inline void ensure(const std::string &file, unsigned line, bool cond, const std::string &cond_txt, const std::string &msg = "unspecified")
template<typename LeftType, typename RightType, typename ResultType>
inline void ensure_distance(const std::string &file, unsigned line, const std::string &left_txt, const std::string &right_txt, const std::string &distance_txt, const LeftType &actual, const RightType &expected, const ResultType &distance, const std::string &msg = "unspecified")
template<typename LeftType, typename RightType>
inline void ensure_equal(const std::string &file, unsigned line, const std::string &left_txt, const std::string &right_txt, const LeftType &left, const RightType &right, const std::string &msg = "unspecified")
test_suite &suite()
const std::string testfile(const std::string &fname, const std::string &project = BOOST_PP_STRINGIZE(PROJECT))

Creates “temporary” file and a directory to place it in. Temporary in the sense that it is meant as a junk file for unit tests. It still needs to be deleted by hand. Returns the full path.

namespace icecube
namespace serialization

Functions

template<class Archive, class Type, class Key, class Hash, class Equal, class Allocator>
inline void save(Archive &ar, const hash_map<Key, Type, Hash, Equal, Allocator> &t, const unsigned int)
template<class Archive, class Type, class Key, class Hash, class Equal, class Allocator>
inline void load(Archive &ar, hash_map<Key, Type, Hash, Equal, Allocator> &t, const unsigned int)
template<class Archive, class Type, class Key, class Hash, class Equal, class Allocator>
inline void serialize(Archive &ar, hash_map<Key, Type, Hash, Equal, Allocator> &t, const unsigned int file_version)
namespace scitbx
namespace boost_python
namespace container_conversions
namespace std

STL namespace.

file container_conversions.h
#include <boost/python/list.hpp>
#include <boost/python/tuple.hpp>
#include <boost/python/extract.hpp>
#include <boost/python/to_python_converter.hpp>
file hash_map.h
#include <string>
#include <ext/hash_map>
#include <serialization/collections_save_imp.hpp>
#include <serialization/collections_load_imp.hpp>
#include <serialization/split_free.hpp>

Defines

USING_GCC_EXT_HASH_MAP
file I3Test.h
#include <cmath>
#include <string>
#include <boost/version.hpp>
#include <boost/preprocessor/stringize.hpp>
#include <boost/filesystem/path.hpp>
#include <iomanip>
#include <sstream>
#include <map>
#include <set>

Defines

ENSURE(PRED, ...)
FAIL(...)
EXPECT_THROW(CMD, MSG)
ENSURE_DISTANCE(LEFT, RIGHT, DISTANCE, ...)
ENSURE_EQUAL(LEFT, RIGHT, ...)
TEST(TESTNAME)
TEST_GROUP(GROUPNAME)
file intel_compatibility.h

Intel compiler compatibility work-around.

file name_of.h
#include <icetray/name_of.h>
file pybindings.hpp
#include <cstring>
#include <cctype>
#include “icetray/I3FrameObject.h”
#include “I3/name_of.h
#include <boost/python.hpp>
#include <boost/python/suite/indexing/indexing_suite.hpp>
#include <boost/python/suite/indexing/map_indexing_suite.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include “container_conversions.h
#include <boost/preprocessor/seq.hpp>

Defines

GETSET_IMPL(ObjType, GotType, Name, CallPolicies)
GETSET_IMPL_NOTYPE(ObjType, Name, CallPolicies)
GET_IMPL_NOTYPE(ObjType, Name, CallPolicies)
GETSET_INTERNAL_REFERENCE(ObjType, GotType, Name)
GETSET(Objtype, GotType, Name)
PROPERTY(Class, Prop, Fn)
PROPERTY_TYPE(Class, Prop, GotType, Fn)
I3_PYTHON_MODULE(N)
WRAP_PROP(R, Class, Fn)
WRAP_PROP_BOOL(R, Class, Fn)
WRAP_EVIL_PROP(R, Class, Fn)
WRAP_PROP_INTERNAL_REFERENCE(R, Class, Fn)
WRAP_PROP_RO(R, Class, Fn)
WRAP_EVIL_PROP_RO(R, Class, Fn)
WRAP_PROP_RO_INTERNAL_REFERENCE(R, Class, Fn)
WRAP_RW(R, Class, Member)
WRAP_RW_RECASE(R, Class, Member)
WRAP_RO(R, Class, Member)
WRAP_DEF(R, Class, Fn)
WRAP_DEF_RECASE(R, Class, Fn)
WRAP_GET(R, Class, Name)
WRAP_GETSET(R, Class, Name)
WRAP_GET_INTERNAL_REFERENCE(R, Class, Name)
WRAP_GETSET_INTERNAL_REFERENCE(R, Class, Name)
WRAP_ENUM_VALUE(R, Class, Name)
RAISE(exception, msg)

Functions

template<typename T>
void register_pointer_conversions()
template<typename T>
T identity_(T t)
static inline char *lowerCamelCase(const char *str)

convert from upper to lower CamelCase: ParticleType => particleType ATWDBinSize => atwdBinSize

The return value must be free()’d by the user.

Parameters:

str – the camel case string to change

Returns:

a pointer to the new malloc()’d string

static inline string_deleter snake_case(const char *str)

convert from upper CamelCase to snake_case ATWDBinSize => atwd_bin_size NBinsATWD0 => n_bins_atwd_0

Parameters:

str – the camel case string to change

Returns:

a pointer to the new string

file shared_ptr.hpp
#include <boost/smart_ptr/shared_ptr.hpp>
dir boost
dir boost-new
dir cmake
dir common
dir I3
dir icetray
dir tool-patches