Skip to content

Commit

Permalink
chore: empty dom Array, Object
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed Jun 18, 2023
1 parent 1d4a429 commit ef5af06
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 6 deletions.
8 changes: 4 additions & 4 deletions include/mrdox/Support/Dom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ class MRDOX_DECL
Array : public Any
{
public:
virtual std::size_t length() const noexcept = 0;
virtual Value get(std::size_t) const = 0;
virtual std::size_t length() const noexcept;
virtual Value get(std::size_t) const;
};

using ArrayPtr = Pointer<Array>;
Expand All @@ -165,8 +165,8 @@ class MRDOX_DECL
{
public:
virtual bool empty() const noexcept;
virtual Value get(std::string_view) const = 0;
virtual std::vector<std::string_view> props() const = 0;
virtual Value get(std::string_view) const;
virtual std::vector<std::string_view> props() const;
};

using ObjectPtr = Pointer<Object>;
Expand Down
39 changes: 37 additions & 2 deletions source/Support/Dom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,46 @@ namespace dom {

Any::~Any() = default;

bool Object::empty() const noexcept
//------------------------------------------------

std::size_t
Array::
length() const noexcept
{
return 0;
}

Value
Array::
get(std::size_t) const
{
return nullptr;
}

bool
Object::
empty() const noexcept
{
return false;
return true;
}

Value
Object::
get(std::string_view) const
{
return nullptr;
}

auto
Object::
props() const ->
std::vector<std::string_view>
{
return {};
}

//------------------------------------------------

Value::
~Value()
{
Expand Down

0 comments on commit ef5af06

Please sign in to comment.