MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Arith.h
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2003-2010 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 #ifndef _ARITH_H
10 #define _ARITH_H
11 
12 class Arith
13 {
14  friend void testCopyMsgOps();
15  friend void testTicks();
16 
17  public:
18  Arith();
19  void process( const Eref& e, ProcPtr p );
20  void reinit( const Eref& e, ProcPtr p );
21 
25  void addSpike( unsigned int synIndex, const double time );
26 
28  // Field assignment stuff.
30 
31  void setFunction( string v );
32  string getFunction() const;
33  void setOutput( double v );
34  double getOutput() const;
35 
36  void setIdentifiedArg( unsigned int i, double val );
37  double getIdentifiedArg( unsigned int i ) const;
38 
40  // Dest Func
42 
43  void arg1( double v );
44  void arg2( double v );
45  void arg3( double v );
46 
47  void arg1x2( double arg1, double arg2 );
48 
50  // Helper func for tests
52 
53  double getArg1() const;
55 
56  static const Cinfo* initCinfo();
57  private:
58  string function_; // String representation of operation to do.
59  double output_; // Store the output so we can examine it.
60  double arg1_; // Argument 1
61  double arg2_; // Argument 2
62  double arg3_; // Argument 2
63 };
64 
65 #endif // _ARITH_H
void setFunction(string v)
Definition: Arith.cpp:170
void reinit(const Eref &e, ProcPtr p)
Definition: Arith.cpp:138
void addSpike(unsigned int synIndex, const double time)
double getIdentifiedArg(unsigned int i) const
Definition: Arith.cpp:195
void setOutput(double v)
Definition: Arith.cpp:180
Definition: Arith.h:12
double arg1_
Definition: Arith.h:60
void arg3(double v)
Definition: Arith.cpp:157
double getOutput() const
Definition: Arith.cpp:185
double arg3_
Definition: Arith.h:62
void process(const Eref &e, ProcPtr p)
Definition: Arith.cpp:125
string function_
Definition: Arith.h:58
double arg2_
Definition: Arith.h:61
void arg1x2(double arg1, double arg2)
Definition: Arith.cpp:164
void setIdentifiedArg(unsigned int i, double val)
Definition: Arith.cpp:208
Definition: Eref.h:26
void arg2(double v)
Definition: Arith.cpp:152
double output_
Definition: Arith.h:59
Arith()
Definition: Arith.cpp:116
string getFunction() const
Definition: Arith.cpp:175
static const Cinfo * initCinfo()
Definition: Arith.cpp:22
void arg1(double v)
Definition: Arith.cpp:147
double getArg1() const
Definition: Arith.cpp:190
friend void testCopyMsgOps()
Definition: testShell.cpp:1083
friend void testTicks()
Definition: Cinfo.h:18