<< ValueCompound
 Top   Types   Functions   Classes   Index 
ValueMap >>

struct CrlValueList / crl_value_list_t

Concrete Class


Description

List style storage. Has the same CRL syntax as vectors.

When read from a CRL file, lists read back as vectors until the day we implement type declarations in CRL.

To be compatible with vectors, lists have a lot of access functions. Most of them are quite inefficient because accessing a list with an integer index i needs O(i) time. If you access lists directly, use the functions that work on list_key_t instead, which provide direct access to the list cell.

Kinship

Immediate super class: ValueNested

Slots

ListValue children

Inherited Slots

int Object::class_id
int Object::heap_sig
int Object::ref_count
UserData Object::user_data

Members

CrlValueList()
CrlValueList(ValueList const &)
voidoperator=(ValueList const &)
list_key_tappend(AnyValue)
list_key_tappend(Value * value)
list_key_tappend(Item * value)
list_key_tappend(char const * value)
list_key_tappend(unsigned_t value)
list_key_tappend_float(float_t value)
list_key_tappend_signed(signed_t value)
list_key_tappend_symbol(symbol_t value)
list_key_tback() const
ListValue const *children() const
boolempty() const
voiderase(list_key_t key)
voiderase(list_key_t & iter, list_key_t key)
voiderase(signed_t)
boolfind(float_t & result, Value const * key) const
boolfind(signed_t & result, Value const * key) const
boolfind(unsigned_t & result, Value const * key) const
Value *find(Value const * key) const
boolfind_bool(Value const * key) const
byte_tfind_byte(Value const * key) const
intfind_int(Value const * key) const
Item *find_item(Value const * key) const
char const *find_string(Value const * key) const
symbol_tfind_symbol(Value const * key) const
word32_tfind_word32(Value const * key) const
Value *first() const
list_key_tfront() const
Value *get()
Value const *get() const
boolhas(list_key_t key) const
boolhas(signed_t key) const
boolhas(Value const * key) const
list_key_tinsert_after(list_key_t nth, Value *)
list_key_tinsert_after(list_key_t nth, AnyValue)
list_key_tinsert_before(list_key_t key, Value *)
list_key_tinsert_before(list_key_t nth, AnyValue)
boolinvalidate()
boolis_special(signed_t key) const
boolis_special(Value const * key) const
boolis_valid() const
boolis_valid_special() const
Value *last() const
intnentries() const
list_key_tnext(list_key_t) const
index_tnext_index() const
boolnon_empty() const
Value *nth(signed_t key) const
boolnth(float_t & result, signed_t key) const
boolnth(signed_t & result, signed_t key) const
boolnth(unsigned_t & result, signed_t key) const
boolnth_bool(signed_t key) const
byte_tnth_byte(signed_t key) const
intnth_int(signed_t key) const
Item *nth_item(signed_t key) const
char const *nth_string(signed_t key) const
symbol_tnth_symbol(signed_t key) const
word32_tnth_word32(signed_t key) const
boolpoke(Value * value)
boolpoke_once(Value * value)
list_key_tprepend(Value *)
list_key_tprepend(AnyValue)
list_key_tprevious(list_key_t) const
voidreset(list_key_t key)
voidreset(signed_t key)
boolreset(Value const * key)
voidrtrim()
voidset(list_key_t key, Value * value)
voidset(list_key_t key, AnyValue value)
voidset(signed_t key, Value * value)
voidset(signed_t key, Item * value)
voidset(signed_t key, char const * value)
voidset(signed_t key, unsigned_t value)
boolset(Value const * key, Value * value)
boolset(Value const * key, Item * value)
boolset(Value const * key, char const * value)
boolset(Value const * key, unsigned_t value)
voidset_float(signed_t key, float_t value)
boolset_float(Value const * key, float_t value)
boolset_once(list_key_t key, Value * value)
boolset_once(list_key_t key, AnyValue value)
boolset_once(signed_t key, Value * value)
boolset_once(signed_t key, Item * value)
boolset_once(signed_t key, char const * value)
boolset_once(signed_t key, unsigned_t value)
boolset_once(Value const * key, Value * value)
boolset_once(Value const * key, Item * value)
boolset_once(Value const * key, char const * value)
boolset_once(Value const * key, unsigned_t value)
boolset_once_float(signed_t key, float_t value)
boolset_once_float(Value const * key, float_t value)
boolset_once_signed(signed_t key, signed_t value)
boolset_once_signed(Value const * key, signed_t value)
boolset_once_symbol(signed_t key, symbol_t value)
boolset_once_symbol(Value const * key, symbol_t value)
voidset_signed(signed_t key, signed_t value)
boolset_signed(Value const * key, signed_t value)
voidset_symbol(signed_t key, symbol_t value)
boolset_symbol(Value const * key, symbol_t value)
Value *value(list_key_t) const
boolvalue(unsigned_t & result, list_key_t) const
boolvalue(signed_t & result, list_key_t) const
boolvalue_bool(list_key_t) const
intvalue_int(list_key_t) const
char const *value_string(list_key_t) const
symbol_tvalue_symbol(list_key_t) const
ListValue const *values() const

