3#include <gyoji-misc/pointers.hpp>
4#include <gyoji-context.hpp>
109 void dump(FILE *out)
const;
135 const Type *_argument_type,
162 const Type *argument_type;
188 const Type *_member_type,
240 const Type *member_type;
260 const Type *_class_type,
261 const Type *_return_type,
268 const Type *get_class_type()
const;
269 const Type *get_return_type()
const;
274 const Type *class_type;
275 const Type *return_type;
697 const Type *_return_type,
706 void dump(FILE *out)
const;
734 const Type *pointer_or_ref;
738 const Type *return_type;
References a location in the source-file.
Definition source-reference.hpp:16
Function argument.
Definition types.hpp:127
const Gyoji::context::SourceReference & get_source_ref() const
Definition type.cpp:381
~Argument()
Move along, nothing to see here.
Definition type.cpp:374
const Type * get_type() const
Definition type.cpp:377
This represents a typed member variable of a class.
Definition types.hpp:177
~TypeMember()
Move along, nothing to see here.
Definition type-member.cpp:26
const Gyoji::context::SourceReference & get_source_ref() const
Definition type-member.cpp:36
size_t get_index() const
Definition type-member.cpp:39
const Type * get_type() const
Definition type-member.cpp:33
const std::string & get_name() const
Definition type-member.cpp:30
Method of a class.
Definition types.hpp:255
This represents a type as declared in a translation unit.
Definition types.hpp:299
bool is_float() const
Definition type.cpp:134
bool is_complete() const
Definition type.cpp:47
bool is_signed() const
Definition type.cpp:114
bool is_void() const
Definition type.cpp:149
void complete_pointer_definition(const Type *_type, const Gyoji::context::SourceReference &_source_ref)
Definition type.cpp:242
const std::vector< TypeMember > & get_members() const
Definition type.cpp:205
void complete_composite_definition(std::vector< TypeMember > _members, std::map< std::string, TypeMethod > _methods, const Gyoji::context::SourceReference &_source_ref)
Definition type.cpp:259
const Type * get_return_type() const
Definition type.cpp:231
bool is_composite() const
Definition type.cpp:159
void dump(FILE *out) const
Definition type.cpp:295
bool is_unsigned() const
Definition type.cpp:124
bool is_bool() const
Definition type.cpp:142
bool is_numeric() const
Definition type.cpp:81
bool is_array() const
Definition type.cpp:167
const TypeMember * member_get(const std::string &member_name) const
Definition type.cpp:213
bool is_pointer() const
Definition type.cpp:73
const std::map< std::string, TypeMethod > & get_methods() const
Definition type.cpp:209
const Gyoji::context::SourceReference & get_defined_source_ref() const
Definition type.cpp:291
~Type()
Move along, nothing to see here.
Definition type.cpp:43
size_t get_primitive_size() const
Definition type.cpp:171
bool is_primitive() const
Definition type.cpp:51
const Type * get_pointer_target() const
Definition type.cpp:223
bool is_reference() const
Definition type.cpp:77
const std::vector< Argument > & get_argument_types() const
Definition type.cpp:235
size_t get_array_length() const
Definition type.cpp:227
bool is_integer() const
Definition type.cpp:99
TypeType get_type() const
Definition type.cpp:198
const Gyoji::context::SourceReference & get_declared_source_ref() const
Definition type.cpp:287
const std::string & get_name() const
Definition type.cpp:201
bool is_function_pointer() const
Definition type.cpp:163
void complete_array_definition(const Type *_type, size_t _array_size, const Gyoji::context::SourceReference &_source_ref)
Definition type.cpp:250
bool is_enum() const
Definition type.cpp:155
void complete_function_pointer_definition(const Type *_return_type, const std::vector< Argument > &_argument_types, const Gyoji::context::SourceReference &_source_ref)
Definition type.cpp:274
TypeType
Type of type.
Definition types.hpp:321
@ TYPE_PRIMITIVE_u16
Primitive 16-bit unsigned integer.
Definition types.hpp:337
@ TYPE_ENUM
Definition types.hpp:468
@ TYPE_ARRAY
Definition types.hpp:473
@ TYPE_PRIMITIVE_void
Primitive 'void' type.
Definition types.hpp:434
@ TYPE_REFERENCE
Definition types.hpp:462
@ TYPE_PRIMITIVE_f32
Primitive 32 bit floating-point number.
Definition types.hpp:398
@ TYPE_COMPOSITE
Definition types.hpp:443
@ TYPE_PRIMITIVE_i8
Primitive 8-bit signed integer.
Definition types.hpp:363
@ TYPE_PRIMITIVE_f64
Primitive 64 bit floating-point number.
Definition types.hpp:405
@ TYPE_PRIMITIVE_i16
Primitive 16-bit signed integer.
Definition types.hpp:372
@ TYPE_PRIMITIVE_i32
Primitive 32-bit signed integer.
Definition types.hpp:381
@ TYPE_PRIMITIVE_u8
Primitive 8-bit unsigned integer.
Definition types.hpp:329
@ TYPE_POINTER
Definition types.hpp:450
@ TYPE_FUNCTION_POINTER
Definition types.hpp:455
@ TYPE_PRIMITIVE_bool
Primitive boolean value holding 'true' or 'false'.
Definition types.hpp:418
@ TYPE_PRIMITIVE_i64
Primitive 64-bit signed integer.
Definition types.hpp:390
@ TYPE_PRIMITIVE_u64
Primitive 64-bit unsigned integer.
Definition types.hpp:353
@ TYPE_PRIMITIVE_u32
Primitive 32-bit unsigned integer.
Definition types.hpp:345
Set of types extracted from a translation unit.
Definition types.hpp:40
const std::map< std::string, Gyoji::owned< Type > > & get_types() const
Definition types.cpp:105
Type * get_type(std::string type) const
Definition types.cpp:42
const Type * get_reference_to(const Type *_type, const Gyoji::context::SourceReference &src_ref)
Definition types.cpp:66
const Type * get_array_of(const Type *_type, size_t _length, const Gyoji::context::SourceReference &src_ref)
Definition types.cpp:82
void define_type(Gyoji::owned< Type > type)
Definition types.cpp:98
void dump(FILE *out) const
Definition types.cpp:110
Types()
Creates a new types table with only the primitive types defined.
Definition types.cpp:15
const Type * get_pointer_to(const Type *_type, const Gyoji::context::SourceReference &src_ref)
Definition types.cpp:51
~Types()
Move along, nothing to see here.
Definition types.cpp:38
Middle intermediate representation (MIR) of a translation unit.
Definition gyoji-mir.hpp:37