Information.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.6 $ 00022 // $Date: 2003/02/25 23:32:43 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/element/Information.h,v $ 00024 00025 00026 // Written: fmk 00027 // Created: 10/99 00028 // Revision: A 00029 // 00030 // Description: This file contains the class definition for Information. 00031 // Information is a class in which all data members are public, i.e. basically 00032 // a struct. 00033 // 00034 // What: "@(#) Information.h, revA" 00035 00036 #ifndef Information_h 00037 #define Information_h 00038 00039 class Matrix; 00040 class Vector; 00041 class ID; 00042 00043 #include <OPS_Globals.h> 00044 #include <Tensor.h> 00045 00046 00047 #include <fstream> 00048 using std::ofstream; 00049 00050 enum InfoType {UnknownType, IntType, DoubleType, 00051 IdType, VectorType, MatrixType, TensorType}; 00052 00053 class Information 00054 { 00055 public: 00056 Information(); 00057 Information(int val); 00058 Information(double val); 00059 Information(const ID &val); 00060 Information(const Vector &val); 00061 Information(const Matrix &val); 00062 Information(const Tensor &val); 00063 00064 virtual ~Information(); 00065 00066 virtual int setInt(int newInt); 00067 virtual int setDouble(double newDouble); 00068 virtual int setID(const ID &newID); 00069 virtual int setVector(const Vector &newVector); 00070 virtual int setMatrix(const Matrix &newMatrix); 00071 virtual int setTensor(const Tensor &newTensor); 00072 00073 virtual void Print(OPS_Stream &s, int flag = 0); 00074 virtual void Print(ofstream &s, int flag = 0); 00075 virtual const Vector &getData(void); 00076 00077 00078 // data that is stored in the information object 00079 InfoType theType; // information about data type 00080 int theInt; // an integer value 00081 double theDouble; // a double value 00082 ID *theID; // pointer to an ID object, created elsewhere 00083 Vector *theVector;// pointer to a Vector object, created elsewhere 00084 Matrix *theMatrix;// pointer to a Matrix object, created elsewhere 00085 Tensor *theTensor;// pointer to a Tensor object, created elsewhere 00086 00087 protected: 00088 00089 private: 00090 00091 }; 00092 00093 #endif 00094 |