 |
Gorgon Game Engine
|
Go to the documentation of this file.
7 #include "../Reflection.h"
8 #include "../Exceptions.h"
23 throw OutofBoundsException(index, (
long)
elements.size(),
"Array");
30 throw OutofBoundsException(index, (
long)
elements.size(),
"Array");
33 return elements[index].GetReference();
38 throw OutofBoundsException(index, (
long)
elements.size(),
"Array");
65 throw OutofBoundsException(0, (
long)
elements.size(),
"Array");
Array(const Type &type)
Definition: Array.h:16
Data GetItemData(unsigned index) const
Definition: Array.h:21
Data PopData()
Definition: Array.h:63
const std::vector< Data > & Elements
Definition: Array.h:86
void Register(const Data &data)
Registers a new object of reference counting, this will set reference count to one.
Definition: Runtime.h:24
virtual void AddMembers(std::initializer_list< StaticMember * > newmembers) override
Adds a list of static members to this type.
Definition: Reflection.h:1228
This class can hold any other information providing type erasure.
Definition: Any.h:32
ReferenceCounter References
This system allows objects of automatic lifetime.
Definition: VirtualMachine.h:222
const Type & GetType() const
Definition: Array.h:82
Data describes a piece of data.
Definition: Data.h:22
unsigned GetSize() const
Definition: Array.h:78
Array(const Array &arr)
Definition: Array.h:18
static VirtualMachine & Get()
Returns the current VM for this thread.
Definition: VirtualMachine.h:109
InstanceMember * MapFunctionToInstanceMember(F_ reader, const std::string &name, const std::string &help, const Type *membertype, const Type *parenttype)
This function will map a const data returning function to a read-only, non-ref, const instance member...
Definition: Embedding.h:1147
const Type & GetType() const
Returns the type of the data.
Definition: Data.h:173
Data GetItemData(unsigned index)
Definition: Array.h:28
This class stores information about types.
Definition: Reflection.h:1165
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
const Type * type
Definition: Array.h:91
virtual void AddMember(StaticMember &member) override
Adds a static member to this type.
Definition: Reflection.h:1214
std::vector< Data > elements
Definition: Array.h:89
void PushData(Data elm)
Definition: Array.h:52
@ ReferenceTag
Marks the object as a reference.
Definition: Reflection.h:61
Any GetDefaultValue() const
Returns the value of the type.
Definition: Reflection.h:1322
@ ConstTag
Marks a parameter or a function constant.
Definition: Reflection.h:95
Type * ArrayType()
Definition: Array.cpp:74
void PushData(Any elm, bool ref=false, bool cnst=false)
Definition: Array.h:59
This class represents a function parameter description.
Definition: Reflection.h:137
void SetItemData(unsigned index, Data data)
Definition: Array.h:36
Type
Definition: Shader.h:14
std::vector< StaticMember * > ArrayFunctions()
Definition: Array.cpp:198
void PushWithoutCheck(const T_ &elm)
Definition: Array.h:48
void Resize(unsigned size)
Definition: Array.h:74
This class allows embedded types to become scripting types that are passed around as references.
Definition: Embedding.h:1406
std::vector< T_ >::const_iterator end(enum_type_id< T_ >)
Definition: Enum.h:288
Scripting::Function::Overload * MapFunction(F_ fn, const Type *returntype, ParameterList parameters, P_ ...tags)
Definition: Embedding.h:614
const Scripting::Type & Function()
Definition: Reflection.h:589
Array * BuildArray(const Type *type, std::vector< Data > datav)
Definition: Array.cpp:184
Data MorphTo(const Type &type, Data source, bool allowtypecast=true) const
Morphs the given data into the target type.
Definition: Reflection.cpp:123