BoolInstructionRegister Class Reference

#include <BoolInstruction.h>

Inheritance diagram for BoolInstructionRegister:

InstructionRegister List of all members.

Static Public Member Functions

static void registerInstructions ()

Static Private Member Functions

template<class INSTCLASS2>
static void registerTypes (vector< StandardTypeDescriptorOrdinal > const &t)
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)

Detailed Description

Definition at line 911 of file BoolInstruction.h.


Member Function Documentation

template<class INSTCLASS2>
static void BoolInstructionRegister::registerTypes ( vector< StandardTypeDescriptorOrdinal > const &  t  )  [inline, static, private]

Definition at line 917 of file BoolInstruction.h.

00918     {
00919         for (uint i = 0; i < t.size(); i++) {
00920             StandardTypeDescriptorOrdinal type = t[i];
00921             InstructionSignature sig = INSTCLASS2::signature(type);
00922             switch (type) {
00923 #define Fennel_InstructionRegisterSwitch_Bool 1
00924 #include "fennel/calculator/InstructionRegisterSwitch.h"
00925             default:
00926                 throw std::logic_error("Default InstructionRegister");
00927             }
00928         }
00929     }

static void BoolInstructionRegister::registerInstructions (  )  [inline, static]

Definition at line 933 of file BoolInstruction.h.

References STANDARD_TYPE_BOOL.

Referenced by InstructionFactory::registerInstructions().

00934     {
00935         vector<StandardTypeDescriptorOrdinal> t;
00936         t.push_back(STANDARD_TYPE_BOOL);
00937 
00938         // Have to do full fennel:: qualification of template
00939         // arguments below to prevent template argument 'TMPLT', of
00940         // this encapsulating class, from perverting NativeAdd into
00941         // NativeAdd<TMPLT> or something like
00942         // that. Anyway. Fennel::NativeAdd works just fine.
00943         registerTypes<fennel::BoolOr>(t);
00944         registerTypes<fennel::BoolAnd>(t);
00945         registerTypes<fennel::BoolNot>(t);
00946         registerTypes<fennel::BoolMove>(t);
00947         registerTypes<fennel::BoolRef>(t);
00948         registerTypes<fennel::BoolIs>(t);
00949         registerTypes<fennel::BoolIsNot>(t);
00950         registerTypes<fennel::BoolEqual>(t);
00951         registerTypes<fennel::BoolNotEqual>(t);
00952         registerTypes<fennel::BoolGreater>(t);
00953         registerTypes<fennel::BoolGreaterEqual>(t);
00954         registerTypes<fennel::BoolLess>(t);
00955         registerTypes<fennel::BoolLessEqual>(t);
00956         registerTypes<fennel::BoolIsNull>(t);
00957         registerTypes<fennel::BoolIsNotNull>(t);
00958         registerTypes<fennel::BoolToNull>(t);
00959     }

template<typename TYPE1, template< typename > class INSTCLASS>
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     }

template<typename IGNOREDDATATYPE, class INSTCLASS>
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     }

template<typename TYPE1, typename TYPE2, template< typename, typename > class INSTCLASS>
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     }


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 04:00:24 2009 for Fennel by  doxygen 1.5.1