20 return (
kind != nyt_void) and (
kind != nyt_any);
25 return kind != nyt_any;
30 return kind == nyt_ptr and (
atom ==
nullptr);
35 return kind == nyt_u64;
40 return kind == nyt_u32;
45 return kind == nyt_u8;
63 return kind == nyt_void;
68 assert((
nullptr ==
atom or (
kind == nyt_any))
69 and
"the kind of a classdef must be 'any' if an atom is provided");
70 return nullptr !=
atom;
75 return (
nullptr ==
atom) and (
kind == nyt_any);
80 return nullptr !=
atom;
96 assert(newkind != nyt_void and newkind != nyt_any);
102 assert(newkind != nyt_any);
135 interface = rhs.interface;
137 origins = rhs.origins;
ClassdefFollow followup
Other calls to follow.
Definition: classdef.h:143
void mutateToBuiltin(nytype_t)
Mutate the type to builtin (not void)
Definition: classdef.hxx:95
bool isLinkedToAtom() const
Get if the type is defined by an atom (an 'atom' is provided)
Definition: classdef.hxx:67
bool isBuiltingUnsigned() const
Get if the classdef is a builtin unsigned int (u32, u64...)
Definition: classdef.hxx:49
ClassdefInterface interface
Interface.
Definition: classdef.h:141
void mutateToAny()
Mutate the type to any.
Definition: classdef.hxx:107
bool hasAtom() const
Get if the classdef has a linked atom.
Definition: classdef.hxx:79
bool empty() const
Get if the container is empty.
Definition: interface.hxx:25
CLID clid
Classdef ID.
Definition: classdef.h:132
void mutateToAtom(Atom *)
Mutate to a well-known type (from atom)
Definition: classdef.hxx:113
Class definition.
Definition: classdef.h:24
bool isBuiltinU8() const
Get if the classdef is a builtin u32.
Definition: classdef.hxx:44
Atom * atom
Atom.
Definition: classdef.h:130
bool isBuiltinU64() const
Get if the classdef is a builtin u64.
Definition: classdef.hxx:34
bool instance
Has a value ? (is a variable)
Definition: classdef.h:136
void mutateToPtr2Func(Atom *)
Mutate to a ptr-2-func/method.
Definition: classdef.hxx:119
bool isBuiltin() const
Get if the classdef is a builtin type (not 'void')
Definition: classdef.hxx:19
bool isAny() const
Get if the type is 'any'.
Definition: classdef.hxx:74
bool hasConstraints() const
Get if the classdef has some constraints.
Definition: classdef.hxx:125
Definition of a single class or function.
Definition: atom.h:37
void mutateToBuiltinOrVoid(nytype_t)
Mutate the type to builtin (or void)
Definition: classdef.hxx:101
void import(const Classdef &rhs)
Import from another classdef.
Definition: classdef.hxx:130
bool isVoid() const
Get if the classdef is void.
Definition: classdef.hxx:62
nytype_t kind
Inner builtin type (custom type if == nyt_any)
Definition: classdef.h:128
bool isVariable() const
Get if is a variable.
Definition: classdef.hxx:84
bool isRawPointer() const
Get if the classdef is a builtin pointer.
Definition: classdef.hxx:29
bool isBuiltinOrVoid() const
Get if the classdef is a builtin type ('void' included)
Definition: classdef.hxx:24
CLID parentclid
Parent class ID.
Definition: classdef.h:134
void mutateToVoid()
Mutate the defintiion to 'void'.
Definition: classdef.hxx:89
void print(Yuni::String &out, const ClassdefTableView &table, bool clearBefore=true) const
Export the classdef to a human readable string.
Definition: classdef.cpp:42
bool isBuiltinU32() const
Get if the classdef is a builtin u32.
Definition: classdef.hxx:39
Classdef()
Default constructor.
Definition: classdef.hxx:8
Definition: classdef-table-view.h:9