Skip to content

Commit ef5af06

Browse files
committed
chore: empty dom Array, Object
1 parent 1d4a429 commit ef5af06

File tree

2 files changed

+41
-6
lines changed

2 files changed

+41
-6
lines changed

include/mrdox/Support/Dom.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ class MRDOX_DECL
152152
Array : public Any
153153
{
154154
public:
155-
virtual std::size_t length() const noexcept = 0;
156-
virtual Value get(std::size_t) const = 0;
155+
virtual std::size_t length() const noexcept;
156+
virtual Value get(std::size_t) const;
157157
};
158158

159159
using ArrayPtr = Pointer<Array>;
@@ -165,8 +165,8 @@ class MRDOX_DECL
165165
{
166166
public:
167167
virtual bool empty() const noexcept;
168-
virtual Value get(std::string_view) const = 0;
169-
virtual std::vector<std::string_view> props() const = 0;
168+
virtual Value get(std::string_view) const;
169+
virtual std::vector<std::string_view> props() const;
170170
};
171171

172172
using ObjectPtr = Pointer<Object>;

source/Support/Dom.cpp

+37-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,46 @@ namespace dom {
1616

1717
Any::~Any() = default;
1818

19-
bool Object::empty() const noexcept
19+
//------------------------------------------------
20+
21+
std::size_t
22+
Array::
23+
length() const noexcept
24+
{
25+
return 0;
26+
}
27+
28+
Value
29+
Array::
30+
get(std::size_t) const
31+
{
32+
return nullptr;
33+
}
34+
35+
bool
36+
Object::
37+
empty() const noexcept
2038
{
21-
return false;
39+
return true;
2240
}
2341

42+
Value
43+
Object::
44+
get(std::string_view) const
45+
{
46+
return nullptr;
47+
}
48+
49+
auto
50+
Object::
51+
props() const ->
52+
std::vector<std::string_view>
53+
{
54+
return {};
55+
}
56+
57+
//------------------------------------------------
58+
2459
Value::
2560
~Value()
2661
{

0 commit comments

Comments
 (0)