4 * Created on: Dec 10, 2011
8 #ifndef COMMONHEADERS_H_
9 #define COMMONHEADERS_H_
11 #include <gtest/gtest.h>
12 #include "DatabaseHandler.h"
20 static std::vector<am_ConnectionFormat_e> getStandardConnectionFormatList();
21 static std::vector<am_SoundProperty_s> getStandardSoundPropertyList();
22 static std::vector<am_MainSoundProperty_s> getStandardMainSoundPropertyList();
23 static std::vector<bool> getStandardConvertionMatrix();
24 bool compareSource(std::vector<am_Source_s>::iterator listIterator, const am_Source_s& sourceData);
25 bool compareSink(std::vector<am_Sink_s>::iterator listIterator, const am_Sink_s& sinkData);
26 bool compareGateway(std::vector<am_Gateway_s>::iterator listIterator, const am_Gateway_s& gatewayData);
27 bool compareGateway1(const am_Gateway_s gateway1, const am_Gateway_s gatewayData);
28 bool compareSinkMainSink(std::vector<am_SinkType_s>::iterator listIterator, const std::vector<am_Sink_s>& sinkList);
29 bool compareSinkMainSource(std::vector<am_SourceType_s>::iterator listIterator, const std::vector<am_Source_s>& sourceList);
30 void createSink(am_Sink_s& sink) const;
31 void createSource(am_Source_s& source) const ;
32 void createDomain(am_Domain_s& domain) const;
33 void createGateway(am_Gateway_s& gateway);
34 void createConnection(am_Connection_s& connection) const ;
35 void createMainConnection(am_MainConnection_s& mainConnection, am_Route_s route) const;
36 void connectionList2RoutingList(std::vector<am_RoutingElement_s>& routingList, const std::vector<am_Connection_s>& connectionList);
40 bool operator()(const am_RoutingElement_s & a, const am_RoutingElement_s & b) const
42 return (a.sinkID < b.sinkID);
46 struct sortByConnectionFormat
48 bool operator()(const am_ConnectionFormat_e & a, const am_ConnectionFormat_e & b) const
54 struct sortByMainSoundProperty
56 bool operator()(const am_MainSoundProperty_s & a, const am_MainSoundProperty_s & b) const
58 return (a.type > b.type);
62 struct sortBySoundProperty
64 bool operator()(const am_SoundProperty_s & a, const am_SoundProperty_s & b) const
66 return (a.type < b.type);
74 #endif /* COMMONHEADERS_H_ */