#include <CastInstruction.h>
Inheritance diagram for CastInstructionRegister:
Static Public Member Functions | |
static void | registerInstructions () |
Static Private Member Functions | |
template<template< typename, typename > class INSTCLASS2> | |
static void | registerTypes (vector< StandardTypeDescriptorOrdinal > const &t1, vector< StandardTypeDescriptorOrdinal > const &t2) |
template<typename TYPE1, template< typename > class INSTCLASS> | |
static void | registerInstance (StandardTypeDescriptorOrdinal type) |
template<typename IGNOREDDATATYPE, class INSTCLASS> | |
static void | registerInstance (StandardTypeDescriptorOrdinal type) |
template<typename TYPE1, typename TYPE2, template< typename, typename > class INSTCLASS> | |
static void | registerInstance2 (StandardTypeDescriptorOrdinal type1, StandardTypeDescriptorOrdinal type2) |
Definition at line 190 of file CastInstruction.h.
static void CastInstructionRegister::registerTypes | ( | vector< StandardTypeDescriptorOrdinal > const & | t1, | |
vector< StandardTypeDescriptorOrdinal > const & | t2 | |||
) | [inline, static, private] |
Definition at line 196 of file CastInstruction.h.
00199 { 00200 for (uint i = 0; i < t1.size(); i++) { 00201 for (uint j = 0; j < t2.size(); j++) { 00202 StandardTypeDescriptorOrdinal type1 = t1[i]; 00203 StandardTypeDescriptorOrdinal type2 = t2[j]; 00204 // Types <char,char> below is a placeholder and is ignored. 00205 InstructionSignature sig = 00206 INSTCLASS2<char, char>::signature(type1, type2); 00207 #include "fennel/calculator/InstructionRegisterSwitchCast.h" 00208 // Note: Above .h includes a throw std::logic_error if 00209 // type combination cannot be found. 00210 } 00211 } 00212 }
static void CastInstructionRegister::registerInstructions | ( | ) | [inline, static] |
Definition at line 216 of file CastInstruction.h.
References StandardTypeDescriptor::isNativeNotBool(), and InstructionSignature::typeVector().
Referenced by InstructionFactory::registerInstructions().
00216 { 00217 vector<StandardTypeDescriptorOrdinal> t; 00218 t = InstructionSignature::typeVector 00219 (StandardTypeDescriptor::isNativeNotBool); 00220 00221 // Have to do full fennel:: qualification of template 00222 // arguments below to prevent template argument 'TMPLT', of 00223 // this encapsulating class, from perverting NativeAdd into 00224 // NativeAdd<TMPLT> or something like 00225 // that. Anyway. Fennel::NativeAdd works just fine. 00226 registerTypes<fennel::CastCast>(t, t); 00227 }
static void InstructionRegister::registerInstance | ( | StandardTypeDescriptorOrdinal | type | ) | [inline, static, protected, inherited] |
Definition at line 139 of file Instruction.h.
References InstructionFactory::getInstructionTable().
Referenced by ReturnInstructionRegister::registerInstructions().
00140 { 00141 StringToCreateFn* instMap = InstructionFactory::getInstructionTable(); 00142 (*instMap)[INSTCLASS<TYPE1>::signature(type).compute()] = 00143 &INSTCLASS<TYPE1>::create; 00144 }
static void InstructionRegister::registerInstance | ( | StandardTypeDescriptorOrdinal | type | ) | [inline, static, protected, inherited] |
Definition at line 161 of file Instruction.h.
References InstructionFactory::getInstructionTable().
00162 { 00163 StringToCreateFn* instMap = InstructionFactory::getInstructionTable(); 00164 (*instMap)[INSTCLASS::signature(type).compute()] = 00165 &INSTCLASS::create; 00166 }
static void InstructionRegister::registerInstance2 | ( | StandardTypeDescriptorOrdinal | type1, | |
StandardTypeDescriptorOrdinal | type2 | |||
) | [inline, static, protected, inherited] |
Definition at line 150 of file Instruction.h.
References InstructionFactory::getInstructionTable().
00153 { 00154 StringToCreateFn* instMap = InstructionFactory::getInstructionTable(); 00155 (*instMap)[INSTCLASS<TYPE1,TYPE2>::signature(type1, type2).compute()] = 00156 &INSTCLASS<TYPE1,TYPE2>::create; 00157 }