Inherited Members

From ClassC++C
Crl::address_default_user_print_file
Crl::address_default_user_print_vchar
Crl::bool_default_user_print_file
Crl::bool_default_user_print_vchar
Crl::context_default
Crl::enum_default_user_print_file
Crl::enum_default_user_print_vchar
Crl::float_default_user_print_file
Crl::float_default_user_print_vchar
Crl::get_string2symbol
Crl::get_string2symbol_default
Crl::get_user_data_delete_hook
Crl::gmt_default_user_print_file
Crl::gmt_default_user_print_vchar
Crl::identifier_default_user_print_file
Crl::identifier_default_user_print_vchar
Crl::is_c_identifier
Crl::is_initialised
Crl::is_lowcase_identifier
Crl::is_normalised_decimal
Crl::klass_id_to_crl_name
Crl::klass_id_to_name
Crl::set_handle_foreign_item
Crl::set_string2symbol
Crl::set_user_data_delete_hook
Crl::signed_default_user_print_file
Crl::signed_default_user_print_vchar
Crl::string2symbol
Crl::string_default_user_print_file
Crl::string_default_user_print_vchar
Crl::symbol_default_user_print_file
Crl::symbol_default_user_print_vchar
Crl::type_any
Crl::unsigned_default_user_print_file
Crl::unsigned_default_user_print_vchar
Object::operator delete
Object::operator new
Object::operator!=crl_value_list_is_not_equal
Object::operator<crl_value_list_is_less_than
Object::operator<=crl_value_list_is_less_equal
Object::operator==crl_value_list_is_equal
Object::operator>crl_value_list_is_greater_than
Object::operator>=crl_value_list_is_greater_equal
Object::_ref
Object::_ref_unref
Object::_unref
Object::_unref_no_delete
Object::check_sigcrl_value_list_check_sig
Value::childcrl_value_list_get_child
Object::class_idcrl_value_list_get_class_id
Object::cmpcrl_value_list_cmp
Object::cmp_shallowcrl_value_list_cmp_shallow
Object::graphcrl_value_list_get_graph_const
Object::hashcrl_value_list_hash
Object::hash_shallowcrl_value_list_hash_shallow
Object::heap_sigcrl_value_list_get_heap_sig
Value::item
Object::klass_idcrl_value_list_get_klass_id
Object::klass_namecrl_value_list_get_klass_name
Object::mapcrl_value_list_map
Object::map_subcrl_value_list_map_sub_with_data
Object::printcrl_value_list_print_vchar
Value::print_explicitcrl_value_list_print_explicit_file
Object::ref_count
Object::routinecrl_value_list_get_routine_const
Object::set_user_datacrl_value_list_set_user_data
Object::to_vcharcrl_value_list_to_vchar
Object::user_datacrl_value_list_get_user_data_const


Detailed Descriptions


#if CRL_NEED_VALUE_LIST

ListValue const * children () const

C++: CrlListValue const * CrlValueList::children () const
C: CrlListValue const * crl_value_list_get_children (crl_value_list_t const * self)

Reader of slot 'children': The list of child values.

cross reference removal is not yet implemented

This reader is NULL safe; for this == NULL, it returns NULL.

#endif


#if CRL_NEED_VALUE_LIST

[constructor] CrlValueList ()

C++: CrlValueList::CrlValueList ()
C: crl_value_list_t * crl_value_list_new (void)
#endif


#if CRL_NEED_VALUE_LIST

[constructor] CrlValueList (ValueList const &)

C++: CrlValueList::CrlValueList (CrlValueList const &)
C: crl_value_list_t * crl_value_list_new_copy (crl_value_list_t const *)
#endif


#if CRL_NEED_VALUE_LIST

void operator= (ValueList const &)

C++: void CrlValueList::operator= (CrlValueList const &)
C: void crl_value_list_assign (crl_value_list_t * self, crl_value_list_t const *)
#endif


#if CRL_NEED_VALUE_LIST

