PointerIntegralInstructionRegister Class Reference

Note: There cannot be a PointerIntegralPutStorage() as cbStorage, the maximum size, is always read-only. More...

#include <PointerIntegralInstruction.h>

Inheritance diagram for PointerIntegralInstructionRegister:

InstructionRegister List of all members.

Static Public Member Functions

static void registerInstructions ()

Static Private Member Functions

template<template< typename > 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

Note: There cannot be a PointerIntegralPutStorage() as cbStorage, the maximum size, is always read-only.

Definition at line 136 of file PointerIntegralInstruction.h.


Member Function Documentation

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

Definition at line 142 of file PointerIntegralInstruction.h.

00142                                                                   {
00143 
00144         for (uint i = 0; i < t.size(); i++) {
00145             StandardTypeDescriptorOrdinal type = t[i];
00146             // Type <char> below is a placeholder and is ignored.
00147             InstructionSignature sig = INSTCLASS2<char>::signature(type);
00148             switch (type) {
00149                 // Array_Text, below, does not allow assembly programs
00150                 // of to have say, pointer to int16s, but the language
00151                 // does not have pointers defined other than
00152                 // c,vc,b,vb, so this is OK for now.
00153 #define Fennel_InstructionRegisterSwitch_Array 1
00154 #include "fennel/calculator/InstructionRegisterSwitch.h"
00155             default:
00156                 throw std::logic_error("Default InstructionRegister");
00157             }
00158         }
00159     }

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

Definition at line 163 of file PointerIntegralInstruction.h.

References StandardTypeDescriptor::isArray(), and InstructionSignature::typeVector().

Referenced by InstructionFactory::registerInstructions().

00163                            {
00164         vector<StandardTypeDescriptorOrdinal> t;
00165         // isArray, below, does not allow assembly programs of to
00166         // have say, pointer to int16s, but the language does not have
00167         // pointers defined other than c,vc,b,vb, so this is OK for now.
00168         t = InstructionSignature::typeVector(StandardTypeDescriptor::isArray);
00169 
00170         // Have to do full fennel:: qualification of template
00171         // arguments below to prevent template argument 'TMPLT', of
00172         // this encapsulating class, from perverting NativeAdd into
00173         // NativeAdd<TMPLT> or something like
00174         // that. Anyway. Fennel::NativeAdd works just fine.
00175         registerTypes<fennel::PointerPutSize>(t);
00176         // Note: Cannot have PointerPutSizeMax. See comment above
00177     }

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:40 2009 for Fennel by  doxygen 1.5.1