Zserio C++ runtime library  1.0.2
Built for Zserio 2.14.1
zserio::IBasicTypeInfo< ALLOC > Class Template Referenceabstract

#include <ITypeInfo.h>

Public Member Functions

virtual ~IBasicTypeInfo ()=default
 
virtual StringView getSchemaName () const =0
 
virtual SchemaType getSchemaType () const =0
 
virtual CppType getCppType () const =0
 
virtual uint8_t getBitSize () const =0
 
virtual Span< const BasicFieldInfo< ALLOC > > getFields () const =0
 
virtual Span< const BasicParameterInfo< ALLOC > > getParameters () const =0
 
virtual Span< const BasicFunctionInfo< ALLOC > > getFunctions () const =0
 
virtual StringView getSelector () const =0
 
virtual Span< const BasicCaseInfo< ALLOC > > getCases () const =0
 
virtual const IBasicTypeInfo< ALLOC > & getUnderlyingType () const =0
 
virtual Span< const StringViewgetUnderlyingTypeArguments () const =0
 
virtual Span< const ItemInfogetEnumItems () const =0
 
virtual Span< const ItemInfogetBitmaskValues () const =0
 
virtual Span< const BasicColumnInfo< ALLOC > > getColumns () const =0
 
virtual StringView getSqlConstraint () const =0
 
virtual StringView getVirtualTableUsing () const =0
 
virtual bool isWithoutRowId () const =0
 
virtual Span< const BasicTableInfo< ALLOC > > getTables () const =0
 
virtual StringView getTemplateName () const =0
 
virtual Span< const BasicTemplateArgumentInfo< ALLOC > > getTemplateArguments () const =0
 
virtual Span< const BasicMessageInfo< ALLOC > > getMessages () const =0
 
virtual Span< const BasicMethodInfo< ALLOC > > getMethods () const =0
 
virtual IBasicReflectablePtr< ALLOC > createInstance (const ALLOC &allocator) const =0
 
virtual IBasicReflectablePtr< ALLOC > createInstance () const =0
 

Detailed Description

template<typename ALLOC = std::allocator<uint8_t>>
class zserio::IBasicTypeInfo< ALLOC >

Type information interface which is returned from the generated zserio objects.

This interface provides additional schema information of the corresponded zserio object, like schema name, schema type, etc...

Not all methods are implemented for all zserio objects. For example, the method getFields() is implemented for compound types only. To check the zserio object type consider to use TypeInfoUtil helper methods.

Definition at line 112 of file ITypeInfo.h.

Constructor & Destructor Documentation

◆ ~IBasicTypeInfo()

template<typename ALLOC = std::allocator<uint8_t>>
virtual zserio::IBasicTypeInfo< ALLOC >::~IBasicTypeInfo ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ createInstance() [1/2]

template<typename ALLOC = std::allocator<uint8_t>>
virtual IBasicReflectablePtr<ALLOC> zserio::IBasicTypeInfo< ALLOC >::createInstance ( ) const
pure virtual

Creates new instance of the zserio compound type.

Note
Default constructed allocator is used for allocation of new instance.
Returns
New instance of zserio compound type.
Exceptions
CppRuntimeExceptionIf the zserio type is not compound type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ createInstance() [2/2]

template<typename ALLOC = std::allocator<uint8_t>>
virtual IBasicReflectablePtr<ALLOC> zserio::IBasicTypeInfo< ALLOC >::createInstance ( const ALLOC &  allocator) const
pure virtual

Creates new instance of the zserio compound type.

Parameters
allocatorAllocator to use for allocation of new instance.
Returns
New instance of zserio compound type.
Exceptions
CppRuntimeExceptionIf the zserio type is not compound type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::CompoundTypeInfoBase< ALLOC >, and zserio::TypeInfoBase< ALLOC >.

◆ getBitmaskValues()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const ItemInfo> zserio::IBasicTypeInfo< ALLOC >::getBitmaskValues ( ) const
pure virtual

Gets the type information for bitmask type values.

Returns
Sequence of type information for bitmask type values.
Exceptions
CppRuntimeExceptionIf the zserio type is not bitmask type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::BitmaskTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getBitSize()

template<typename ALLOC = std::allocator<uint8_t>>
virtual uint8_t zserio::IBasicTypeInfo< ALLOC >::getBitSize ( ) const
pure virtual

Gets the bit size of the fixed size integral schema type.

Returns
The bit size of zserio type.
Exceptions
CppRuntimeExceptionIf the zserio type is not fixed size integral (e.g. varint).

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::FixedSizeBuiltinTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getCases()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicCaseInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getCases ( ) const
pure virtual

Gets the type information for choice type cases.

Returns
Sequence of type information for choice type cases.
Exceptions
CppRuntimeExceptionIf the zserio type is not choice type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::ChoiceTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getColumns()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicColumnInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getColumns ( ) const
pure virtual

Gets the type information for SQL table columns.

Returns
Sequence of type information for SQL table columns.
Exceptions
CppRuntimeExceptionIf the zserio type is not SQL table type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::SqlTableTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getCppType()

template<typename ALLOC = std::allocator<uint8_t>>
virtual CppType zserio::IBasicTypeInfo< ALLOC >::getCppType ( ) const
pure virtual

Gets the C++ type.

Returns
The C++ type to which zserio type is mapped.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getEnumItems()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const ItemInfo> zserio::IBasicTypeInfo< ALLOC >::getEnumItems ( ) const
pure virtual

Gets the type information for enumeration type items.

Returns
Sequence of type information for enumeration type items.
Exceptions
CppRuntimeExceptionIf the zserio type is not enumeration type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::EnumTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getFields()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicFieldInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getFields ( ) const
pure virtual

