File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -560,6 +560,13 @@ namespace cereal
560
560
++itsIteratorStack.back ();
561
561
}
562
562
563
+ // ! Retrieves the current node name
564
+ /* ! @return nullptr if no name exists */
565
+ const char * getNodeName () const
566
+ {
567
+ return itsIteratorStack.back ().name ();
568
+ }
569
+
563
570
// ! Sets the name for the next node created with startNode
564
571
void setNextName ( const char * name )
565
572
{
Original file line number Diff line number Diff line change @@ -475,6 +475,13 @@ namespace cereal
475
475
itsNodes.top ().name = nullptr ;
476
476
}
477
477
478
+ // ! Retrieves the current node name
479
+ // ! will return @c nullptr if the node does not have a name
480
+ const char * getNodeName () const
481
+ {
482
+ return itsNodes.top ().node ->name ();
483
+ }
484
+
478
485
// ! Sets the name for the next node created with startNode
479
486
void setNextName ( const char * name )
480
487
{
You can’t perform that action at this time.
0 commit comments