36#include <angelscript.h>
46#ifndef AS_USE_STLNAMES
47#define AS_USE_STLNAMES 0
59 static void SetMemoryFunctions(asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc);
63 static CScriptArray *Create(asITypeInfo *ot, asUINT length);
64 static CScriptArray *Create(asITypeInfo *ot, asUINT length,
void *defaultValue);
65 static CScriptArray *Create(asITypeInfo *ot,
void *listBuffer);
72 asITypeInfo *GetArrayObjectType()
const;
73 int GetArrayTypeId()
const;
74 int GetElementTypeId()
const;
77 asUINT GetSize()
const;
83 void Reserve(asUINT maxElements);
86 void Resize(asUINT numElements);
89 void *At(asUINT index);
90 const void *At(asUINT index)
const;
96 void SetValue(asUINT index,
void *value);
105 void InsertAt(asUINT index,
void *value);
107 void InsertLast(
void *value);
108 void RemoveAt(asUINT index);
110 void RemoveRange(asUINT start, asUINT count);
113 void SortAsc(asUINT startAt, asUINT count);
114 void SortDesc(asUINT startAt, asUINT count);
115 void Sort(asUINT startAt, asUINT count,
bool asc);
116 void Sort(asIScriptFunction *less, asUINT startAt, asUINT count);
118 int Find(
void *value)
const;
119 int Find(asUINT startAt,
void *value)
const;
120 int FindByRef(
void *ref)
const;
121 int FindByRef(asUINT startAt,
void *ref)
const;
130 void EnumReferences(asIScriptEngine *engine);
131 void ReleaseAllHandles(asIScriptEngine *engine);
134 mutable int refCount;
136 asITypeInfo *objType;
144 CScriptArray(asUINT length,
void *defVal, asITypeInfo *ot);
148 bool Less(
const void *a,
const void *b,
bool asc, asIScriptContext *ctx,
SArrayCache *cache);
149 void *GetArrayItemPointer(
int index);
150 void *GetDataPointer(
void *buffer);
151 void Copy(
void *dst,
void *src);
153 bool CheckMaxSize(asUINT numElements);
154 void Resize(
int delta, asUINT at);
155 void CreateBuffer(
SArrayBuffer **buf, asUINT numElements);
158 void Construct(
SArrayBuffer *buf, asUINT start, asUINT end);
159 void Destruct(
SArrayBuffer *buf, asUINT start, asUINT end);
160 bool Equals(
const void *a,
const void *b, asIScriptContext *ctx,
SArrayCache *cache)
const;
163void RegisterScriptArray(asIScriptEngine *engine,
bool defaultArray);
Definition: scriptarray.hpp:56
Definition: scriptarray.cpp:64
Definition: scriptarray.cpp:71