ghostvectoragent.h

Go to the documentation of this file.
00001 #ifndef  __GhostVectorAgent_h
00002 #define  __GhostVectorAgent_h
00003 
00004 #include  <string>
00005 #include  "gascoigne.h"
00006 #include  "vectorinterface.h"
00007 
00008 namespace Gascoigne
00009 {
00010 
00018 
00019 class GhostVectorAgent : public std::map<VectorInterface,GlobalVector*>
00020 {
00021 public:
00022 
00023   typedef std::map<VectorInterface,GlobalVector*>::const_iterator const_iterator;
00024   typedef std::map<VectorInterface,GlobalVector*>::iterator       iterator;
00025 
00026 //
00028 //
00029 
00030   GhostVectorAgent();
00031   ~GhostVectorAgent();
00032 
00033   void Register(const VectorInterface& mg);
00034   void Delete(VectorInterface& mg);
00035 
00036   GlobalVector& operator()(const VectorInterface& g);
00037 
00038   friend std::ostream& operator<<(std::ostream& os, const GhostVectorAgent& gva) {
00039     int i=0,n=gva.size();
00040     os << "GhostVectorAgent: size=" << n << ", ";
00041     for (const_iterator p=gva.begin(); p!=gva.end(); p++,i++){
00042       os << "VectorInterface("<<i<<")=('"<< p->first.GetName() << "',"<< p->second <<")";
00043       if( i <n-1 ) os << ", "; else os << ". ";
00044     }
00045     return os;
00046   }
00047 
00048 };
00049 }
00050 
00051 #endif

Generated on Thu Sep 14 10:34:38 2006 for Gascoigne by  doxygen 1.4.7