Skip to content

Types

class Types

@brief This class contains the types knonw to the Karabo framework as members and conversion tools for these

Functions

Name Description
convert Convert one type representation to another, e.g. size_t size = convert<FromLiteral, ToSize>("INT32"); # size is 4 type : Return :
from Return a Types::ReferenceType from an alternate representation Types::ReferenceType r = from<FromLiteral>("INT64"); type : Return :
to Return an alternate representation of a Types::ReferenceType type : Return :
isPointer Check if the passed Types::ReferenceType is a pointer type : Return :
isVector Check if the passed Types::ReferenceType is a vector type : Return :
isNumericPod Check if the passed Types::ReferenceType is numeric plain old data type (POD) type : Return :
isSimple Check if the passed Types::ReferenceType is a type representable by a karabo::data::SimpleElement type : Return :

Function Details

convert

template <class From, class To> static typename To::ReturnType convert(const typename From::ArgumentType& type)

Convert one type representation to another, e.g.

     size_t size = convert<FromLiteral, ToSize>("INT32");
     # size is 4

type :

Return :

from

template <class From> static ReferenceType from(const typename From::ArgumentType& type)

Return a Types::ReferenceType from an alternate representation

     Types::ReferenceType r = from<FromLiteral>("INT64");

type :

Return :

isNumericPod

static bool isNumericPod(int type)

Check if the passed Types::ReferenceType is numeric plain old data type (POD)

type :

Return :

isPointer

static bool isPointer(int type)

Check if the passed Types::ReferenceType is a pointer

type :

Return :

isSimple

static bool isSimple(int type)

Check if the passed Types::ReferenceType is a type representable by a karabo::data::SimpleElement

type :

Return :

isVector

static bool isVector(int type)

Check if the passed Types::ReferenceType is a vector

type :

Return :

to

template <class To> static typename To::ReturnType to(const ReferenceType type)

Return an alternate representation of a Types::ReferenceType

type :

Return :