MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Adaptor.h
Go to the documentation of this file.
1 #ifndef _Adaptor_h
2 #define _Adaptor_h
3 
4 /**********************************************************************
5 ** This program is part of 'MOOSE', the
6 ** Messaging Object Oriented Simulation Environment.
7 ** Copyright (C) 2003-2007 Upinder S. Bhalla. and NCBS
8 ** It is made available under the terms of the
9 ** GNU Lesser General Public License version 2.1
10 ** See the file COPYING.LIB for the full notice.
11 **********************************************************************/
12 
130 class Adaptor
131 {
132  public:
133  Adaptor();
134 
136  // Here are the interface functions for the MOOSE class
138  void setInputOffset( double offset );
139  double getInputOffset() const;
140  void setOutputOffset( double offset );
141  double getOutputOffset() const;
142  void setScale( double scale );
143  double getScale() const;
144  double getOutput() const;
145 
147  // Here are the Destination functions
149  void input( double val );
150  // void handleBufInput( PrepackedBuffer pb );
151  void innerProcess();
152  void process( const Eref& e, ProcPtr p );
153  void reinit( const Eref& e, ProcPtr p );
154  /*
155  static void setup( const Eref& e, const Qinfo* q,
156  string molName, double scale,
157  double inputOffset, double outputOffset );
158  static void build( const Eref& e, const Qinfo* q);
159  */
160 
162  static const Cinfo* initCinfo();
163 
164  private:
165  double output_;
166  double inputOffset_;
168  double scale_;
169  string molName_;
170  double sum_;
171  unsigned int counter_;
172 
174  unsigned int numRequestOut_;
175 };
176 
177 #endif // _Adaptor_h
Adaptor()
Definition: Adaptor.cpp:293
unsigned int numRequestOut_
Counts number of inputs received.
Definition: Adaptor.h:174
void reinit(const Eref &e, ProcPtr p)
Definition: Adaptor.cpp:382
double inputOffset_
Definition: Adaptor.h:166
static const Cinfo * initCinfo()
Definition: Adaptor.cpp:59
void innerProcess()
Definition: Adaptor.cpp:354
double getOutputOffset() const
Definition: Adaptor.cpp:323
double getInputOffset() const
Definition: Adaptor.cpp:314
void setInputOffset(double offset)
Definition: Adaptor.cpp:310
void setScale(double scale)
Definition: Adaptor.cpp:328
void setOutputOffset(double offset)
Definition: Adaptor.cpp:319
double getScale() const
Definition: Adaptor.cpp:332
double sum_
Used for placeholding in cellreader mode.
Definition: Adaptor.h:170
double outputOffset_
Definition: Adaptor.h:167
double scale_
Definition: Adaptor.h:168
unsigned int counter_
Definition: Adaptor.h:171
double getOutput() const
Definition: Adaptor.cpp:337
Definition: Eref.h:26
string molName_
Definition: Adaptor.h:169
void process(const Eref &e, ProcPtr p)
Definition: Adaptor.cpp:366
void input(double val)
Definition: Adaptor.cpp:347
Definition: Cinfo.h:18
double output_
Definition: Adaptor.h:165