PhoenixTypeStream  0.1.0
Unified C++ type-to-string conversion framework
Loading...
Searching...
No Matches
phoenix_composeType.h File Reference
#include <string>
#include <vector>
#include <map>
#include "type_stream_get_type.h"
#include "phoenix_composeType_impl.h"
+ Include dependency graph for phoenix_composeType.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ConvertTupleTypeToString< First, Last >
 Serialise a call type into a std::string. More...
 
struct  ConvertTupleTypeToString< N, N >
 Serialise a call type into a std::string. More...
 
struct  TypeStream< T >
 Generic DataStream class. More...
 
struct  TypeStream< std::list< T > >
 Generic std::list type abstraction. More...
 
struct  TypeStream< std::map< T, U > >
 Generic std::map type abstraction. More...
 
struct  TypeStream< std::pair< T, U > >
 Generic std::pair type abstraction. More...
 
struct  TypeStream< std::tuple< T... > >
 Generic std::tuple type abstraction. More...
 
struct  TypeStream< std::vector< T > >
 Generic std::vector type abstraction. More...
 

Functions

template<typename T>
std::string phoenix_getTypeToStr ()
 Get the corresponding type of a string.
 
template<typename T>
std::string phoenix_getTypeToStr (const T &data)
 Get the corresponding type of a string.
 
template<typename R, typename... T>
std::string phoenix_getTypeToStr (R(*func)(T...))
 Convert a function prototype into a string.
 

Function Documentation

◆ phoenix_getTypeToStr() [1/3]

template<typename T>
std::string phoenix_getTypeToStr ( )

Get the corresponding type of a string.

Returns
corresponding string

Definition at line 16 of file phoenix_composeType_impl.h.

16 {
18}
static std::string getTypeToStr()
Convert the generic type into a string.

References TypeStream< T >::getTypeToStr().

Referenced by ConvertTupleTypeToString< First, Last >::getTypeToStr(), phoenix_getTypeToStr(), and phoenix_getTypeToStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ phoenix_getTypeToStr() [2/3]

template<typename T>
std::string phoenix_getTypeToStr ( const T & data)

Get the corresponding type of a string.

Parameters
data: parameter used to get its type
Returns
corresponding string

Definition at line 25 of file phoenix_composeType_impl.h.

25 {
27}
std::string phoenix_getTypeToStr()
Get the corresponding type of a string.

References phoenix_getTypeToStr().

+ Here is the call graph for this function:

◆ phoenix_getTypeToStr() [3/3]

template<typename R, typename... T>
std::string phoenix_getTypeToStr ( R(* func )(T...))

Convert a function prototype into a string.

Parameters
func: function to be called
Returns
corresponding type name as string

Definition at line 34 of file phoenix_composeType_impl.h.

34 {
35 return phoenix_getTypeToStr<R>() + " | " + TypeStream<std::tuple<T... > >::getTypeToStr();
36}
Generic DataStream class.

References phoenix_getTypeToStr().

+ Here is the call graph for this function: