C++: Some code cleanup
[smartapi.git] / Common / C++ / SmartAPI / smartapi / model / TimeDependentPriceSpecification.cpp
1 #include "TimeDependentPriceSpecification.h"
2
3 #include "smartapi/common/RESOURCE.h"
4
5 TimeDependentPriceSpecification::TimeDependentPriceSpecification(QString identifierUri) :
6         DependentPriceSpecification(identifierUri)
7 {
8         setType(RESOURCE__TIMEDEPENDENTPRICESPECIFICATION);
9 }
10
11 TimeDependentPriceSpecification::TimeDependentPriceSpecification(QString unit, QString secondaryUnit, QString secondaryQuantity, QDateTime validFrom, QDateTime validThrough) :
12         TimeDependentPriceSpecification()
13 {
14         setQuantity(RESOURCE__CURRENCY);
15         setUnit(unit);
16         setSecondaryUnit(secondaryUnit);
17         setSecondaryQuantity(secondaryQuantity);
18         setValidFrom(validFrom);
19         setValidThrough(validThrough);
20 }
21
22 TimeDependentPriceSpecification::TimeDependentPriceSpecification(TimeDependentPriceSpecification* o) :
23         DependentPriceSpecification(o)
24 {
25         setType(RESOURCE__TIMEDEPENDENTPRICESPECIFICATION);
26 }
27
28 TimeDependentPriceSpecification::~TimeDependentPriceSpecification()
29 {
30 }
31
32 void TimeDependentPriceSpecification::clearReferences(QSet<GraphItem*>* trash)
33 {
34         INIT_CLEAR(DependentPriceSpecification, trash);
35         FINISH_CLEAR(DependentPriceSpecification, trash);
36 }
37
38 Resource* TimeDependentPriceSpecification::serialize(Model* model)
39 {
40         INIT_SERIALIZE(DependentPriceSpecification,model)
41         FINISH_SERIALIZE(DependentPriceSpecification)
42 }
43
44 void TimeDependentPriceSpecification::parse(Statement* statement)
45 {
46         INIT_PARSE(statement)
47         FINISH_PARSE(DependentPriceSpecification)
48 }