xc
|
Base class for objects that store/restore model information. More...
#include <FE_Datastore.h>
Public Member Functions | |
FE_Datastore (const std::string &, Preprocessor &, FEM_ObjectBroker &theBroker) | |
Constructor. More... | |
std::string | addToProgram (void) |
Return \(nullptr\). | |
int | setUpConnection (void) |
int | setNextAddress (const ChannelAddress &otherChannelAddress) |
Return \(0\). | |
ChannelAddress * | getLastSendersAddress (void) |
Return \(nullptr\). | |
int | sendObj (int commitTag, MovableObject &theObject, ChannelAddress *theAddress=0) |
Call {sendSelf(commitTag, *this, theBroker)} on theObject and return the result. More... | |
int | recvObj (int commitTag, MovableObject &theObject, FEM_ObjectBroker &theBroker, ChannelAddress *theAddress=0) |
Call {recvSelf(commitTag, *this, theBroker)} on theObject and return the result. More... | |
int | getDbTag (void) const |
To return a unique integer identifier at each call. More... | |
virtual const std::string & | getName (void) const |
Returns the name passed as argument to the constructor. | |
virtual std::string | getTypeId (void) const |
virtual bool | isDatastore (void) const |
Return true (this channel type IS a Datastore). | |
virtual int | commitState (int commitTag) |
Stores the current state on the database. More... | |
virtual int | restoreState (int commitTag) |
Invoked to restore the state of the domain from a database. More... | |
bool | isSaved (int commitTag) const |
Returns true if the state identified by commitTag was previously saved on the database. More... | |
virtual int | createTable (const std::string &tableName, const std::vector< std::string > &) |
virtual int | insertData (const std::string &tableName, const std::vector< std::string > &, int commitTag, const Vector &data) |
virtual int | getData (const std::string &tableName, const std::vector< std::string > &, int commitTag, Vector &data) |
virtual int | save (const int &commitTag) |
virtual int | restore (const int &commitTag) |
![]() | |
Channel (CommandEntity *owr=nullptr) | |
Constructor. | |
bool | checkDbTag (const int &dbTag) |
Check if a dbTag is already used. | |
const ID & | getUsedTags (void) const |
Return the list of dbTags already used. | |
void | clearDbTags (void) |
Reset used database tags set. | |
int | getTag (void) const |
Return the object tag. | |
template<class inputIterator > | |
int | sendObjs (int commitTag, const inputIterator &first, const inputIterator &last, ChannelAddress *theAddress=nullptr) |
Send the objects on interval [first,last). | |
template<class inputIterator > | |
int | recvObjs (int commitTag, const inputIterator &first, const inputIterator &last, FEM_ObjectBroker &, ChannelAddress *theAddress=nullptr) |
Receive an object sequence. | |
virtual int | sendMsg (int dbTag, int commitTag, const Message &theMsg, ChannelAddress *theAddress=nullptr)=0 |
A method invoked to send the data in the Message object theMsg to another Channel object. More... | |
virtual int | recvMsg (int dbTag, int commitTag, Message &theMsg, ChannelAddress *theAddress=nullptr)=0 |
Invoked to send the data in the Message object theMsg to another Channel object. More... | |
virtual int | sendMatrix (int dbTag, int commitTag, const Matrix &theMatrix, ChannelAddress *theAddress=nullptr)=0 |
Invoked to receive the data in the Matrix object theMatrix to another Channel object. More... | |
virtual int | recvMatrix (int dbTag, int commitTag, Matrix &theMatrix, ChannelAddress *theAddress=nullptr)=0 |
Invoked to receive the data in the Matrix object theMatrix to another Channel object. More... | |
virtual int | sendVector (int dbTag, int commitTag, const Vector &theVector, ChannelAddress *theAddress=nullptr)=0 |
Invoked to receive the data in the Vector object theVector to another Channel object. More... | |
virtual int | recvVector (int dbTag, int commitTag, Vector &theVector, ChannelAddress *theAddress=nullptr)=0 |
Invoked to receive the data in the Vector object theVector to another Channel object. More... | |
virtual int | sendID (int dbTag, int commitTag, const ID &theID, ChannelAddress *theAddress=nullptr)=0 |
Invoked to receive the data in the ID object theID to another Channel object. More... | |
virtual int | recvID (int dbTag, int commitTag, ID &theID, ChannelAddress *theAddress=nullptr)=0 |
Invoked to receive the data in the ID object theID to another Channel object. More... | |
![]() | |
CommandEntity (CommandEntity *owr=nullptr) | |
Default constructor. | |
CommandEntity * | Owner (void) |
Return a pointer to the object owner. | |
const CommandEntity * | Owner (void) const |
Return un puntero al objeto propietario de ESTE. | |
const StandardOutputWrapper & | getStandardOutputWrapper (void) const |
Return the regular output stream wrapper. | |
StandardOutputWrapper & | getStandardOutputWrapper (void) |
Return the regular output stream wrapper. | |
const std::string & | getLogFileName (void) const |
Returns log file name. | |
void | setLogFileName (const std::string &) |
Sets log file name. | |
const std::string & | getErrFileName (void) const |
Returns err file name. | |
void | setErrFileName (const std::string &) |
Sets error file name. | |
const std::string & | getOutputFileName (void) const |
Returns regular output file name. | |
void | setOutputFileName (const std::string &) |
Sets regular output file name. | |
boost::python::object | evalPy (boost::python::object dict, const std::string &) |
Return the Python object that results from evaluating the argument. | |
boost::python::object | execPy (boost::python::object dict, const std::string &) |
Return the Python objects that results from executing the code in the string argument. | |
boost::python::object | execFilePy (boost::python::object dict, const std::string &) |
Return the Python object that results from executing the code in the file. | |
![]() | |
EntityWithProperties (EntityWithProperties *owr=nullptr) | |
Default constructor. | |
void | clearPyProps (void) |
Clear python properties map. | |
bool | hasPyProp (const std::string &) |
Returns true if property exists. | |
boost::python::object | getPyProp (const std::string &str) |
Return the Python object with the name being passed as parameter. | |
void | setPyProp (std::string str, boost::python::object val) |
Sets/appends a value tho the Python object's dictionary. | |
void | copyPropsFrom (const EntityWithProperties &) |
Copy the properties from the argument. | |
boost::python::list | getPropNames (void) const |
Return the names of the object properties weightings. | |
const PythonDict & | getPropertiesDict (void) const |
Return a std::map container with the properties of the object. | |
boost::python::dict | getPyDict (void) const |
Return a Python dictionary containing the object members values. | |
void | setPyDict (const boost::python::dict &) |
Set the values of the object members from a Python dictionary. | |
![]() | |
EntityWithOwner (EntityWithOwner *owr=nullptr) | |
Default constructor. | |
EntityWithOwner (const EntityWithOwner &) | |
Copy constructor. | |
EntityWithOwner & | operator= (const EntityWithOwner &) |
Assignment operator. | |
virtual bool | operator== (const EntityWithOwner &) const |
Comparison operator. | |
virtual | ~EntityWithOwner (void) |
Virtual destructor. | |
virtual std::string | getClassName (void) const |
Returns demangled class name. | |
void | set_owner (EntityWithOwner *owr) |
Assigns the owner of the object. | |
EntityWithOwner * | Owner (void) |
const EntityWithOwner * | Owner (void) const |
Protected Member Functions | |
FEM_ObjectBroker * | getObjectBroker (void) |
Returns a pointer to theBroker object passed in the constructor. | |
const Preprocessor * | getPreprocessor (void) const |
Returns a pointer to the object preprocessor. | |
Preprocessor * | getPreprocessor (void) |
Returns a pointer to the object preprocessor. | |
![]() | |
int | sendMovable (int commitTag, MovableObject &) |
Send theObject . | |
int | receiveMovable (int commitTag, MovableObject &, FEM_ObjectBroker &) |
Receive theObject . | |
![]() | |
template<class T > | |
void | string_to (T &, const std::string &) const |
![]() | |
bool | isEqual (const EntityWithProperties &) const |
Return true if both objects are equal. | |
![]() | |
virtual bool | isEqual (const EntityWithOwner &) const |
Return true if both objects are equal. | |
Protected Attributes | |
int | lastDbTag |
Additional Inherited Members | |
![]() | |
typedef std::map< std::string, boost::python::object > | PythonDict |
![]() | |
static void | resetStandardOutput (void) |
Reset the standard output streams to its defaults buffers. | |
![]() | |
static int | getVerbosityLevel (void) |
Get the value of the verbosity level. | |
static void | setVerbosityLevel (const int &) |
Set the value of the verbosity level. | |
![]() | |
static CommandEntity * | entcmd_cast (boost::any &data) |
![]() | |
static int | verbosity = 1 |
Object that owns THIS ONE. More... | |
Base class for objects that store/restore model information.
Objects of this class are used in the program to store/restore the geometry and state information in the domain at particular instances. How, where and how the data is stored depends on the implementation provided by the concrete subclasses.
XC::FE_Datastore::FE_Datastore | ( | const std::string & | name, |
Preprocessor & | prep, | ||
FEM_ObjectBroker & | theBroker | ||
) |
Constructor.
prep | preprocessor used to build the finite element model. |
theBroker | deals with object serialization. |
|
virtual |
Stores the current state on the database.
Invoked to store the current state of the domain in the database. The integer commitTag
is used to identify the state for subsequent calls to restore the information from the database. To return \(0\) if successful, a negative number if not.
The object loops over all the components of the Domain object invoking {sendSelf(commitTag, this)} on each of these objects. Returns \(0\) if successful, a negative number if not. For each domain component that could not send itself a warning message is printed.
Reimplemented in XC::FileDatastore, XC::NEESData, and XC::OracleDatastore.
|
virtual |
To return a unique integer identifier at each call.
This identifier will be used by the objects to store/retrieve their information to/from the database. Increments the integer containing the current dbTag and returns this integer.
Reimplemented from XC::Channel.
Reimplemented in XC::NEESData.
bool XC::FE_Datastore::isSaved | ( | int | commitTag | ) | const |
Returns true if the state identified by commitTag was previously saved on the database.
|
virtual |
Call {recvSelf(commitTag, *this, theBroker)} on theObject
and return the result.
Implements XC::Channel.
Reimplemented in XC::OracleDatastore.
|
virtual |
Invoked to restore the state of the domain from a database.
Invoked to restore the state of the domain from a database. The state of the domain at the end of this call is to be the same as the state of the domain when {commitState(commitTag)} was invoked. To return \(0\) if successful, a negative number if not.
The object loops over all the components of the Domain object invoking {recvSelf(commitTag, this)} on each of these objects. Returns \(0\) if successful, a negative number if not. For each domain component that could not send itself a warning message is printed.
|
virtual |
Call {sendSelf(commitTag, *this, theBroker)} on theObject
and return the result.
Implements XC::Channel.
Reimplemented in XC::OracleDatastore.