Shadow.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.3 $ 00022 // $Date: 2005/11/23 18:25:17 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/actor/shadow/Shadow.h,v $ 00024 00025 00026 // Written: fmk 00027 // Revision: A 00028 // 00029 // Purpose: This file contains the class definition for Shadow. 00030 // Shadow is meant to be an abstract base class and thus no objects of it's type 00031 // can be instantiated. 00032 // 00033 // What: "@(#) Shadow.h, revA" 00034 00035 #ifndef Shadow_h 00036 #define Shadow_h 00037 00038 #include <bool.h> 00039 00040 class MachineBroker; 00041 class Message; 00042 class Channel; 00043 class ChannelAddress; 00044 class MovableObject; 00045 class Matrix; 00046 class Vector; 00047 class ID; 00048 00049 class FEM_ObjectBroker; 00050 00051 class Shadow 00052 { 00053 public: 00054 Shadow(Channel &theChannel, 00055 FEM_ObjectBroker &theBroker); // if actor process up and running 00056 00057 Shadow(Channel &theChannel, 00058 FEM_ObjectBroker &theBroker, 00059 ChannelAddress &theAddress); // if actor process up and running 00060 00061 Shadow(int actorType, 00062 FEM_ObjectBroker &theBroker, 00063 MachineBroker &theMachineBroker, 00064 int compDemand); // to start an actor process 00065 00066 virtual ~Shadow(); 00067 00068 virtual int sendObject(MovableObject &theObject); 00069 virtual int recvObject(MovableObject &theObject); 00070 virtual int sendMessage(const Message &theMessage); 00071 virtual int recvMessage(Message &theMessage); 00072 virtual int sendMatrix(const Matrix &theMatrix); 00073 virtual int recvMatrix(Matrix &theMatrix); 00074 virtual int sendVector(const Vector &theVector); 00075 virtual int recvVector(Vector &theVector); 00076 virtual int sendID(const ID &theID); 00077 virtual int recvID(ID &theID); 00078 void setCommitTag(int commitTag); 00079 00080 Channel *getChannelPtr(void) const; 00081 FEM_ObjectBroker *getObjectBrokerPtr(void) const; 00082 ChannelAddress *getActorAddressPtr(void) const; 00083 00084 protected: 00085 Channel *theChannel; 00086 FEM_ObjectBroker *theBroker; 00087 00088 private: 00089 ChannelAddress *theRemoteActorsAddress; 00090 int commitTag; 00091 }; 00092 00093 #endif |