Public Member Functions | List of all members
TypeLayout Struct Reference
Inheritance diagram for TypeLayout:
Inheritance graph
[legend]
Collaboration diagram for TypeLayout:
Collaboration graph
[legend]

Public Member Functions

 TypeLayout (cstr_t separator=',')
 Constructor for simple layout using a separator but no parentheses/braces.
 
 TypeLayout (cstr_t prefix, cstr_t suffix)
 Constructor.
 
 TypeLayout (cstr_t prefix, cstr_t separator, cstr_t suffix)
 Constructor.
 
 TypeLayout (const char layout[4])
 Constructor accepting three-letter chars: {prefix,separator,suffix}.
 
 TypeLayout (const TypeLayout &layout)
 
TypeLayoutsetLayout (const char *layout)
 Set layout with a single string, for example: "{,}" . More...
 
- Public Member Functions inherited from TypeLayoutBase
bool empty () const
 
- Public Member Functions inherited from UniTuple< char, 3 >
 UniTuple (const TT &... args)
 
 UniTuple (const UniTuple< char, N > &t)
 Copy constructor.
 
 UniTuple (std::initializer_list< S > l)
 
tuple_toperator= (const tuple_t &t)
 
tuple_toperator= (const value_type &value)
 
tuple_toperator= (std::initializer_list< S > l)
 
virtual const_iterator begin () const override final
 
virtual iterator begin () override final
 
virtual const_iterator end () const override final
 
virtual iterator end () override final
 
tuple_ttuple ()
 
const tuple_ttuple () const
 
void debug (std::ostream &ostr) const
 
- Public Member Functions inherited from TupleBase< S, N >
const S & at (size_t i) const
 Return const reference to element i. More...
 
const S & operator[] (size_t i) const
 
S & at (size_t i)
 Return reference to element i. More...
 
S & operator[] (size_t i)
 
bool operator== (const tuplebase_t &t) const
 Equality operator.
 
bool operator!= (const tuplebase_t &t) const
 Inequality operator.
 
template<class T >
T & toSequence (T &sequence) const
 Copy elements to a Sequence, like stl::list, stl::set or stl::vector.
 
void set (const tuplebase_t &t)
 
template<class T2 , size_t N2 = 2>
void set (const TupleBase< T2, N2 > &t)
 Assign tuple of different type and/or size.
 
void set (const S &arg)
 
template<typename ... SS>
void set (const S &arg, const SS &... rest)
 Set element(s).
 
template<typename T >
void set (std::initializer_list< T > l)
 
template<class T >
tuplebase_tassignSequence (T &sequence, bool LENIENT=false)
 Proposed for tuples only; derived classes should not shadow this. More...
 
void fill (S i)
 Set all the elements to i.
 
void clear ()
 
virtual std::ostream & toStream (std::ostream &ostr, char separator=',') const
 
std::string toStr (char separator=',') const
 
virtual void updateTuple ()
 

Additional Inherited Members

- Public Types inherited from TypeLayoutBase
typedef char cstr_t
 
- Public Types inherited from UniTuple< char, 3 >
typedef char value_type
 
typedef UniTuple< char, N > tuple_t
 
typedef char * iterator
 
typedef const char * const_iterator
 
- Public Types inherited from TupleBase< S, N >
typedef TupleBase< S, N > tuplebase_t
 
typedef S value_type
 
typedef S * iterator
 
typedef S const * const_iterator
 
- Static Public Member Functions inherited from TupleBase< S, N >
static size_t size ()
 Return the number of elements. More...
 
- Public Attributes inherited from TypeLayoutBase
cstr_t & prefix
 
cstr_t & separator
 
cstr_t & suffix
 
- Static Public Attributes inherited from UniTuple< char, 3 >
static const size_t tuple_size
 
- Static Public Attributes inherited from TupleBase< S, N >
static const size_t storageTypeSize = sizeof(S)
 
- Protected Member Functions inherited from UniTuple< char, 3 >
 UniTuple (UniTuple< char, N2 > &tuple, size_t i)
 
char & next ()
 
- Protected Member Functions inherited from TupleBase< S, N >
void setIndexed (size_t i)
 Argument stack endpoint function; final step of variadic argument set(arg, ...) .
 
template<typename T2 , typename ... TT>
void setIndexed (size_t i, T2 arg, const TT &... rest)
 Worker called by set(T2 arg, T2 arg2, ...)
 
- Protected Attributes inherited from UniTuple< char, 3 >
const iterator start
 

Member Function Documentation

◆ setLayout()

TypeLayout & setLayout ( const char *  layout)

Set layout with a single string, for example: "{,}" .

The argument string can consist of 0-3 characters:

no layout: a sequence is simply concatenated

separator only, for example: "," – parentheses will be omitted

prefix and suffix, for example: "{}" – separator will be omitted

prefix, separator, suffix, for example "(:)"


The documentation for this struct was generated from the following files: