00001
00002
00003
00004
00005
00006
00007
00008 #ifndef TRANSFERTABLE_H_
00009 #define TRANSFERTABLE_H_
00010
00011 #include <iostream>
00012 #include <string>
00013 #include <map>
00014 #include <algorithm>
00015 #include "core/Quantity.h"
00016
00017 namespace cosi
00018 {
00019
00020 class TransferTable : public cosi::Quantity
00021 {
00022 std::map< std::pair<std::string,std::string> , std::string > mTable;
00023 public:
00024
00025 typedef std::map< std::pair<std::string,std::string> , std::string >::iterator iterator ;
00026
00027 TransferTable();
00028
00029 ~TransferTable();
00030
00031 TransferTable Get();
00032
00033 void Set(TransferTable pT);
00034
00035 std::map< std::pair<std::string,std::string> , std::string > GetValue() ;
00036
00037 void SetValue(std::map< std::pair<std::string,std::string> , std::string > pTable) ;
00038
00039 void AddEntry(std::string pSourceName, std::string pDestName , std::string pPortName);
00040
00041 bool HasEntry(std::string pSourceName, std::string pDestName , std::string pPortName);
00042
00043 bool HasEntry(std::string pSourceName, std::string pDestName );
00044
00045 std::string GetPort(std::string pSourceName , std::string pDestName ) ;
00046
00047 iterator TransferTableBegin();
00048
00049 iterator TransferTableEnd();
00050
00051 bool operator<(TransferTable pT) ;
00052
00053 TransferTable operator+(TransferTable pT) ;
00054
00055 friend std::ostream& operator <<(std::ostream &pOs, const TransferTable &pT) ;
00056
00057 static std::string sQuantityName ;
00058 static std::string sQuantityType ;
00059
00060 };
00061
00062 }
00063
00064 #endif