ListValue const * values () const

C++: CrlListValue const * CrlValueList::values () const
C: CrlListValue const * crl_value_list_get_values (crl_value_list_t const * self)

This function redirects execution to children().

The implementation is NULL-safe; for this == NULL, this function returns NULL.

#endif


#if CRL_NEED_VALUE_LIST

int nentries () const

C++: int CrlValueList::nentries () const
C: int crl_value_list_nentries (crl_value_list_t const * self)

limited editing:

NULL safe: if this == NULL, returns 0

#endif


#if CRL_NEED_VALUE_LIST

bool empty () const

C++: bool CrlValueList::empty () const
C: crl_bool_t crl_value_list_empty (crl_value_list_t const * self)

NULL safe: if this == NULL, returns true

#endif


#if CRL_NEED_VALUE_LIST

bool non_empty () const

C++: bool CrlValueList::non_empty () const
C: crl_bool_t crl_value_list_non_empty (crl_value_list_t const * self)

NULL safe: if this == NULL, returns false

#endif


#if CRL_NEED_VALUE_LIST

list_key_t front () const

C++: crl_list_key_t CrlValueList::front () const
C: crl_list_key_t crl_value_list_front (crl_value_list_t const * self)
#endif


#if CRL_NEED_VALUE_LIST

list_key_t back () const

C++: crl_list_key_t CrlValueList::back () const
C: crl_list_key_t crl_value_list_back (crl_value_list_t const * self)
#endif


#if CRL_NEED_VALUE_LIST

Value * first () const

C++: CrlValue * CrlValueList::first () const
C: crl_value_t * crl_value_list_first (crl_value_list_t const * self)
#endif


#if CRL_NEED_VALUE_LIST

Value * last () const

C++: CrlValue * CrlValueList::last () const
C: crl_value_t * crl_value_list_last (crl_value_list_t const * self)
#endif


#if CRL_NEED_VALUE_LIST

Value * value (list_key_t) const

C++: CrlValue * CrlValueList::value (crl_list_key_t) const
C: crl_value_t * crl_value_list_value (crl_value_list_t const * self, crl_list_key_t)

If you want to do something like value(k)->get_bool(), use value_bool(k) instead. This also holds for type-exports to int, symbol, string, unsigned_t, signed_t.

#endif


#if CRL_NEED_VALUE_LIST

bool value_bool (list_key_t) const

C++: bool CrlValueList::value_bool (crl_list_key_t) const
C: crl_bool_t crl_value_list_value_bool (crl_value_list_t const * self, crl_list_key_t)

Just to be in sync with the get(), nth() and find() methods, we'll have the usual inlined cast functions here, too.

Always preferable over value(k)->get_bool(). This does essentially the same, but potentially works for more cases. See Structure::nth() for a longer explanation.

#endif


#if CRL_NEED_VALUE_LIST

int value_int (list_key_t) const

C++: int CrlValueList::value_int (crl_list_key_t) const
C: int crl_value_list_value_int (crl_value_list_t const * self, crl_list_key_t)

Always preferable over value(k)->get_int(). This does essentially the same, but potentially works for more cases. See Structure::nth() for a longer explanation.

#endif


#if CRL_NEED_VALUE_LIST

symbol_t value_symbol (list_key_t) const

C++: crl_symbol_t CrlValueList::value_symbol (crl_list_key_t) const
C: crl_symbol_t crl_value_list_value_symbol (crl_value_list_t const * self, crl_list_key_t)

Always preferable over value(k)->get_symbol(). This does essentially the same, but potentially works for more cases. See Structure::nth() for a longer explanation.

#endif


#if CRL_NEED_VALUE_LIST

char const * value_string (list_key_t) const

C++: char const * CrlValueList::value_string (crl_list_key_t) const
C: char const * crl_value_list_value_string (crl_value_list_t const * self, crl_list_key_t)

Always preferable over value(k)->get_string(). This does essentially the same, but potentially works for more cases. See Structure::nth() for a longer explanation.

#endif


#if CRL_NEED_VALUE_LIST

bool value (unsigned_t & result, list_key_t) const

C++: bool CrlValueList::value (crl_unsigned_t & result, crl_list_key_t) const
C: crl_bool_t crl_value_list_value_unsigned (crl_unsigned_t * result, crl_value_list_t const * self, crl_list_key_t)

Always preferable over value(k)->get(x). This does essentially the same, but potentially works for more cases. See Structure::nth() for a longer explanation.

#endif


#if CRL_NEED_VALUE_LIST

