Constructor ! Creates an empty document of specified type. \param type Mandatory type of object to create. \param allocator Optional allocator for allocating memory. \param stackCapacity Optional initial capacity of stack in bytes. \param stackAllocator Optional allocator for allocating memory for stack. */
| 2077 | \param stackAllocator Optional allocator for allocating memory for stack. |
| 2078 | */ |
| 2079 | explicit GenericDocument(Type type, Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity, StackAllocator* stackAllocator = 0) : |
| 2080 | GenericValue<Encoding, Allocator>(type), allocator_(allocator), ownAllocator_(0), stack_(stackAllocator, stackCapacity), parseResult_() |
| 2081 | { |
| 2082 | if (!allocator_) |
| 2083 | ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator()); |
| 2084 | } |
| 2085 | |
| 2086 | //! Constructor |
| 2087 | /*! Creates an empty document which type is Null. |
nothing calls this directly
no test coverage detected