blob: ea06df52edf9783f81d035b3ebf3316de1988c05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/HashTable.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/Object.h>
#include <LibJS/Runtime/Value.h>
namespace JS {
class Set : public Object {
JS_OBJECT(Set, Object);
public:
static Set* create(GlobalObject&);
explicit Set(Object& prototype);
virtual ~Set() override;
OrderedHashTable<Value, ValueTraits> const& values() const { return m_values; };
OrderedHashTable<Value, ValueTraits>& values() { return m_values; };
private:
virtual void visit_edges(Visitor& visitor) override;
OrderedHashTable<Value, ValueTraits> m_values;
};
}
|