A DerStructure extends DerNode to hold other DerNodes.
More...
#include <der-node.hpp>
|
virtual size_t | getSize () |
| Override to get the total length of the encoding, including children. More...
|
|
virtual const std::vector< ptr_lib::shared_ptr< DerNode > > & | getChildren () |
| Get the children of this node. More...
|
|
void | addChild (const ptr_lib::shared_ptr< DerNode > &node, bool notifyParent=false) |
|
virtual Blob | encode () |
| Override the base encode to return raw data encoding for this node and its children. More...
|
|
virtual Blob | toVal () |
| Convert the encoded data to a standard representation. More...
|
|
Blob | getPayload () |
| Get a copy of the payload bytes. More...
|
|
A DerStructure extends DerNode to hold other DerNodes.
Create a DerStructure with the given nodeType.
This is a protected constructor. To create an object, use DerSequence.
- Parameters
-
nodeType | The DER node type. |
void ndn::DerNode::DerStructure::decode |
( |
const uint8_t * |
inputBuf, |
|
|
size_t |
startIdx |
|
) |
| |
|
protectedvirtual |
Override the base decode to decode and store the data from an input buffer.
Recursively populates child nodes.
- Parameters
-
inputBuf | The input buffer to read from. This reads from startIdx. |
startIdx | The offset into the buffer. |
Reimplemented from ndn::DerNode.
Blob ndn::DerNode::DerStructure::encode |
( |
| ) |
|
|
virtual |
Override the base encode to return raw data encoding for this node and its children.
- Returns
- The raw data encoding.
Reimplemented from ndn::DerNode.
const std::vector< ptr_lib::shared_ptr< DerNode > > & ndn::DerNode::DerStructure::getChildren |
( |
| ) |
|
|
virtual |
Get the children of this node.
- Returns
- The children as an array of shared_ptr<DerNode>.
Reimplemented from ndn::DerNode.
size_t ndn::DerNode::DerStructure::getSize |
( |
| ) |
|
|
virtual |
Override to get the total length of the encoding, including children.
- Returns
- The total (header + payload) length.
Reimplemented from ndn::DerNode.
The documentation for this class was generated from the following files: