00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _OPS_Stream
00026 #define _OPS_Stream
00027
00028 #include <MovableObject.h>
00029 enum openMode {OVERWRITE, APPEND};
00030 enum floatField {FIXEDD, SCIENTIFIC};
00031 class Vector;
00032
00033
00034 class OPS_Stream: public MovableObject
00035 {
00036 public:
00037 OPS_Stream(int classTag);
00038 virtual ~OPS_Stream();
00039
00040 virtual int setFile(const char *fileName, openMode mode = OVERWRITE) {return 0;};
00041 virtual int setPrecision(int precision) {return 0;};
00042 virtual int setFloatField(floatField) {return 0;};
00043 virtual int precision(int precision) {return 0;};
00044 virtual int width(int width) {return 0;};
00045
00046
00047 virtual int tag(const char *) =0;
00048 virtual int tag(const char *, const char *) =0;
00049 virtual int endTag() =0;
00050 virtual int attr(const char *name, int value) =0;
00051 virtual int attr(const char *name, double value) =0;
00052 virtual int attr(const char *name, const char *value) =0;
00053 virtual int write(Vector &data) =0;
00054
00055
00056 virtual OPS_Stream& write(const char *s, int n) {return *this;};
00057 virtual OPS_Stream& write(const unsigned char *s, int n) {return *this;};
00058 virtual OPS_Stream& write(const signed char *s, int n) {return *this;};
00059 virtual OPS_Stream& write(const void *s, int n) {return *this;};
00060
00061 virtual OPS_Stream& operator<<(char c) {return *this;};
00062 virtual OPS_Stream& operator<<(unsigned char c) {return *this;};
00063 virtual OPS_Stream& operator<<(signed char c) {return *this;};
00064 virtual OPS_Stream& operator<<(const char *s) {return *this;};
00065 virtual OPS_Stream& operator<<(const unsigned char *s) {return *this;};
00066 virtual OPS_Stream& operator<<(const signed char *s) {return *this;};
00067 virtual OPS_Stream& operator<<(const void *p) {return *this;};
00068 virtual OPS_Stream& operator<<(int n) {return *this;};
00069 virtual OPS_Stream& operator<<(unsigned int n) {return *this;};
00070 virtual OPS_Stream& operator<<(long n) {return *this;};
00071 virtual OPS_Stream& operator<<(unsigned long n) {return *this;};
00072 virtual OPS_Stream& operator<<(short n) {return *this;};
00073 virtual OPS_Stream& operator<<(unsigned short n) {return *this;};
00074 virtual OPS_Stream& operator<<(bool b) {return *this;};
00075 virtual OPS_Stream& operator<<(double n) {return *this;};
00076 virtual OPS_Stream& operator<<(float n) {return *this;};
00077
00078 int sendSelf(int commitTag, Channel &theChannel) =0;
00079 int recvSelf(int commitTag, Channel &theChannel,
00080 FEM_ObjectBroker &theBroker) =0;
00081
00082
00083 private:
00084
00085 void indent(void);
00086 int numIndent;
00087 char *indentString;
00088 };
00089
00090 #endif