PCSIMParserEnvironment.h

Go to the documentation of this file.
00001 #ifndef PCSIMPARSERENVIRONMENT_H_
00002 #define PCSIMPARSERENVIRONMENT_H_
00003 
00004 #include <string>
00005 using std::string;
00006 
00007 #include <map>
00008 using std::map;
00009 
00010 #include <vector>
00011 using std::vector;
00012 
00013 #include <boost/shared_ptr.hpp>
00014 using boost::shared_ptr;
00015 
00016 class SimObject;
00017 class SimObjectFactory;
00018 class SpatialSimObjectPopulation;
00019 class ConnectionsProjection;
00020 class SimNetwork;
00021 
00022 //#include "SimNetwork.h"
00023 //#include "SpatialSimObjectPopulation.h"
00024 //#include "ConnectionsProjection.h"
00025 
00026 namespace neuroml
00027 {
00028     namespace schema
00029     {
00030         class Level3Cells_pimpl;
00031     }
00032 }
00033 
00034 namespace networkml
00035 {
00036     namespace schema
00037     {
00038         class Population_pimpl;
00039         class Projection_pimpl;
00040         class Populations_pimpl;
00041         class Connections_pimpl;
00042     }
00043 }
00044 
00045 namespace channelml
00046 {
00047     namespace schema
00048     {
00049         class ChannelML_pimpl;
00050     }
00051 }
00052 
00053 class NeuroMLImporter;
00054 
00055 class PCSIMParserEnvironment
00056 {
00057     public:
00058 
00059         typedef map< string, shared_ptr<SimObject> > cell_map_t;
00060         typedef map< string, shared_ptr<SimObject> > channel_map_t;
00061         typedef map< string, shared_ptr<SimObject> > synapse_map_t;
00062         typedef map< string, shared_ptr<SpatialSimObjectPopulation> > population_map_t;
00063         typedef map< string, shared_ptr<ConnectionsProjection> > projection_map_t;
00064         typedef map< string, shared_ptr<SimObject> > input_map_t;
00065 
00066         const cell_map_t& cells()
00067         {
00068             return cell_map;
00069         }
00070         ;
00071         shared_ptr<SimObject> cell(const string& name)
00072         {
00073             return cell_map[name];
00074         }
00075         ;
00076 
00077         const synapse_map_t& synapses()
00078         {
00079             return synapse_map;
00080         }
00081         ;
00082         shared_ptr<SimObject> synapse(const string& name)
00083         {
00084             return synapse_map[name];
00085         }
00086         ;
00087 
00088         const channel_map_t& channels()
00089         {
00090             return channel_map;
00091         }
00092         ;
00093         shared_ptr<SimObject> channel(const string& name)
00094         {
00095             return channel_map[name];
00096         }
00097         ;
00098 
00099         const population_map_t& populations()
00100         {
00101             return population_map;
00102         }
00103         ;
00104         shared_ptr<SpatialSimObjectPopulation> population(const string& name)
00105         {
00106             return population_map[name];
00107         }
00108         ;
00109 
00110         const projection_map_t& projections()
00111         {
00112             return projection_map;
00113         }
00114         ;
00115         shared_ptr<ConnectionsProjection> projection(const string& name)
00116         {
00117             return projection_map[name];
00118         }
00119         ;
00120 
00121         const input_map_t& inputs()
00122         {
00123             return input_map;
00124         }
00125         ;
00126         shared_ptr<SimObject> input(const string& name)
00127         {
00128             return input_map[name];
00129         }
00130         ;
00131 
00132     private:
00133 
00134         //        template< T > 
00135         //        shared_ptr< vector< string> > _keys( T &m)
00136         //        {
00137         //            shared_ptr< vector< string> > keys(new vector< string>);
00138         //            T::const_iterator it;
00139         //            for (it = m.begin(); it != m.end(); it++)
00140         //                keys->push_back(it->first);
00141         //            return keys;
00142         //        };
00143 
00144         friend class ::neuroml::schema::Level3Cells_pimpl;
00145         friend class ::networkml::schema::Population_pimpl;
00146         friend class ::networkml::schema::Projection_pimpl;
00147         friend class ::channelml::schema::ChannelML_pimpl;
00148         friend class ::networkml::schema::Populations_pimpl;
00149         friend class ::networkml::schema::Connections_pimpl;
00150         friend class NeuroMLImporter;
00151         
00152         SimNetwork *net;
00153         cell_map_t cell_map;
00154         synapse_map_t synapse_map;
00155         channel_map_t channel_map;
00156         population_map_t population_map;
00157         projection_map_t projection_map;
00158         input_map_t input_map;
00159 
00160         SpatialSimObjectPopulation *current_source_population;
00161         SpatialSimObjectPopulation *current_target_population;
00162         SimObject *current_synapse_factory;
00163 
00164 };
00165 
00166 #endif /*PCSIMPARSERENVIRONMENT_H_*/

Generated on Wed Jul 9 16:34:37 2008 for PCSIM by  doxygen 1.5.5