-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdynamic-list-reader.h
36 lines (24 loc) · 1.04 KB
/
dynamic-list-reader.h
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
35
36
#ifndef CAPNP_PHP_DYNAMIC_LIST_READER_H
#define CAPNP_PHP_DYNAMIC_LIST_READER_H
#include <phpcpp.h>
#include <capnp/dynamic.h>
namespace capnp_php {
class DynamicListReader : public Php::Base, public Php::Countable,
public Php::ArrayAccess, public Php::Traversable {
private:
Php::Object messageReader;
capnp::DynamicList::Reader reader;
public:
DynamicListReader(capnp::DynamicList::Reader reader,
Php::Object messageReader);
~DynamicListReader();
Php::Value getByIndex(int64_t index);
virtual long count() override;
virtual bool offsetExists(const Php::Value &key) override;
virtual Php::Value offsetGet(const Php::Value &key) override;
virtual void offsetSet(const Php::Value &key, const Php::Value &value) override;
virtual void offsetUnset(const Php::Value &key) override;
virtual Php::Iterator *getIterator() override;
};
}
#endif /* CAPNP_PHP_DYNAMIC_LIST_READER_H */