![]() |
![]() |
![]() |
Swfdec Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <swfdec/swfdec.h> SwfdecAsArray; SwfdecAsObject * swfdec_as_array_new (SwfdecAsContext *context
); #define swfdec_as_array_append (array, n, values) void swfdec_as_array_append_with_flags (SwfdecAsArray *array
,guint n
,const SwfdecAsValue *values
,SwfdecAsVariableFlag flags
); void swfdec_as_array_insert (SwfdecAsArray *array
,gint32 idx
,SwfdecAsValue *value
); void swfdec_as_array_insert_with_flags (SwfdecAsArray *array
,gint32 idx
,const SwfdecAsValue *value
,SwfdecAsVariableFlag flags
); #define swfdec_as_array_push (array, value) #define swfdec_as_array_push_with_flags (array, value, flags) gint32 swfdec_as_array_get_length (SwfdecAsArray *array
); void swfdec_as_array_set_length (SwfdecAsArray *array
,gint32 length
); void swfdec_as_array_get_value (SwfdecAsArray *array
,gint32 idx
,SwfdecAsValue *value
); void swfdec_as_array_set_value (SwfdecAsArray *array
,gint32 idx
,SwfdecAsValue *value
); void swfdec_as_array_remove (SwfdecAsArray *array
,gint32 idx
);
SwfdecAsObject * swfdec_as_array_new (SwfdecAsContext *context
);
Creates a new SwfdecAsArray.
|
a SwfdecAsContext |
Returns : |
the new array |
#define swfdec_as_array_append(array,n,values)
Appends the given values
to the array
. This is a macro that just calls
swfdec_as_array_append_with_flags()
.
|
a SwfdecAsArray |
|
number of values to add |
|
the values to add |
void swfdec_as_array_append_with_flags (SwfdecAsArray *array
,guint n
,const SwfdecAsValue *values
,SwfdecAsVariableFlag flags
);
Appends the given values
to the array
using the given flags
.
|
a SwfdecAsArray |
|
number of values to add |
|
the values to add |
|
the SwfdecAsVariableFlag flags to use |
void swfdec_as_array_insert (SwfdecAsArray *array
,gint32 idx
,SwfdecAsValue *value
);
Inserts value
to array
at given index, making room for it by moving
elements to bigger indexes if necessary. This is a macro that just calls
swfdec_as_array_insert_with_flags()
.
|
a SwfdecAsArray |
|
index to insert the value to |
|
a SwfdecAsValue |
void swfdec_as_array_insert_with_flags (SwfdecAsArray *array
,gint32 idx
,const SwfdecAsValue *value
,SwfdecAsVariableFlag flags
);
Inserts value
to array
at given index using given flags
, making room for
it by moving elements to bigger indexes if necessary.
|
a SwfdecAsArray |
|
index to insert the value to |
|
a SwfdecAsValue |
|
the SwfdecAsVariableFlag flags to use |
#define swfdec_as_array_push(array,value)
Adds the given value
to the array
. This is a macro that just calls
swfdec_as_array_append_with_flags()
.
|
a SwfdecAsArray |
|
the value to add |
#define swfdec_as_array_push_with_flags(array,value,flags)
Adds the given value
to the array
with the given flags
. This is a macro
that just calls swfdec_as_array_append_with_flags()
.
|
a SwfdecAsArray |
|
the value to add |
|
the SwfdecAsVariableFlag flags to use |
gint32 swfdec_as_array_get_length (SwfdecAsArray *array
);
Gets the current length of the array
.
|
a SwfdecAsArray |
Returns : |
Current length of the array , always >= 0 |
void swfdec_as_array_set_length (SwfdecAsArray *array
,gint32 length
);
Sets the length of the array
. Values outside the new length will be
removed.
|
a SwfdecAsArray |
|
the new length |
void swfdec_as_array_get_value (SwfdecAsArray *array
,gint32 idx
,SwfdecAsValue *value
);
Gets a value from given index, if the value doesn't exists an undefined value is set.
|
a SwfdecAsArray |
|
index of the value to get |
|
a pointer to SwfdecAsValue that will be set |
void swfdec_as_array_set_value (SwfdecAsArray *array
,gint32 idx
,SwfdecAsValue *value
);
Sets a value
to given index. The array
's length will be increased if
necessary.
|
a SwfdecAsArray |
|
index of the value to set |
|
a pointer to SwfdecAsValue |
void swfdec_as_array_remove (SwfdecAsArray *array
,gint32 idx
);
Removes value at given index from the array
, elements with higher indexes
will be moved towards the start of the array
.
|
a SwfdecAsArray |
|
index of the value to remove |