Halide
halide_handle_cplusplus_type Struct Reference

A structure to represent the fully scoped name of a C++ composite type for use in generating function signatures that use that type. More...

#include <Type.h>

Public Types

enum  Modifier : uint8_t { Const = 1 << 0, Volatile = 1 << 1, Restrict = 1 << 2, Pointer = 1 << 3 }
 One set of modifiers on a type. More...
 
enum  ReferenceType : uint8_t { NotReference = 0, LValueReference = 1, RValueReference = 2 }
 References are separate because they only occur at the outermost level. More...
 

Public Member Functions

 halide_handle_cplusplus_type (const halide_cplusplus_type_name &inner_name, const std::vector< std::string > &namespaces={ }, const std::vector< halide_cplusplus_type_name > &enclosing_types={ }, const std::vector< uint8_t > &modifiers={ }, ReferenceType reference_type=NotReference)
 

Public Attributes

halide_cplusplus_type_name inner_name
 
std::vector< std::string > namespaces
 
std::vector< halide_cplusplus_type_nameenclosing_types
 
std::vector< uint8_tcpp_type_modifiers
 Qualifiers and indirections on type. 0 is innermost. More...
 
ReferenceType reference_type
 

Detailed Description

A structure to represent the fully scoped name of a C++ composite type for use in generating function signatures that use that type.

This is intended to be a constexpr usable type, but we don't depend on C++11 yet. In C++14, it is possible this will be replaced with introspection/reflection facilities.

Definition at line 77 of file Type.h.

Member Enumeration Documentation

◆ Modifier

One set of modifiers on a type.

The const/volatile/restrict propertises are "inside" the pointer property.

Enumerator
Const 

Bitmask flag for "const".

Volatile 

Bitmask flag for "volatile".

Restrict 

Bitmask flag for "restrict".

Pointer 

Bitmask flag for a pointer "*".

Definition at line 84 of file Type.h.

◆ ReferenceType

References are separate because they only occur at the outermost level.

No modifiers are needed for references as they are not allowed to apply to the reference itself. (This isn't true for restrict, but that is a C++ extension anyway.) If modifiers are needed, the last entry in the above array would be the modifers for the reference.

Enumerator
NotReference 
LValueReference 
RValueReference 

Definition at line 99 of file Type.h.

Constructor & Destructor Documentation

◆ halide_handle_cplusplus_type()

halide_handle_cplusplus_type::halide_handle_cplusplus_type ( const halide_cplusplus_type_name inner_name,
const std::vector< std::string > &  namespaces = { },
const std::vector< halide_cplusplus_type_name > &  enclosing_types = { },
const std::vector< uint8_t > &  modifiers = { },
ReferenceType  reference_type = NotReference 
)
inline

Definition at line 106 of file Type.h.

Member Data Documentation

◆ inner_name

halide_cplusplus_type_name halide_handle_cplusplus_type::inner_name

Definition at line 78 of file Type.h.

Referenced by halide_internal_handle_traits< T, true >::make_info().

◆ namespaces

std::vector<std::string> halide_handle_cplusplus_type::namespaces

Definition at line 79 of file Type.h.

Referenced by halide_internal_handle_traits< T, true >::make_info().

◆ enclosing_types

std::vector<halide_cplusplus_type_name> halide_handle_cplusplus_type::enclosing_types

Definition at line 80 of file Type.h.

◆ cpp_type_modifiers

std::vector<uint8_t> halide_handle_cplusplus_type::cpp_type_modifiers

Qualifiers and indirections on type. 0 is innermost.

Definition at line 92 of file Type.h.

◆ reference_type

ReferenceType halide_handle_cplusplus_type::reference_type

Definition at line 104 of file Type.h.


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