InstructionRegister Class Reference

Provide a method to register Instruction objects into the Instruction Factory. More...

#include <Instruction.h>

Inheritance diagram for InstructionRegister:

BoolInstructionRegister BoolNativeInstructionRegister BoolPointerInstructionRegister CastInstructionRegister IntegralNativeInstructionRegister IntegralPointerInstructionRegister JumpInstructionRegister NativeNativeInstructionRegister PointerIntegralInstructionRegister PointerPointerInstructionRegister ReturnInstructionRegister List of all members.

Static Protected Member Functions

template<typename TYPE1, template< typename > class INSTCLASS>
static void registerInstance (StandardTypeDescriptorOrdinal type)
template<typename TYPE1, typename TYPE2, template< typename, typename > class INSTCLASS>
static void registerInstance2 (StandardTypeDescriptorOrdinal type1, StandardTypeDescriptorOrdinal type2)
template<typename IGNOREDDATATYPE, class INSTCLASS>
static void registerInstance (StandardTypeDescriptorOrdinal type)

Detailed Description

Provide a method to register Instruction objects into the Instruction Factory.

Each leaf in the object tree subclasses InstructionRegister and calls types for each Instruction.

Definition at line 133 of file Instruction.h.


Member Function Documentation

template<typename TYPE1, template< typename > class INSTCLASS>
static void InstructionRegister::registerInstance ( StandardTypeDescriptorOrdinal  type  )  [inline, static, protected]

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 TYPE1, typename TYPE2, template< typename, typename > class INSTCLASS>
static void InstructionRegister::registerInstance2 ( StandardTypeDescriptorOrdinal  type1,
StandardTypeDescriptorOrdinal  type2 
) [inline, static, protected]

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     }

template<typename IGNOREDDATATYPE, class INSTCLASS>
static void InstructionRegister::registerInstance ( StandardTypeDescriptorOrdinal  type  )  [inline, static, protected]

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     }


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