File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1191,6 +1191,12 @@ WsjcppYamlCursor &WsjcppYamlCursor::val(bool bValue) {
11911191
11921192// ---------------------------------------------------------------------
11931193
1194+ WsjcppYamlNode *WsjcppYamlCursor::node () {
1195+ return m_pCurrentNode;
1196+ }
1197+
1198+ // ---------------------------------------------------------------------
1199+
11941200WsjcppYamlCursor WsjcppYamlCursor::operator [](int idx) const {
11951201 if (m_pCurrentNode != nullptr && m_pCurrentNode->isArray () && idx < m_pCurrentNode->getLength () && idx >= 0 ) {
11961202 return WsjcppYamlCursor (m_pCurrentNode->getElement (idx));
Original file line number Diff line number Diff line change @@ -235,6 +235,8 @@ class WsjcppYamlCursor {
235235 bool valBool ();
236236 WsjcppYamlCursor &val (bool bValue);
237237
238+ // node
239+ WsjcppYamlNode *node ();
238240
239241 WsjcppYamlCursor operator [](int idx) const ;
240242 WsjcppYamlCursor operator [](const std::string &sName ) const ;
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ void UnitTestCursor::executeTest() {
133133
134134 // bool
135135 compare (" array bool el 4" , yaml[" arr1" ][4 ].valStr (), " true" );
136+ compare (" array bool el 4" , yaml[" arr1" ][4 ].node ()->getValue (), " true" );
136137 compare (" array bool el 4" , yaml[" arr1" ][4 ].valBool (), true );
137138 yaml[" arr1" ][4 ].val (true );
138139 compare (" array bool el 4" , yaml[" arr1" ][4 ].valStr (), " yes" );
You can’t perform that action at this time.
0 commit comments