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
Inherited Members
Detailed Descriptions
[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 *)
This makes a ValueItem.
#if defined(CRL_VALUE_TO_ANY_VALUE)
[constructor] CrlAnyValue (Value * x)
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.
operator CrlValue * () const
| C++: |
CrlAnyValue::operator CrlValue * () const |
| C: |
Not available. |
Automatically casts back to Value *.
Occurrences of CrlAnyValue