Polaris: GSAPathMap.h Source File

GSAPathMap.h

Go to the documentation of this file.
00001 ///
00002 #ifndef _GSA_PATH_MAP_H
00003 #define _GSA_PATH_MAP_H
00004 ///
00005 /// \class GSAPathMap 
00006 /// \brief Path map for building GSA
00007 /// \defgroup Polaris
00008 /// \ingroup Polaris
00009 ///  C++ VDL
00010 /// \see GSAPathMap.h
00011 /// \see GSAPathMap.cc
00012 ///
00013 #ifdef POLARIS_GNU_PRAGMAS
00014 #pragma interface
00015 #endif
00016 ///
00017 #include "ClassNames.h"
00018 #include "Statement/Statement.h"
00019 #include "Listable.h"
00020 #include "Array.h"
00021 ///
00022 class GSAPathMap : public Listable {
00023 
00024  public:
00025     Array<Statement *> children;
00026     
00027     GSAPathMap(int s){
00028     #ifdef CLASS_INSTANCE_REGISTRY
00029     register_instance(GSA_PATH_MAP, sizeof(GSAPathMap), this);
00030     #endif
00031 
00032     children.resize(s);
00033         for (int i=0; i<s; ++i)
00034             children[i] = NULL;
00035     }
00036 
00037     GSAPathMap(const GSAPathMap &a){
00038     #ifdef CLASS_INSTANCE_REGISTRY
00039     register_instance(GSA_PATH_MAP, sizeof(GSAPathMap), this);
00040     #endif
00041 
00042         int s = a.children.entries();
00043     children.resize(s);
00044         for (int i=0; i<s; ++i)
00045             children[i] = a.children[i];
00046     }
00047 
00048     ~GSAPathMap(){
00049     #ifdef CLASS_INSTANCE_REGISTRY
00050     unregister_instance(GSA_PATH_MAP, this);
00051     #endif
00052     }
00053 
00054     GSAPathMap * clone(){
00055         return new GSAPathMap(*this);
00056     }
00057         
00058     virtual Listable * listable_clone() const{
00059         return new GSAPathMap(*this);
00060     }
00061     virtual void       print(ostream &o) const;
00062 
00063 };
00064 
00065 ostream & operator << (ostream &o, const GSAPathMap &);
00066 
00067 #endif
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:05:54 2005