PIP 5.6.1
Platform-Independent Primitives
Classes | Typedefs | Enumerations | Functions
PICodeInfo Namespace Reference

Namespace contains structures for code generation. See Code generation. More...

Classes

struct  ClassInfo
 Class or struct information. More...
 
struct  EnumeratorInfo
 Enumerator information. More...
 
struct  EnumInfo
 Enum information. More...
 
struct  FunctionInfo
 Method information. More...
 
struct  TypeInfo
 Type information. More...
 

Typedefs

typedef PIFlags< PICodeInfo::TypeFlagTypeFlags
 Bitmask of type modifiers.
 
typedef PIMap< PIString, PIStringMetaMap
 Custom metadata map produced by PIMETA.
 
typedef PIByteArray(* AccessValueFunction) (const void *, const char *)
 Callback returning serialized member data by member name.
 
typedef const char *(* AccessTypeFunction) (const char *)
 Callback returning a member type name by member name.
 
typedef int(* AccessOffsetFunction) (const char *)
 Callback returning a member offset by member name.
 

Enumerations

enum  TypeFlag { NoFlag , Const = 0x01 , Static = 0x02 , Mutable = 0x04 , Volatile = 0x08 , Inline = 0x10 , Virtual = 0x20 , Extern = 0x40 }
 Type modifiers. More...
 

Functions

PICout operator<< (PICout s, const PICodeInfo::TypeInfo &v)
 Writes a declaration-like view of v to s.
 
PICout operator<< (PICout s, const PICodeInfo::EnumeratorInfo &v)
 Writes an enum member description to s.
 
PICout operator<< (PICout s, const PICodeInfo::ClassInfo &v)
 Writes a human-readable class description to s.
 
PICout operator<< (PICout s, const PICodeInfo::EnumInfo &v)
 Writes a human-readable enum description to s.
 
PIByteArray getMemberValue (const void *p, const char *class_name, const char *member_name)
 Returns a serialized value of member_name from an instance of class_name.
 
const char * getMemberType (const char *class_name, const char *member_name)
 Returns the registered type name of member_name in class_name.
 
PIVariant getMemberAsVariant (const void *p, const char *class_name, const char *member_name)
 Returns member_name from class_name as PIVariant when accessors are registered.
 
template<typename T , typename std::enable_if< std::is_assignable< T &, const T & >::value, int >::type = 0>
void serialize (PIByteArray &ret, const T &v)
 Serializes assignable values into ret through the stream operator. More...
 

Detailed Description

Namespace contains structures for code generation. See Code generation.

Provides classes and structures for code introspection, including type information, function details, class metadata, and enum information.

Enumeration Type Documentation

◆ TypeFlag

Type modifiers.

Enumerator
NoFlag 

No modifiers.

Function Documentation

◆ serialize()

template<typename T , typename std::enable_if< std::is_assignable< T &, const T & >::value, int >::type = 0>
void PICodeInfo::serialize ( PIByteArray ret,
const T &  v 
)

Serializes assignable values into ret through the stream operator.

Fallback overload for values that cannot be written to the byte-array stream.