00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __COUTVECT_H
00014 #define __COUTVECT_H
00015
00016 #include <stdio.h>
00017 #include "cobject.h"
00018
00019
00025 typedef void (*RecordFunc)(void *, double, double);
00026
00027 class TOutVectorInspector;
00028 class TOutVectorWindow;
00029
00030
00038 class SIM_API cOutVector : public cObject
00039 {
00040 protected:
00041 bool enabled;
00042 int tuple;
00043 void *handle;
00044 long num_received;
00045 long num_stored;
00046
00047
00048 friend class TOutVectorInspector;
00049 friend class TOutVectorWindow;
00050 RecordFunc record_in_inspector;
00051 void *data_for_inspector;
00052
00053 public:
00056
00060 explicit cOutVector(const char *name=NULL, int tuple=1);
00061
00065 cOutVector(const cOutVector& r) : cObject(r) {setName(r.name());operator=(r);}
00066
00070 virtual ~cOutVector();
00071
00075 cOutVector& operator=(const cOutVector&) {copyNotSupported();return *this;}
00077
00080
00085 virtual void setName(const char *name);
00086
00090 virtual const char *className() const {return "cOutVector";}
00091
00096 virtual cObject *dup() const {return new cOutVector(*this);}
00097
00102 virtual void info(char *buf);
00103
00108 virtual const char *inspectorFactoryName() const {return "cOutVectorIFC";}
00110
00113
00122 virtual bool record(double value);
00123
00132 virtual bool record(double value1, double value2);
00133
00137 virtual void enable() {enabled=true;}
00138
00143 virtual void disable() {enabled=false;}
00144
00148 virtual bool isEnabled() {return enabled;}
00149
00155 long valuesReceived() {return num_received;}
00156
00162 long valuesStored() {return num_stored;}
00164 };
00165
00166 #endif
00167
00168