aboutsummaryrefslogtreecommitdiff
path: root/app/source/Cplt/Model/Workflow/Values/Database.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/source/Cplt/Model/Workflow/Values/Database.cpp')
-rw-r--r--app/source/Cplt/Model/Workflow/Values/Database.cpp36
1 files changed, 12 insertions, 24 deletions
diff --git a/app/source/Cplt/Model/Workflow/Values/Database.cpp b/app/source/Cplt/Model/Workflow/Values/Database.cpp
index 25b77e9..25487f3 100644
--- a/app/source/Cplt/Model/Workflow/Values/Database.cpp
+++ b/app/source/Cplt/Model/Workflow/Values/Database.cpp
@@ -5,40 +5,33 @@
#include <limits>
-TableKind DatabaseRowIdValue::GetTable() const
-{
+TableKind DatabaseRowIdValue::GetTable() const {
return mTable;
}
-int64_t DatabaseRowIdValue::GetRowId() const
-{
+int64_t DatabaseRowIdValue::GetRowId() const {
return mRowId;
}
-bool DatabaseRowIdValue::IsInstance(const BaseValue* value)
-{
+bool DatabaseRowIdValue::IsInstance(const BaseValue* value) {
return value->GetKind() == KD_DatabaseRowId;
}
DatabaseRowIdValue::DatabaseRowIdValue()
: BaseValue(KD_DatabaseRowId)
, mTable{ TableKind::Sales }
- , mRowId{ std::numeric_limits<int64_t>::max() }
-{
+ , mRowId{ std::numeric_limits<int64_t>::max() } {
}
-bool SaleDatabaseRowValue::IsInstance(const BaseValue* value)
-{
+bool SaleDatabaseRowValue::IsInstance(const BaseValue* value) {
return value->GetKind() == KD_SaleDatabaseRow;
}
SaleDatabaseRowValue::SaleDatabaseRowValue()
- : BaseObjectValue(KD_SaleDatabaseRow)
-{
+ : BaseObjectValue(KD_SaleDatabaseRow) {
}
-const BaseValue* SaleDatabaseRowValue::GetProperty(int idx) const
-{
+const BaseValue* SaleDatabaseRowValue::GetProperty(int idx) const {
switch (idx) {
case 0: return &mCustomerName;
case 1: return &mDeadline;
@@ -47,8 +40,7 @@ const BaseValue* SaleDatabaseRowValue::GetProperty(int idx) const
}
}
-bool SaleDatabaseRowValue::SetProperty(int idx, std::unique_ptr<BaseValue> value)
-{
+bool SaleDatabaseRowValue::SetProperty(int idx, std::unique_ptr<BaseValue> value) {
switch (idx) {
case 0: return false;
case 1: CHECK_VALUE_TYPE_AND_MOVE(DateTimeValue, mDeadline, value.get()); break;
@@ -57,18 +49,15 @@ bool SaleDatabaseRowValue::SetProperty(int idx, std::unique_ptr<BaseValue> value
return true;
}
-bool PurchaseDatabaseRowValue::IsInstance(const BaseValue* value)
-{
+bool PurchaseDatabaseRowValue::IsInstance(const BaseValue* value) {
return value->GetKind() == KD_PurchaseDatabaseRow;
}
PurchaseDatabaseRowValue::PurchaseDatabaseRowValue()
- : BaseObjectValue(KD_PurchaseDatabaseRow)
-{
+ : BaseObjectValue(KD_PurchaseDatabaseRow) {
}
-const BaseValue* PurchaseDatabaseRowValue::GetProperty(int idx) const
-{
+const BaseValue* PurchaseDatabaseRowValue::GetProperty(int idx) const {
switch (idx) {
case 0: return &mFactoryName;
case 1: return &mOrderTime;
@@ -77,8 +66,7 @@ const BaseValue* PurchaseDatabaseRowValue::GetProperty(int idx) const
}
}
-bool PurchaseDatabaseRowValue::SetProperty(int idx, std::unique_ptr<BaseValue> value)
-{
+bool PurchaseDatabaseRowValue::SetProperty(int idx, std::unique_ptr<BaseValue> value) {
switch (idx) {
case 0: return false;
case 1: CHECK_VALUE_TYPE_AND_MOVE(DateTimeValue, mOrderTime, value.get()); break;