XC Open source finite element analysis program
OracleDatastore.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 
28 #ifndef OracleDatastore_h
29 #define OracleDatastore_h
30 
31 // $Revision: 1.2 $
32 // $Date: 2005/11/07 21:34:25 $
33 // $Source: /usr/local/cvs/OpenSees/SRC/database/OracleDatastore.h,v $
34 
35 // Written: Jun Peng
36 //
37 // Description: This file contains the class definition for OracleDatastore.
38 // OracleDatastore is a concrete subclas of DBDatastore. A OracleDatastore
39 // object is used in the program to store/restore the geometry and state
40 // information in a model at a particular instance in the analysis. The
41 // information is stored in ORACLE8i Database.
42 //
43 // What: "@(#) OracleDatastore.h, revA"
44 
45 #include "DBDatastore.h"
46 #include <fstream>
47 
48 namespace XC {
49 class FEM_ObjectBroker;
50 
51 
53 //
55  {
56  private:
57 
58  // private attributes
59  int projTag;
60  std::string dataBase;
61 
62  int lastDomainChangeStamp;
63  public:
64  OracleDatastore(const std::string &dataBase,Preprocessor &preprocessor, FEM_ObjectBroker &theBroker);
65 
66  ~OracleDatastore(void);
67 
68  // methods to set and get a project tag
69  int getProjTag();
70  void setProjTag(int projectID);
71 
72  // method to search for project Tag
73  int searchProjTag(const std::string &projName);
74 
75  // methods defined in the Channel class interface which do nothing
76  char *addToProgram(void);
77  int setUpShadow(void);
78  int setUpActor(void);
79  int setNextAddress(const ChannelAddress &otherChannelAddress);
80  ChannelAddress *getLastSendersAddress(void);
81 
82  int commitState(int commitTag);
83 
84  // methods for sending and receiving the data
85  int sendObj(int commitTag,MovableObject &,ChannelAddress *theAddress= nullptr);
86  int recvObj(int commitTag,MovableObject &theObject, FEM_ObjectBroker &,ChannelAddress *theAddress= nullptr);
87 
88  int sendMsg(int dbTag, int commitTag,const Message &,ChannelAddress *theAddress= nullptr);
89  int recvMsg(int dbTag, int commitTag,Message &,ChannelAddress *theAddress= nullptr);
90 
91  int sendMatrix(int dbTag, int commitTag,const Matrix &,ChannelAddress *theAddress= nullptr);
92  int recvMatrix(int dbTag, int commitTag,Matrix &,ChannelAddress *theAddress= nullptr);
93 
94  int sendVector(int dbTag, int commitTag,const Vector &, ChannelAddress *theAddress= nullptr);
95  int recvVector(int dbTag, int commitTag,Vector &,ChannelAddress *theAddress= nullptr);
96 
97  int sendID(int dbTag, int commitTag, const ID &, ChannelAddress *theAddress= nullptr);
98  int recvID(int dbTag, int commitTag, ID &theID, ChannelAddress *theAddress= nullptr);
99  };
100 } // end of XC namespace
101 
102 
103 #endif
104 
Definition: Vector.h:82
Definition: OracleDatastore.h:54
FEM_ObjectBroker is is an object broker class for the finite element method. All methods are virtual ...
Definition: FEM_ObjectBroker.h:138
Definition: ChannelAddress.h:69
Object that can move between processes.
Definition: MovableObject.h:91
Finite element model generation tools.
Definition: Preprocessor.h:58
Definition: ID.h:77
Definition: Matrix.h:82
int commitState(int commitTag)
Salva el estado en la database.
Definition: OracleDatastore.cpp:153
Message between processes.
Definition: Message.h:67
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: DBDatastore.h:38