mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Small changes in the iterator code.
Changed the public interface of Scanner to resemble an STL container.
This commit is contained in:
@@ -8,11 +8,13 @@ namespace YAML
|
||||
{
|
||||
class Node;
|
||||
|
||||
// IterPriv
|
||||
// . The implementation for iterators - essentially a union of sequence and map iterators.
|
||||
struct IterPriv
|
||||
{
|
||||
IterPriv();
|
||||
IterPriv(std::vector <Node *>::const_iterator it);
|
||||
IterPriv(std::map <Node *, Node *, ltnode>::const_iterator it);
|
||||
IterPriv(): type(IT_NONE) {}
|
||||
IterPriv(std::vector <Node *>::const_iterator it): seqIter(it), type(IT_SEQ) {}
|
||||
IterPriv(std::map <Node *, Node *, ltnode>::const_iterator it): mapIter(it), type(IT_MAP) {}
|
||||
|
||||
enum ITER_TYPE { IT_NONE, IT_SEQ, IT_MAP };
|
||||
ITER_TYPE type;
|
||||
|
Reference in New Issue
Block a user