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 _StandardStream
00026 #define _StandardStream
00027
00028 #include <OPS_Stream.h>
00029
00030 #include <fstream>
00031 using std::ofstream;
00032
00033 class StandardStream : public OPS_Stream
00034 {
00035 public:
00036 StandardStream(int indentSize=2);
00037 ~StandardStream();
00038
00039 int setFile(const char *fileName, openMode mode = OVERWRITE);
00040 int setPrecision(int precision);
00041 int setFloatField(floatField);
00042 int precision(int precision) {return 0;};
00043 int width(int width) {return 0;};
00044
00045
00046 int tag(const char *);
00047 int tag(const char *, const char *);
00048 int endTag();
00049 int attr(const char *name, int value);
00050 int attr(const char *name, double value);
00051 int attr(const char *name, const char *value);
00052 int write(Vector &data);
00053
00054
00055 OPS_Stream& write(const char *s, int n);
00056 OPS_Stream& write(const unsigned char *s, int n);
00057 OPS_Stream& write(const signed char *s, int n);
00058 OPS_Stream& write(const void *s, int n);
00059 OPS_Stream& operator<<(char c);
00060 OPS_Stream& operator<<(unsigned char c);
00061 OPS_Stream& operator<<(signed char c);
00062 OPS_Stream& operator<<(const char *s);
00063 OPS_Stream& operator<<(const unsigned char *s);
00064 OPS_Stream& operator<<(const signed char *s);
00065 OPS_Stream& operator<<(const void *p);
00066 OPS_Stream& operator<<(int n);
00067 OPS_Stream& operator<<(unsigned int n);
00068 OPS_Stream& operator<<(long n);
00069 OPS_Stream& operator<<(unsigned long n);
00070 OPS_Stream& operator<<(short n);
00071 OPS_Stream& operator<<(unsigned short n);
00072 OPS_Stream& operator<<(bool b);
00073 OPS_Stream& operator<<(double n);
00074 OPS_Stream& operator<<(float n);
00075
00076 int sendSelf(int commitTag, Channel &theChannel);
00077 int recvSelf(int commitTag, Channel &theChannel,
00078 FEM_ObjectBroker &theBroker);
00079
00080 private:
00081 ofstream theFile;
00082 int fileOpen;
00083
00084 void indent(void);
00085 int indentSize;
00086 int numIndent;
00087 char *indentString;
00088 };
00089
00090 #endif