00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __COUTVECT_H
00021 #define __COUTVECT_H
00022
00023 #include <stdio.h>
00024 #include "cobject.h"
00025
00026
00032 typedef void (*RecordFunc)(void *, double, double);
00033
00034 class TOutVectorInspector;
00035 class TOutVectorWindow;
00036
00037
00045 class SIM_API cOutVector : public cObject
00046 {
00047 protected:
00048 bool enabled;
00049 int tuple;
00050 void *handle;
00051 long num_received;
00052 long num_stored;
00053
00054
00055 friend class TOutVectorInspector;
00056 friend class TOutVectorWindow;
00057 RecordFunc record_in_inspector;
00058 void *data_for_inspector;
00059
00060 public:
00063
00067 explicit cOutVector(const char *name=NULL, int tuple=1);
00068
00072 cOutVector(const cOutVector& r) : cObject(r) {setName(r.name());operator=(r);}
00073
00077 virtual ~cOutVector();
00078
00082 cOutVector& operator=(const cOutVector&) {copyNotSupported();return *this;}
00084
00087
00092 virtual void setName(const char *name);
00093
00098 virtual cObject *dup() const {return new cOutVector(*this);}
00099
00104 virtual void info(char *buf);
00106
00109
00118 virtual bool record(double value);
00119
00128 virtual bool record(double value1, double value2);
00129
00133 virtual void enable() {enabled=true;}
00134
00139 virtual void disable() {enabled=false;}
00140
00144 virtual bool isEnabled() {return enabled;}
00145
00151 long valuesReceived() {return num_received;}
00152
00158 long valuesStored() {return num_stored;}
00160 };
00161
00162 #endif
00163
00164