Skip to content

Commit c53eae2

Browse files
committed
- Refactoring (cont)
1 parent 1b38691 commit c53eae2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+756
-866
lines changed

cldeplus/CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# FOUNDATION SOURCE
44
set(FOUNDATION_SOURCE
55
Exception.cpp
6+
Exceptions/InvalidInputTypeException.cpp
67
Exceptions/NonSupportedFunctionException.cpp
78
Exceptions/NotImplementedException.cpp
89
Value.cpp
@@ -33,15 +34,21 @@ set(FOUNDATION_SOURCE
3334
Data/Type/VarChar.cpp
3435
Data/Helper/TimeBasedHelper.cpp
3536
Data/Helper/ValueEnumsHelper.cpp
36-
# Cell.cpp
37+
Data/Helper/ValueHelper.cpp
3738
EntityColumn.cpp
38-
# Entity.cpp
39-
# EntityMap.cpp
39+
EntityCell.cpp
40+
EntityException.cpp
41+
EntityMap.cpp
42+
DataRecord.cpp
43+
Entity.cpp
44+
EntityIdentity.cpp
45+
Store/Helper/CellHelper.cpp
46+
47+
4048
# EntityProxy.cpp
4149
# EntityQuery.cpp
4250
# EntitySourceDriver.cpp
4351
# EntityStore.cpp
44-
# Identity.cpp
4552
)
4653

4754

cldeplus/Cell.cpp

Lines changed: 0 additions & 56 deletions
This file was deleted.

cldeplus/Cell.h

Lines changed: 0 additions & 69 deletions
This file was deleted.

cldeplus/CldePlus-Commons.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ namespace CLDEPlus {
7272
};
7373

7474
struct IPrintable {
75-
virtual string ToString() const = 0;
76-
virtual string ToString(IFormatter const &formatter) const { return formatter.Format(*this); };
75+
virtual string CopyToString() const = 0;
76+
virtual string CopyToString(IFormatter const &formatter) const { return formatter.Format(*this); };
7777
};
7878
}
7979

cldeplus/Data/Helper/PrimitiveHelper.h

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,20 @@ limitations under the License.
1616
1717
*/
1818

19-
#ifndef CLDEPLUS_FOUNDATION_DATA_HELPER_PRIMITIVEHELPER_H
20-
#define CLDEPLUS_FOUNDATION_DATA_HELPER_PRIMITIVEHELPER_H
19+
#ifndef CLDEPLUS_DATA_HELPER_PRIMITIVEHELPER_H
20+
#define CLDEPLUS_DATA_HELPER_PRIMITIVEHELPER_H
2121

2222
#include "../Value.h"
23-
#include "../../Exception/cldeNonSupportedDataTypeException.h"
23+
#include "../DataTypeException.h
2424
2525
namespace CLDEPlus {
26-
namespace Foundation {
27-
namespace Data {
28-
namespace Helper {
26+
namespace Data {
27+
namespace Helper {
2928
30-
struct PrimitiveHelper {
3129
32-
template<typename T>
33-
static T ToPrimitive(SPtrValue const &value) {
34-
35-
if (!value->isNumeric() || value->getCategory() != ValueCategory::Numeric) {
36-
string msg{"Value is not numeric"};
37-
throw Exception::CLDENonSupportedDataTypeException{msg};
38-
}
39-
40-
T const *ptrResult = reinterpret_cast<const T *>(value->PointerToBuffer());
41-
42-
return *ptrResult;
43-
};
44-
};
45-
}
4630
}
4731
}
4832
}
4933
5034
51-
#endif //CLDEPLUS_FOUNDATION_DATA_HELPER_PRIMITIVEHELPER_H
35+
#endif //CLDEPLUS_DATA_HELPER_PRIMITIVEHELPER_H

cldeplus/Data/Helper/ValueEnumsHelper.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ namespace CLDEPlus {
5252
string result;
5353

5454
switch (type) {
55-
case ValueType::Blob:
56-
result = "Blob";
57-
break;
5855
case ValueType::Boolean:
5956
result = "Boolean";
6057
break;
@@ -94,9 +91,6 @@ namespace CLDEPlus {
9491
case ValueType::Text:
9592
result = "Text";
9693
break;
97-
case ValueType::Currency:
98-
result = "Currency";
99-
break;
10094
case ValueType::Date:
10195
result = "Date";
10296
break;
@@ -106,12 +100,6 @@ namespace CLDEPlus {
106100
case ValueType::DateTime:
107101
result = "DateTime";
108102
break;
109-
case ValueType::Point:
110-
result = "Point";
111-
break;
112-
case ValueType::Matrix:
113-
result = "Matrix";
114-
break;
115103
}
116104

117105
return result;

0 commit comments

Comments
 (0)