bool value (signed_t & result, list_key_t) const

C++: bool CrlValueList::value (crl_signed_t & result, crl_list_key_t) const
C: crl_bool_t crl_value_list_value_signed (crl_signed_t * result, crl_value_list_t const * self, crl_list_key_t)

Always preferable over value(k)->get(x). This does essentially the same, but potentially works for more cases. See Structure::nth() for a longer explanation.

#endif


#if CRL_NEED_VALUE_LIST

list_key_t next (list_key_t) const

C++: crl_list_key_t CrlValueList::next (crl_list_key_t) const
C: crl_list_key_t crl_value_list_next (crl_value_list_t const * self, crl_list_key_t)
#endif


#if CRL_NEED_VALUE_LIST

list_key_t previous (list_key_t) const

C++: crl_list_key_t CrlValueList::previous (crl_list_key_t) const
C: crl_list_key_t crl_value_list_previous (crl_value_list_t const * self, crl_list_key_t)
#endif


#if CRL_NEED_VALUE_LIST

list_key_t prepend (Value *)

C++: crl_list_key_t CrlValueList::prepend (CrlValue *)
C: crl_list_key_t crl_value_list_prepend (crl_value_list_t * self, crl_value_t *)

list append, but returns front() for NULL

#endif


#if CRL_NEED_VALUE_LIST

list_key_t insert_before (list_key_t key, Value *)

C++: crl_list_key_t CrlValueList::insert_before (crl_list_key_t key, CrlValue *)
C: crl_list_key_t crl_value_list_insert_before (crl_value_list_t * self, crl_list_key_t key, crl_value_t *)

list append and prepend, but returns 'key' for NULL

#endif


#if CRL_NEED_VALUE_LIST

list_key_t insert_after (list_key_t nth, Value *)

C++: crl_list_key_t CrlValueList::insert_after (crl_list_key_t nth, CrlValue *)
C: crl_list_key_t crl_value_list_insert_after (crl_value_list_t * self, crl_list_key_t nth, crl_value_t *)

list append and prepend, but returns 'key' for NULL

#endif


#if CRL_NEED_VALUE_LIST

void erase (list_key_t key)

C++: void CrlValueList::erase (crl_list_key_t key)
C: void crl_value_list_erase (crl_value_list_t * self, crl_list_key_t key)
#endif


#if CRL_NEED_VALUE_LIST

void erase (list_key_t & iter, list_key_t key)

C++: void CrlValueList::erase (crl_list_key_t & iter, crl_list_key_t key)
C: void crl_value_list_erase_in_loop (crl_value_list_t * self, crl_list_key_t * iter, crl_list_key_t key)
#endif


#if CRL_NEED_VALUE_LIST

void reset (list_key_t key)

C++: void CrlValueList::reset (crl_list_key_t key)
C: void crl_value_list_reset (crl_value_list_t * self, crl_list_key_t key)
#endif


#if CRL_NEED_VALUE_LIST

bool has (list_key_t key) const

C++: bool CrlValueList::has (crl_list_key_t key) const
C: crl_bool_t crl_value_list_has (crl_value_list_t const * self, crl_list_key_t key)
#endif


#if CRL_NEED_VALUE_LIST

void set (list_key_t key, Value * value)

C++: void CrlValueList::set (crl_list_key_t key, CrlValue * value)
C: void crl_value_list_set (crl_value_list_t * self, crl_list_key_t key, crl_value_t * value)
#endif


#if CRL_NEED_VALUE_LIST

bool set_once (list_key_t key, Value * value)

C++: bool CrlValueList::set_once (crl_list_key_t key, CrlValue * value)
C: crl_bool_t crl_value_list_set_once (crl_value_list_t * self, crl_list_key_t key, crl_value_t * value)
#endif


#if CRL_NEED_VALUE_LIST

void set (list_key_t key, AnyValue value)

C++: void CrlValueList::set (crl_list_key_t key, CrlAnyValue value)
C: Not available.
#endif


#if CRL_NEED_VALUE_LIST

bool set_once (list_key_t key, AnyValue value)

C++: bool CrlValueList::set_once (crl_list_key_t key, CrlAnyValue value)
C: Not available.
#endif


#if CRL_NEED_VALUE_LIST

list_key_t append (AnyValue)

C++: crl_list_key_t CrlValueList::append (CrlAnyValue)
C: Not available.
#endif


#if CRL_NEED_VALUE_LIST

list_key_t prepend (AnyValue)

C++: crl_list_key_t CrlValueList::prepend (CrlAnyValue)
C: Not available.