
Public Member Functions | |
| void | addCast (const ShVariantCast *caster, bool automatic) |
| void | init () |
| int | castDist (ShValueType destValueType, ShValueType srcValueType) |
| std::ostream & | graphvizDump (std::ostream &out) const |
Adds the given statement before the statements in this block | |
| void | doCast (ShVariant *dest, const ShVariant *src) |
| Casts the contents of the src variant to dest variant Both must be previously allocated and the same size, and caller should check dest != src. | |
| bool | doAllocCast (ShVariant *&dest, ShVariant *src, ShValueType valueType, ShDataType dataType) |
| Casts src to the requested type and puts the result in dest or if no casting is necessary, or src = 0, simply makes dest = src. | |
| bool | doAllocCast (const ShVariant *&dest, const ShVariant *src, ShValueType valueType, ShDataType dataType) |
Static Public Member Functions | |
| static ShCastManager * | instance () |
Protected Types | |
|
typedef ShPairPairHashMap< ShValueType, ShDataType, ShValueType, ShDataType, const ShVariantCast * > | FirstCastMap |
|
typedef ShPairHashMap< ShValueType, ShValueType, int > | CastDistMap |
Protected Attributes | |
| ShCastMgrGraph | m_casts |
| FirstCastMap | m_castStep |
| CastDistMap | m_autoDist |
Static Protected Attributes | |
| static ShCastManager * | m_instance |
Definition at line 118 of file ShCastManager.hpp.
|
||||||||||||||||||||
|
Casts src to the requested type and puts the result in dest or if no casting is necessary, or src = 0, simply makes dest = src.
Definition at line 188 of file ShCastManager.cpp. References doCast(), SH::ShVariantFactory::generate(), SH::shVariantFactory(), SH::ShVariant::size(), and SH::ShVariant::typeMatches(). Referenced by doAllocCast(), and SH::ShEval::operator()(). |
|
||||||||||||
|
Casts the contents of the src variant to dest variant Both must be previously allocated and the same size, and caller should check dest != src. When dest, src have same type, this just becomes a data copy. Definition at line 151 of file ShCastManager.cpp. References SH::ShVariant::dataType(), SH::ShVariantCast::doCast(), SH::ShVariantFactory::generate(), SH::ShVariantCast::getDestTypes(), m_castStep, SH::shValueTypeName(), SH::shVariantFactory(), SH::ShVariant::size(), and SH::ShVariant::valueType(). Referenced by doAllocCast(), SH::ShEval::operator()(), and SH::ShDataVariant< T, DT >::set(). |
1.4.3-20050530