DatabaseStream.hGo to the documentation of this file.00001 /* ****************************************************************** ** 00002 ** OpenSees - Open System for Earthquake Engineering Simulation ** 00003 ** Pacific Earthquake Engineering Research Center ** 00004 ** ** 00005 ** ** 00006 ** (C) Copyright 1999, The Regents of the University of California ** 00007 ** All Rights Reserved. ** 00008 ** ** 00009 ** Commercial use of this program without express permission of the ** 00010 ** University of California, Berkeley, is strictly prohibited. See ** 00011 ** file 'COPYRIGHT' in main directory for information on usage and ** 00012 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** 00013 ** ** 00014 ** Developed by: ** 00015 ** Frank McKenna (fmckenna@ce.berkeley.edu) ** 00016 ** Gregory L. Fenves (fenves@ce.berkeley.edu) ** 00017 ** Filip C. Filippou (filippou@ce.berkeley.edu) ** 00018 ** ** 00019 ** ****************************************************************** */ 00020 00021 // $Revision: 1.1 $ 00022 // $Date: 2006/08/03 23:28:34 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/handler/DatabaseStream.h,v $ 00024 00025 #ifndef _DatabaseStream 00026 #define _DatabaseStream 00027 00028 #include <OPS_Stream.h> 00029 class FE_Datastore; 00030 00031 class DatabaseStream : public OPS_Stream 00032 { 00033 public: 00034 DatabaseStream(FE_Datastore *database =0, const char *tableName =0); 00035 ~DatabaseStream(); 00036 00037 // xml stuff 00038 int tag(const char *); 00039 int tag(const char *, const char *); 00040 int endTag(); 00041 int attr(const char *name, int value); 00042 int attr(const char *name, double value); 00043 int attr(const char *name, const char *value); 00044 int write(Vector &data); 00045 00046 // regular stuff 00047 OPS_Stream& operator<<(char c) ; 00048 OPS_Stream& operator<<(unsigned char c) ; 00049 OPS_Stream& operator<<(signed char c) ; 00050 OPS_Stream& operator<<(const char *s) ; 00051 OPS_Stream& operator<<(const unsigned char *s) ; 00052 OPS_Stream& operator<<(const signed char *s) ; 00053 OPS_Stream& operator<<(const void *p) ; 00054 OPS_Stream& operator<<(int n) ; 00055 OPS_Stream& operator<<(unsigned int n) ; 00056 OPS_Stream& operator<<(long n) ; 00057 OPS_Stream& operator<<(unsigned long n) ; 00058 OPS_Stream& operator<<(short n) ; 00059 OPS_Stream& operator<<(unsigned short n) ; 00060 OPS_Stream& operator<<(bool b) ; 00061 OPS_Stream& operator<<(double n) ; 00062 OPS_Stream& operator<<(float n) ; 00063 00064 int setDatabase(FE_Datastore &theDatabase, const char *tableName); 00065 00066 int sendSelf(int commitTag, Channel &theChannel); 00067 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker); 00068 00069 private: 00070 int open(void); 00071 00072 FE_Datastore *theDatabase; 00073 char *tableName; 00074 00075 int numColumns; 00076 char **columns; 00077 int commitTag; 00078 00079 bool descriptionDone; 00080 }; 00081 00082 #endif |