#ifndef KeyedDecoderCF_h
#define KeyedDecoderCF_h
#include "KeyedCoding.h"
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
class KeyedDecoderCF final : public KeyedDecoder {
public:
explicit KeyedDecoderCF(const uint8_t* data, size_t);
~KeyedDecoderCF() override;
private:
WARN_UNUSED_RETURN bool decodeBytes(const String& key, const uint8_t*&, size_t&) override;
WARN_UNUSED_RETURN bool decodeBool(const String& key, bool&) override;
WARN_UNUSED_RETURN bool decodeUInt32(const String& key, uint32_t&) override;
WARN_UNUSED_RETURN bool decodeUInt64(const String& key, uint64_t&) override;
WARN_UNUSED_RETURN bool decodeInt32(const String& key, int32_t&) override;
WARN_UNUSED_RETURN bool decodeInt64(const String& key, int64_t&) override;
WARN_UNUSED_RETURN bool decodeFloat(const String& key, float&) override;
WARN_UNUSED_RETURN bool decodeDouble(const String& key, double&) override;
WARN_UNUSED_RETURN bool decodeString(const String& key, String&) override;
bool beginObject(const String& key) override;
void endObject() override;
bool beginArray(const String& key) override;
bool beginArrayElement() override;
void endArrayElement() override;
void endArray() override;
RetainPtr<CFDictionaryRef> m_rootDictionary;
Vector<CFDictionaryRef, 16> m_dictionaryStack;
Vector<CFArrayRef, 16> m_arrayStack;
Vector<CFIndex> m_arrayIndexStack;
};
}
#endif // KeyedDecoderCF_h