NEESData.h

Go 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.3 $
00022 // $Date: 2006/01/10 18:16:20 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/database/NEESData.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef NeesData_h
00027 #define NeesData_h
00028 
00029 // Written: fmk 
00030 // Created: 03/04
00031 //
00032 // Description: This file contains the class definition for NeesData.
00033 // NeesData is a concretes subclass of FE_Datastore. NEESData datastore
00034 // is used to store data from the recorders in a file format that can
00035 // be stored in the NEES data repository.
00036 //
00037 // What: "@(#) NeesData.h, revA"
00038 
00039 #include <FE_Datastore.h>
00040 
00041 #include <fstream>
00042 using std::fstream;
00043 
00044 #include <bool.h>
00045 
00046 class NEES_table
00047 {
00048  public:
00049   char     *name;
00050   char    **columns;
00051   int       numColumns;
00052   NEES_table    *next;
00053   bool      hasOutExtension;
00054 };
00055 
00056 class FEM_ObjectBroker;
00057 
00058 class NEESData: public FE_Datastore
00059 {
00060   public:
00069     NEESData(const char *dataBase,
00070              Domain &theDomain, 
00071              FEM_ObjectBroker &theBroker);    
00072     
00073     ~NEESData();
00074 
00075     // method to get a database tag
00076     int getDbTag(void);
00077 
00078     // methods for sending and receiving the data
00079     int sendMsg(int dbTag, int commitTag, 
00080                 const Message &, 
00081                 ChannelAddress *theAddress =0);    
00082     int recvMsg(int dbTag, int commitTag, 
00083                 Message &, 
00084                 ChannelAddress *theAddress =0);        
00085 
00086     int sendMatrix(int dbTag, int commitTag, 
00087                    const Matrix &theMatrix, 
00088                    ChannelAddress *theAddress =0);
00089     int recvMatrix(int dbTag, int commitTag, 
00090                    Matrix &theMatrix, 
00091                    ChannelAddress *theAddress =0);
00092     
00093     int sendVector(int dbTag, int commitTag, 
00094                    const Vector &theVector, 
00095                    ChannelAddress *theAddress =0);
00096     int recvVector(int dbTag, int commitTag, 
00097                    Vector &theVector, 
00098                    ChannelAddress *theAddress =0);
00099     
00100     int sendID(int dbTag, int commitTag,
00101                const ID &theID,
00102                ChannelAddress *theAddress =0);
00103     int recvID(int dbTag, int commitTag,
00104                ID &theID,
00105                ChannelAddress *theAddress =0);
00106 
00107     int createTable(const char *tableName, int numColumns, char *columns[]);
00108     int insertData(const char *tableName, char *columns[], 
00109                    int commitTag, const Vector &data);
00110 
00111     int getData(const char *tableName, char *columns[], int commitTag, Vector &data);
00112 
00113     // the commitState method
00114     int commitState(int commitTag);        
00115     
00116   protected:
00117 
00118   private:
00119     char         *dataBase;
00120     NEES_table    *tables;
00121     int          numTables;
00122 };
00123 
00124 
00125 
00126 #endif
00127 

Generated on Mon Oct 23 15:05:00 2006 for OpenSees by doxygen 1.5.0