Zserio C++ runtime library  1.3.0
Built for Zserio 2.18.0
zserio::TypeInfoBase< ALLOC > Class Template Referenceabstract

#include <TypeInfo.h>

Inheritance diagram for zserio::TypeInfoBase< ALLOC >:
Collaboration diagram for zserio::TypeInfoBase< ALLOC >:

Public Member Functions

 TypeInfoBase (StringView schemaName, SchemaType schemaType, CppType cppType)
 
 ~TypeInfoBase () override=0
 
StringView getSchemaName () const override
 
SchemaType getSchemaType () const override
 
CppType getCppType () const override
 
uint8_t getBitSize () const override
 
Span< const BasicFieldInfo< ALLOC > > getFields () const override
 
Span< const BasicParameterInfo< ALLOC > > getParameters () const override
 
Span< const BasicFunctionInfo< ALLOC > > getFunctions () const override
 
StringView getSelector () const override
 
Span< const BasicCaseInfo< ALLOC > > getCases () const override
 
const IBasicTypeInfo< ALLOC > & getUnderlyingType () const override
 
Span< const StringViewgetUnderlyingTypeArguments () const override
 
Span< const ItemInfogetEnumItems () const override
 
Span< const ItemInfogetBitmaskValues () const override
 
Span< const BasicColumnInfo< ALLOC > > getColumns () const override
 
StringView getSqlConstraint () const override
 
StringView getVirtualTableUsing () const override
 
bool isWithoutRowId () const override
 
Span< const BasicTableInfo< ALLOC > > getTables () const override
 
StringView getTemplateName () const override
 
Span< const BasicTemplateArgumentInfo< ALLOC > > getTemplateArguments () const override
 
Span< const BasicMessageInfo< ALLOC > > getMessages () const override
 
Span< const BasicMethodInfo< ALLOC > > getMethods () const override
 
IBasicReflectablePtr< ALLOC > createInstance (const ALLOC &allocator) const override
 
IBasicReflectablePtr< ALLOC > createInstance () const override
 
 TypeInfoBase (const TypeInfoBase &)=delete
 
TypeInfoBaseoperator= (const TypeInfoBase &)=delete
 
 TypeInfoBase (const TypeInfoBase &&)=delete
 
TypeInfoBaseoperator= (const TypeInfoBase &&)=delete
 
- Public Member Functions inherited from zserio::IBasicTypeInfo< ALLOC >
virtual ~IBasicTypeInfo ()=default
 

Detailed Description

template<typename ALLOC>
class zserio::TypeInfoBase< ALLOC >

Type information abstract base class.

This base class implements fully the methods getSchemaName(), getSchemaName() and getCppType(). All other interface methods just throw an exception.

Definition at line 24 of file TypeInfo.h.

Constructor & Destructor Documentation

◆ TypeInfoBase() [1/3]

template<typename ALLOC >
zserio::TypeInfoBase< ALLOC >::TypeInfoBase ( StringView  schemaName,
SchemaType  schemaType,
CppType  cppType 
)

Constructor.

Parameters
schemaNameThe schema name to be stored in type information.
schemaTypeThe schema type to be stored in type information.
cppTypeThe C++ type to be stored in type information.

Definition at line 853 of file TypeInfo.h.

◆ TypeInfoBase() [2/3]

template<typename ALLOC >
zserio::TypeInfoBase< ALLOC >::TypeInfoBase ( const TypeInfoBase< ALLOC > &  )
delete

Copying and moving is disallowed!

◆ TypeInfoBase() [3/3]

template<typename ALLOC >
zserio::TypeInfoBase< ALLOC >::TypeInfoBase ( const TypeInfoBase< ALLOC > &&  )
delete

Copying and moving is disallowed!

◆ ~TypeInfoBase()

template<typename ALLOC >
zserio::TypeInfoBase< ALLOC >::~TypeInfoBase ( )
overridepure virtualdefault

Member Function Documentation

◆ createInstance() [1/2]

template<typename ALLOC >
IBasicReflectablePtr< ALLOC > zserio::TypeInfoBase< ALLOC >::createInstance
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Definition at line 1001 of file TypeInfo.h.

◆ createInstance() [2/2]

template<typename ALLOC >
IBasicReflectablePtr< ALLOC > zserio::TypeInfoBase< ALLOC >::createInstance ( const ALLOC &  allocator) const
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::CompoundTypeInfoBase< ALLOC >.

Definition at line 995 of file TypeInfo.h.

◆ getBitmaskValues()

template<typename ALLOC >
Span< const ItemInfo > zserio::TypeInfoBase< ALLOC >::getBitmaskValues
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::BitmaskTypeInfo< ALLOC >.

Definition at line 935 of file TypeInfo.h.

◆ getBitSize()

template<typename ALLOC >
uint8_t zserio::TypeInfoBase< ALLOC >::getBitSize
overridevirtual

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).

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::FixedSizeBuiltinTypeInfo< ALLOC >.

Definition at line 881 of file TypeInfo.h.

◆ getCases()

template<typename ALLOC >
Span< const BasicCaseInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getCases
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::ChoiceTypeInfo< ALLOC >.

Definition at line 911 of file TypeInfo.h.

◆ getColumns()

template<typename ALLOC >
Span< const BasicColumnInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getColumns
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::SqlTableTypeInfo< ALLOC >.

Definition at line 941 of file TypeInfo.h.

◆ getCppType()

template<typename ALLOC >
CppType zserio::TypeInfoBase< ALLOC >::getCppType
overridevirtual