Gets the type information for compound type fields.

Returns
Sequence of type information for fields.
Exceptions
CppRuntimeExceptionIf the zserio type is not compound type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::CompoundTypeInfoBase< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getFunctions()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicFunctionInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getFunctions ( ) const
pure virtual

Gets the type information for compound type functions.

Returns
Sequence of type information for functions.
Exceptions
CppRuntimeExceptionIf the zserio type is not compound type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::CompoundTypeInfoBase< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getMessages()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicMessageInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getMessages ( ) const
pure virtual

Gets the type information for pubsub messages.

Returns
Sequence of type information for pubsub messages.
Exceptions
CppRuntimeExceptionIf the zserio type is not pubsub type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::PubsubTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getMethods()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicMethodInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getMethods ( ) const
pure virtual

Gets the type information for service methods.

Returns
Sequence of type information for service methods.
Exceptions
CppRuntimeExceptionIf the zserio type is not service type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::ServiceTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getParameters()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicParameterInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getParameters ( ) const
pure virtual

Gets the type information for compound type parameters.

Returns
Sequence of type information for parameters.
Exceptions
CppRuntimeExceptionIf the zserio type is not compound type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::CompoundTypeInfoBase< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getSchemaName()

template<typename ALLOC = std::allocator<uint8_t>>
virtual StringView zserio::IBasicTypeInfo< ALLOC >::getSchemaName ( ) const
pure virtual

Gets the schema name.

Returns
The zserio full name stored in schema.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getSchemaType()

template<typename ALLOC = std::allocator<uint8_t>>
virtual SchemaType zserio::IBasicTypeInfo< ALLOC >::getSchemaType ( ) const
pure virtual

Gets the schema type.

Returns
The zserio type stored in schema.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getSelector()

template<typename ALLOC = std::allocator<uint8_t>>
virtual StringView zserio::IBasicTypeInfo< ALLOC >::getSelector ( ) const
pure virtual

Gets the selector for choice type.

Returns
Selector expression of choice type.
Exceptions
CppRuntimeExceptionIf the zserio type is not choice type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::ChoiceTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getSqlConstraint()

template<typename ALLOC = std::allocator<uint8_t>>
virtual StringView zserio::IBasicTypeInfo< ALLOC >::getSqlConstraint ( ) const
pure virtual

Gets the SQL table constraint.

Returns
The SQL table constraint.
Exceptions
CppRuntimeExceptionIf the zserio type is not SQL table type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::SqlTableTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getTables()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicTableInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getTables ( ) const
pure virtual

Gets the type information for SQL database tables.

Returns
Sequence of type information for SQL database tables.
Exceptions
CppRuntimeExceptionIf the zserio type is not SQL database type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::SqlDatabaseTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getTemplateArguments()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const BasicTemplateArgumentInfo<ALLOC> > zserio::IBasicTypeInfo< ALLOC >::getTemplateArguments ( ) const
pure virtual

Gets the type information for template arguments.

Returns
Sequence of type information for template arguments.
Exceptions
CppRuntimeExceptionIf the zserio type is not templatable.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::TemplatableTypeInfoBase< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getTemplateName()

template<typename ALLOC = std::allocator<uint8_t>>
virtual StringView zserio::IBasicTypeInfo< ALLOC >::getTemplateName ( ) const
pure virtual

Gets the full schema template name.

Returns
The full schema template name.
Exceptions
CppRuntimeExceptionIf the zserio type is not templatable.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::TemplatableTypeInfoBase< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getUnderlyingType()

template<typename ALLOC = std::allocator<uint8_t>>
virtual const IBasicTypeInfo<ALLOC>& zserio::IBasicTypeInfo< ALLOC >::getUnderlyingType ( ) const
pure virtual

Gets the reference to type information of underlying zserio type.

Returns
Reference to type information of underlying zserio type.
Exceptions
CppRuntimeExceptionIf the zserio type is not enumeration or bitmask type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::TypeInfoWithUnderlyingTypeBase< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getUnderlyingTypeArguments()

template<typename ALLOC = std::allocator<uint8_t>>
virtual Span<const StringView> zserio::IBasicTypeInfo< ALLOC >::getUnderlyingTypeArguments ( ) const
pure virtual

Gets the reference to type information of underlying zserio type arguments.

Returns
Underlying zserio type arguments.
Exceptions
CppRuntimeExceptionIf the zserio type is not enumeration or bitmask type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::TypeInfoWithUnderlyingTypeBase< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ getVirtualTableUsing()

template<typename ALLOC = std::allocator<uint8_t>>
virtual StringView zserio::IBasicTypeInfo< ALLOC >::getVirtualTableUsing ( ) const
pure virtual

Gets the SQL virtual table using specification.

Returns
The SQL virtual table using specification.
Exceptions
CppRuntimeExceptionIf the zserio type is not SQL table type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::SqlTableTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.

◆ isWithoutRowId()

template<typename ALLOC = std::allocator<uint8_t>>
virtual bool zserio::IBasicTypeInfo< ALLOC >::isWithoutRowId ( ) const
pure virtual

Checks if SQL table is without row id table.

Returns
true if SQL table is without row id table, otherwise false.
Exceptions
CppRuntimeExceptionIf the zserio type is not SQL table type.

Implemented in zserio::RecursiveTypeInfo< ALLOC >, zserio::SqlTableTypeInfo< ALLOC >, zserio::TypeInfoBase< ALLOC >, and zserio::TypeInfoBase< std::allocator< uint8_t > >.


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