17#include <gyoji-misc/pointers.hpp>
18#include <gyoji-context.hpp>
123 void dump(FILE *out)
const;
149 const Type *_argument_type,
176 const Type *argument_type;
202 const Type *_member_type,
254 const Type *member_type;
274 const Type *_class_type,
275 const Type *_return_type,
282 const Type *get_class_type()
const;
283 const Type *get_return_type()
const;
288 const Type *class_type;
289 const Type *return_type;
693 const TypeMethod *method_get_destructor()
const;
730 const Type * get_class_type()
const;
731 const Type * get_function_pointer_type()
const;
760 const Type *_return_type,
770 void dump(FILE *out)
const;
800 const Type *pointer_or_ref;
804 const Type *return_type;
816 const Type *class_type;
817 const Type *function_pointer_type;
References a location in the source-file.
Definition source-reference.hpp:30
Function argument.
Definition types.hpp:141
const Gyoji::context::SourceReference & get_source_ref() const
Definition type.cpp:470
~Argument()
Move along, nothing to see here.
Definition type.cpp:463
const Type * get_type() const
Definition type.cpp:466
This represents a typed member variable of a class.
Definition types.hpp:191
~TypeMember()
Move along, nothing to see here.
Definition type-member.cpp:40
const Gyoji::context::SourceReference & get_source_ref() const
Definition type-member.cpp:50
size_t get_index() const
Definition type-member.cpp:53
const Type * get_type() const
Definition type-member.cpp:47
const std::string & get_name() const
Definition type-member.cpp:44
Method of a class.
Definition types.hpp:269
This represents a type as declared in a translation unit.
Definition types.hpp:313
bool is_float() const
Definition type.cpp:179
bool is_complete() const
Definition type.cpp:92
bool is_signed() const
Definition type.cpp:159
bool is_void() const
Definition type.cpp:194
void complete_pointer_definition(const Type *_type, const Gyoji::context::SourceReference &_source_ref)
Definition type.cpp:327
const std::string & get_simple_name() const
Definition type.cpp:253
const std::vector< TypeMember > & get_members() const
Definition type.cpp:257
void complete_composite_definition(std::vector< TypeMember > _members, std::map< std::string, TypeMethod > _methods, const Gyoji::context::SourceReference &_source_ref)
Definition type.cpp:344
const Type * get_return_type() const
Definition type.cpp:300
bool is_composite() const
Definition type.cpp:204
void dump(FILE *out) const
Definition type.cpp:382
bool is_anonymous() const
Definition type.cpp:207
bool is_unsigned() const
Definition type.cpp:169
bool is_bool() const
Definition type.cpp:187
bool is_numeric() const
Definition type.cpp:126
bool is_array() const
Definition type.cpp:215
const TypeMember * member_get(const std::string &member_name) const
Definition type.cpp:265
bool is_pointer() const
Definition type.cpp:118
const std::map< std::string, TypeMethod > & get_methods() const
Definition type.cpp:261
const Gyoji::context::SourceReference & get_defined_source_ref() const
Definition type.cpp:378
~Type()
Move along, nothing to see here.
Definition type.cpp:88
size_t get_primitive_size() const
Definition type.cpp:219
bool is_unsafe() const
Definition type.cpp:310
bool is_primitive() const
Definition type.cpp:96
const Type * get_pointer_target() const
Definition type.cpp:292
bool is_reference() const
Definition type.cpp:122
const std::vector< Argument > & get_argument_types() const
Definition type.cpp:304
size_t get_array_length() const
Definition type.cpp:296
bool is_integer() const
Definition type.cpp:144
TypeType get_type() const
Definition type.cpp:246
const Gyoji::context::SourceReference & get_declared_source_ref() const
Definition type.cpp:374
const std::string & get_name() const
Definition type.cpp:249
bool is_function_pointer() const
Definition type.cpp:211
void complete_array_definition(const Type *_type, size_t _array_size, const Gyoji::context::SourceReference &_source_ref)
Definition type.cpp:335
bool is_enum() const
Definition type.cpp:200
void complete_function_pointer_definition(const Type *_return_type, const std::vector< Argument > &_argument_types, bool _is_unsafe, const Gyoji::context::SourceReference &_source_ref)
Definition type.cpp:359
TypeType
Type of type.
Definition types.hpp:335
@ TYPE_PRIMITIVE_u16
Primitive 16-bit unsigned integer.
Definition types.hpp:351
@ TYPE_ANONYMOUS_STRUCTURE
Definition types.hpp:468
@ TYPE_ENUM
Definition types.hpp:493
@ TYPE_ARRAY
Definition types.hpp:498
@ TYPE_PRIMITIVE_void
Primitive 'void' type.
Definition types.hpp:448
@ TYPE_REFERENCE
Definition types.hpp:487
@ TYPE_PRIMITIVE_f32
Primitive 32 bit floating-point number.
Definition types.hpp:412
@ TYPE_COMPOSITE
Definition types.hpp:457
@ TYPE_PRIMITIVE_i8
Primitive 8-bit signed integer.
Definition types.hpp:377
@ TYPE_PRIMITIVE_f64
Primitive 64 bit floating-point number.
Definition types.hpp:419
@ TYPE_PRIMITIVE_i16
Primitive 16-bit signed integer.
Definition types.hpp:386
@ TYPE_PRIMITIVE_i32
Primitive 32-bit signed integer.
Definition types.hpp:395
@ TYPE_PRIMITIVE_u8
Primitive 8-bit unsigned integer.
Definition types.hpp:343
@ TYPE_POINTER
Definition types.hpp:475
@ TYPE_FUNCTION_POINTER
Definition types.hpp:480
@ TYPE_PRIMITIVE_bool
Primitive boolean value holding 'true' or 'false'.
Definition types.hpp:432
@ TYPE_PRIMITIVE_i64
Primitive 64-bit signed integer.
Definition types.hpp:404
@ TYPE_PRIMITIVE_u64
Primitive 64-bit unsigned integer.
Definition types.hpp:367
@ TYPE_PRIMITIVE_u32
Primitive 32-bit unsigned integer.
Definition types.hpp:359
Set of types extracted from a translation unit.
Definition types.hpp:54
const Type * get_reference_to(const Type *_type, const Gyoji::context::SourceReference &_src_ref)
Definition types.cpp:80
const std::map< std::string, Gyoji::owned< Type > > & get_types() const
Definition types.cpp:122
Type * get_type(std::string type) const
Definition types.cpp:56
void define_type(Gyoji::owned< Type > type)
Definition types.cpp:115
const Type * get_pointer_to(const Type *_type, const Gyoji::context::SourceReference &_src_ref)
Definition types.cpp:65
const Type * get_array_of(const Type *_type, size_t _length, const Gyoji::context::SourceReference &_src_ref)
Definition types.cpp:96
void dump(FILE *out) const
Definition types.cpp:127
Types()
Creates a new types table with only the primitive types defined.
Definition types.cpp:29
~Types()
Move along, nothing to see here.
Definition types.cpp:52
Middle intermediate representation (MIR) of a translation unit.
Definition gyoji-mir.hpp:51