ExceptionComponent - you want. ..

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef COMPONENT_EXAMPLE_H #define COMPONENT_EXAMPLE_H #include "PackageBase.h" /////////////////////////////////////////////////////////////////////// // A simple combinatorial component example. // It produces on its sole output port the max of the values on its // two input ports (compared as signed ints). /////////////////////////////////////////////////////////////////////// class ExceptionComponent : public CUserDefComponentBase { public: /////////////////////////////////////////////////////////////////// // YOU MUST IMPLEMENT THE FOLLOWING IN YOUR DERIVED CLASS(ES) /////////////////////////////////////////////////////////////////// static CUserDefComponentBase* CreateObject(); ~ExceptionComponent(); void GetPortDescriptionVectors( INPORTDESC** pInputPorts, OUTPORTDESC** pOutputPorts ); HALT_STATUS ComputeOutputs(int* pInputArray, int* pOutputArray); HALT_STATUS LatchInputs(int* pInputArray); bool Reinitialize(); /////////////////////////////////////////////////////////////////// // You may also implement any other public/protected/private methods
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: you want. .. /////////////////////////////////////////////////////////////////// protected: /////////////////////////////////////////////////////////////////// // The constructor should be called only by CreateObject() /////////////////////////////////////////////////////////////////// ExceptionComponent(); private: /////////////////////////////////////////////////////////////////// // These will hold the in/out-put port type descriptions for this type /////////////////////////////////////////////////////////////////// static INPORTDESC INPORT_DESCRIPTION; static OUTPORTDESC OUTPORT_DESCRIPTION; //////////////////////////////////////////////////////////////////////// // You can also have any other public, protected, or private methods or // instance variables you want. //////////////////////////////////////////////////////////////////////// public: protected: private: void PrintMsg(const char* s); }; #endif // COMPONENT_EXAMPLE_H...
View Full Document

This note was uploaded on 10/12/2009 for the course CSE 378 taught by Professor Staff during the Spring '08 term at University of Washington.

Ask a homework question - tutors are online