00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __DSIM_CONNECTION__
00011 #define __DSIM_CONNECTION__
00012
00013 #include <map>
00014 #include "dsim_value.h"
00015 #include "dsim_exceptions.h"
00016
00017 class dsim_network;
00018 class dsim_model;
00019
00025 class dsim_connection
00026 {
00027 public:
00029 const char *source_path() const;
00031 const char *destination_path() const;
00033 bool is_bi_directional() const;
00034
00036 void set_value(const std::string &name,const dsim_value &value) throw(dsim_type_mismatch_exception);
00038 dsim_value value(const std::string &name);
00039
00040 bool parse_value(const std::string &name,const char *str);
00041 private:
00042 dsim_connection(dsim_network *net,const std::string &source,const std::string &destination,bool bi_directional);
00043
00044 dsim_network *_network;
00045 std::string _source_path;
00046 std::string _destination_path;
00047 bool _bi_directional;
00048
00049 std::map<std::string,dsim_value> _values;
00050
00051 friend class dsim_network;
00052 };
00053
00054 #endif