Gets the C++ type.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Definition at line 875 of file TypeInfo.h.

◆ getEnumItems()

template<typename ALLOC >
Span< const ItemInfo > zserio::TypeInfoBase< ALLOC >::getEnumItems
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::EnumTypeInfo< ALLOC >.

Definition at line 929 of file TypeInfo.h.

◆ getFields()

template<typename ALLOC >
Span< const BasicFieldInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getFields
overridevirtual

Gets the type information for compound type fields.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::CompoundTypeInfoBase< ALLOC >.

Definition at line 887 of file TypeInfo.h.

◆ getFunctions()

template<typename ALLOC >
Span< const BasicFunctionInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getFunctions
overridevirtual

Gets the type information for compound type functions.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::CompoundTypeInfoBase< ALLOC >.

Definition at line 899 of file TypeInfo.h.

◆ getMessages()

template<typename ALLOC >
Span< const BasicMessageInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getMessages
overridevirtual

Gets the type information for pubsub messages.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::PubsubTypeInfo< ALLOC >.

Definition at line 983 of file TypeInfo.h.

◆ getMethods()

template<typename ALLOC >
Span< const BasicMethodInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getMethods
overridevirtual

Gets the type information for service methods.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::ServiceTypeInfo< ALLOC >.

Definition at line 989 of file TypeInfo.h.

◆ getParameters()

template<typename ALLOC >
Span< const BasicParameterInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getParameters
overridevirtual

Gets the type information for compound type parameters.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::CompoundTypeInfoBase< ALLOC >.

Definition at line 893 of file TypeInfo.h.

◆ getSchemaName()

template<typename ALLOC >
StringView zserio::TypeInfoBase< ALLOC >::getSchemaName
overridevirtual

Gets the schema name.

Returns
The zserio full name stored in schema.

Implements zserio::IBasicTypeInfo< ALLOC >.

Definition at line 863 of file TypeInfo.h.

◆ getSchemaType()

template<typename ALLOC >
SchemaType zserio::TypeInfoBase< ALLOC >::getSchemaType
overridevirtual

Gets the schema type.

Returns
The zserio type stored in schema.

Implements zserio::IBasicTypeInfo< ALLOC >.

Definition at line 869 of file TypeInfo.h.

◆ getSelector()

template<typename ALLOC >
StringView zserio::TypeInfoBase< ALLOC >::getSelector
overridevirtual

Gets the selector for choice type.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::ChoiceTypeInfo< ALLOC >.

Definition at line 905 of file TypeInfo.h.

◆ getSqlConstraint()

template<typename ALLOC >
StringView zserio::TypeInfoBase< ALLOC >::getSqlConstraint
overridevirtual

Gets the SQL table constraint.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::SqlTableTypeInfo< ALLOC >.

Definition at line 947 of file TypeInfo.h.

◆ getTables()

template<typename ALLOC >
Span< const BasicTableInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getTables
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::SqlDatabaseTypeInfo< ALLOC >.

Definition at line 965 of file TypeInfo.h.

◆ getTemplateArguments()

template<typename ALLOC >
Span< const BasicTemplateArgumentInfo< ALLOC > > zserio::TypeInfoBase< ALLOC >::getTemplateArguments
overridevirtual

Gets the type information for template arguments.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::TemplatableTypeInfoBase< ALLOC >.

Definition at line 977 of file TypeInfo.h.

◆ getTemplateName()

template<typename ALLOC >
StringView zserio::TypeInfoBase< ALLOC >::getTemplateName
overridevirtual

Gets the full schema template name.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::TemplatableTypeInfoBase< ALLOC >.

Definition at line 971 of file TypeInfo.h.

◆ getUnderlyingType()

template<typename ALLOC >
const IBasicTypeInfo< ALLOC > & zserio::TypeInfoBase< ALLOC >::getUnderlyingType
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::TypeInfoWithUnderlyingTypeBase< ALLOC >.

Definition at line 917 of file TypeInfo.h.

◆ getUnderlyingTypeArguments()

template<typename ALLOC >
Span< const StringView > zserio::TypeInfoBase< ALLOC >::getUnderlyingTypeArguments
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::TypeInfoWithUnderlyingTypeBase< ALLOC >.

Definition at line 923 of file TypeInfo.h.

◆ getVirtualTableUsing()

template<typename ALLOC >
StringView zserio::TypeInfoBase< ALLOC >::getVirtualTableUsing
overridevirtual

Gets the SQL virtual table using specification.

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

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::SqlTableTypeInfo< ALLOC >.

Definition at line 953 of file TypeInfo.h.

◆ isWithoutRowId()

template<typename ALLOC >
bool zserio::TypeInfoBase< ALLOC >::isWithoutRowId
overridevirtual

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.

Implements zserio::IBasicTypeInfo< ALLOC >.

Reimplemented in zserio::SqlTableTypeInfo< ALLOC >.

Definition at line 959 of file TypeInfo.h.

◆ operator=() [1/2]

template<typename ALLOC >
TypeInfoBase& zserio::TypeInfoBase< ALLOC >::operator= ( const TypeInfoBase< ALLOC > &&  )
delete

Copying and moving is disallowed!

◆ operator=() [2/2]

template<typename ALLOC >
TypeInfoBase& zserio::TypeInfoBase< ALLOC >::operator= ( const TypeInfoBase< ALLOC > &  )
delete

Copying and moving is disallowed!


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