FE_Datastore.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.8 $
00022 // $Date: 2005/11/08 00:04:32 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/database/FE_Datastore.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef FE_Datastore_h
00027 #define FE_Datastore_h
00028 
00029 // File: ~/database/FE_Datastore.h
00030 //
00031 // Written: fmk 
00032 // Created: 10/98
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for FE_Datastore.
00036 // FE_Datastore is an abstract base class. An FE_datastore object is used
00037 // in the program to store/restore the geometry and state information in
00038 // a domain at a particular instance in the analysis.
00039 //
00040 // What: "@(#) FE_Datastore.h, revA"
00041 
00042 #include <Channel.h>
00043 
00044 class Domain;
00045 class FEM_ObjectBroker;
00046 
00047 class FE_Datastore: public Channel
00048 {
00049   public:
00050     FE_Datastore(Domain &theDomain, FEM_ObjectBroker &theBroker);    
00051     virtual ~FE_Datastore();
00052 
00053     // methods defined in the Channel class interface which mean nothing for a Datastore
00054     char *addToProgram(void);
00055     int setUpConnection(void);
00056     int setNextAddress(const ChannelAddress &otherChannelAddress);
00057     ChannelAddress *getLastSendersAddress(void);
00058 
00059     // methods defined in the Channel class interface which can be implemented here    
00060     int sendObj(int commitTag,
00061                 MovableObject &theObject, 
00062                 ChannelAddress *theAddress =0);
00063 
00064     int recvObj(int commitTag,
00065                 MovableObject &theObject, 
00066                 FEM_ObjectBroker &theBroker,
00067                 ChannelAddress *theAddress =0);
00068                 
00069     // pure virtual functions in addition to those defined
00070     // in the ModelBuilder and Channel classes for database applications
00071         int getDbTag(void);
00072     virtual int isDatastore(void);
00073 
00074     virtual int commitState(int commitTag);    
00075     virtual int restoreState(int commitTag);        
00076 
00077     virtual int createTable(const char *tableName, int numColumns, char *columns[]);
00078     virtual int insertData(const char *tableName, char *columns[], 
00079                            int commitTag, const Vector &data);
00080     virtual int getData(const char *tableName, char *columns[], 
00081                         int commitTag, Vector &data);
00082                         
00083   protected:
00084     FEM_ObjectBroker *getObjectBroker(void);
00085     
00086   private:
00087     FEM_ObjectBroker *theObjectBroker;
00088     Domain *theDomain;
00089     static int lastDbTag;
00090 
00091 };
00092 
00093 
00094 #endif
00095 

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