CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
Extended Type Information

Data Structures

struct  STypeInfoExt
 

Macros

#define stExt(name)   (&_stie_##name)
 

Typedefs

typedef struct STypeInfoExt STypeInfoExt
 

Enumerations

enum  STypeInfoExtFlagsEnum { STIE_TypeSet = (1 << 0) }
 Flags for STypeInfoExt::flags. More...
 

Variables

const STypeInfoExt _stie_none
 
const STypeInfoExt _stie_bool
 
const STypeInfoExt _stie_int8
 
const STypeInfoExt _stie_int16
 
const STypeInfoExt _stie_int32
 
const STypeInfoExt _stie_int64
 
const STypeInfoExt _stie_uint8
 
const STypeInfoExt _stie_uint16
 
const STypeInfoExt _stie_uint32
 
const STypeInfoExt _stie_uint64
 
const STypeInfoExt _stie_float32
 
const STypeInfoExt _stie_float64
 
const STypeInfoExt _stie_string
 
const STypeInfoExt _stie_suid
 
const STypeInfoExt _stie_object
 
const STypeInfoExt _stie_buffer
 
const STypeInfoExt _stie_stvar
 
const STypeInfoExt _stie_sarray
 
const STypeInfoExt _stie_hashtable
 

Detailed Description

STypeInfoExt layers structural, declaration-level information on top of an stype. Where STypeInfo answers how do I operate on this value at runtime, STypeInfoExt answers what is this value declared to be. It exists for consumers that need more than the runtime system is willing to remember, such as struct member initialization or serialization.

A few rules set it apart from STypeInfo:

Macro Definition Documentation

◆ stExt

#define stExt (   name)    (&_stie_##name)

STypeInfoExt* stExt(name)

The canonical STypeInfoExt for a built-in type, or one declared in scope – the STypeInfoExt counterpart of stType(name). Resolves to &_stie_##name.

Parameters
nameType name, unquoted (e.g. int32, MyStruct, MyClass, MyStructSet)

Example:

const STypeInfoExt *schema = stExt(int32);
_serWrite(w, schema, stArg(int32, 42));
#define stArg(type, val)
Definition stype.h:1036
#define stExt(name)
Definition stype.h:1507

Definition at line 1507 of file stype.h.

Typedef Documentation

◆ STypeInfoExt

typedef struct STypeInfoExt STypeInfoExt

Structural, declaration-level information about a type, layered on top of an stype. See the stype_ext group overview for how this differs from STypeInfo.

cxautogen generates one of these for every serializable struct member, and a canonical STypeInfoExt – reached through the stExt(name) macro – for every serializable struct, class, structset, or classset. Built-in types have one too, e.g. stExt(int32). Pass the matching descriptor alongside a value so a consumer such as the serializer can agree on what it is – including element types for arrays and hashtables, and the concrete type for a value that could be one of several (see STIE_TypeSet).

Definition at line 307 of file stype.h.

Enumeration Type Documentation

◆ STypeInfoExtFlagsEnum

Flags for STypeInfoExt::flags.

Enumerator
STIE_TypeSet 

The exact type isn't fixed here – it's one of several types listed in the StructSet or ClassSet stored in detail. The actual type of each value is written alongside it so it can be read back correctly.

Definition at line 1438 of file stype.h.

Variable Documentation

◆ _stie_bool

const STypeInfoExt _stie_bool
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_buffer

const STypeInfoExt _stie_buffer
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_float32

const STypeInfoExt _stie_float32
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_float64

const STypeInfoExt _stie_float64
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_hashtable

const STypeInfoExt _stie_hashtable
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_int16

const STypeInfoExt _stie_int16
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_int32

const STypeInfoExt _stie_int32
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_int64

const STypeInfoExt _stie_int64
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_int8

const STypeInfoExt _stie_int8
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_none

const STypeInfoExt _stie_none
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_object

const STypeInfoExt _stie_object
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_sarray

const STypeInfoExt _stie_sarray
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_string

const STypeInfoExt _stie_string
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_stvar

const STypeInfoExt _stie_stvar
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_suid

const STypeInfoExt _stie_suid
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_uint16

const STypeInfoExt _stie_uint16
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_uint32

const STypeInfoExt _stie_uint32
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_uint64

const STypeInfoExt _stie_uint64
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.

◆ _stie_uint8

const STypeInfoExt _stie_uint8
extern

One shared descriptor per built-in type, reached through stExt(name), e.g. stExt(int32).

stExt(sarray) and stExt(hashtable) describe a plain, untyped container. A struct member declared with specific element types (e.g. sarray[int32]) gets its own descriptor, generated by cxautogen, instead.