<< Deletable
 Top   Types   Functions   Classes   Index 
Structure >>

struct CrlAnyValue / crl_any_value_t

Concrete Class


Description

A factory for Values just like AnyUserData for UserData. This class enables on-the-fly conversion from many types to Value *.

Note

We could make this CRL_REF() and CRL_UNREF() the value automatically, but this function is meant to be a converter only, so we don't do that to keep the code small.

Kinship

Immediate super class: Crl

Members

CrlAnyValue(char const *)
CrlAnyValue(unsigned_t)
CrlAnyValue(Item *)
CrlAnyValue(Value * x)
operator CrlValue *() const
CrlValue *value

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::init
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


Detailed Descriptions


CrlValue * value

C++: CrlValue * CrlAnyValue::value
C: Not available.


[constructor] CrlAnyValue (char const *)

C++: CrlAnyValue::CrlAnyValue (char const *)
C: Not available.

This invokes string2symbol() and then creates a ValueSymbol.


[constructor] CrlAnyValue (unsigned_t)

C++: CrlAnyValue::CrlAnyValue (crl_unsigned_t)
C: Not available.

This generates unsigned values (ValueUnsigned).

For any other numeric type, use the proper constructor (e.g. for ValueSigned, ValueFloat, ValueRange, etc.). If we provided more numerical type constructors, we would get ambiguous overloads and too much automatism in general leading to bugs you would not see easily, so the only integer typed constructor is this one.


[constructor] CrlAnyValue (Item *)

C++: CrlAnyValue::CrlAnyValue (CrlItem *)
C: Not available.

This makes a ValueItem.


#if defined(CRL_VALUE_TO_ANY_VALUE)

[constructor] CrlAnyValue (Value * x)

C++: CrlAnyValue::CrlAnyValue (CrlValue * x)
C: Not available.

This would make it feasible to let all functions that take a Value use AnyValue instead for their parameters. However, since such functions are not callable from C, all functions accepting Values have both types of functions anyway.

Also, broken C++ compilers might get ambiguous overloads.

#endif


operator CrlValue * () const

C++: CrlAnyValue::operator CrlValue * () const
C: Not available.

Automatically casts back to Value *.


Occurrences of CrlAnyValue

CrlAnyValue::CrlAnyValue(char const *)
CrlAnyValue::CrlAnyValue(unsigned_t)
CrlAnyValue::CrlAnyValue(Item *)
CrlAnyValue::CrlAnyValue(Value * x)
ValueNumeric *CrlValueNumeric::add(AnyValue) const
list_key_tCrlValueList::append(AnyValue)
voidCrlValueCompound::insert(crl_signed_t i, AnyValue v)
list_key_tCrlValueList::insert_after(list_key_t nth, AnyValue)
list_key_tCrlValueList::insert_before(list_key_t nth, AnyValue)
list_key_tCrlValueList::prepend(AnyValue)
voidCrlValueList::set(list_key_t key, AnyValue value)
boolCrlValueRange::set_maximum(AnyValue)
boolCrlValueRange::set_minimum(AnyValue)
boolCrlValueList::set_once(list_key_t key, AnyValue value)
ValueNumeric *CrlValueNumeric::sub(AnyValue) const


Generated by erwin-cgen © AbsInt Angewandte Informatik GmbH