Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TaggedObject.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.1.1.1 $
00022 // $Date: 2000/09/15 08:23:30 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/tagged/TaggedObject.h,v $
00024                                                                         
00025                                                                         
00026 #ifndef TaggedObject_h
00027 #define TaggedObject_h
00028 
00029 // File: ~/tagged/TaggedObject.h
00030 //
00031 // Written: fmk 
00032 // Created: 11/96
00033 // Revision: A
00034 //
00035 // Description: This file contains the class definition for TaggedObject.
00036 // A TaggedObject is an object with an integer identifier. It is used as
00037 // a base class by DomainComponent, Graph and other classes in the framework.
00038 //
00039 // What: "@(#) TaggedObject.h, revA"
00040 
00041 #include <iostream.h>
00042 
00043 #include <Domain.h>
00044 
00058 class TaggedObject 
00059 {
00060   public:
00066     TaggedObject(int tag);
00067 
00072     virtual ~TaggedObject();
00073 
00074 
00079     inline int getTag(void) const;
00080 
00081 
00087     virtual void Print(ostream &s, int flag =0) =0;       
00088 
00090     friend ostream &operator<<(ostream &s, TaggedObject &m);        
00091 
00092 
00093   protected:
00095     void setTag(int newTag);  
00096     
00097   private:    
00098     int theTag;    
00099 };
00100 
00102 
00103 inline int 
00104 TaggedObject::getTag(void) const
00105 {
00106     return theTag;
00107 }
00108 
00109 #endif
00110 
00111 
Copyright Contact Us