SRD parser - Access value as a RW reference
This commit is contained in:
parent
1ce16d63cb
commit
5db261909a
2 changed files with 26 additions and 6 deletions
include/ebcl
|
@ -72,11 +72,12 @@ public:
|
|||
void handleFlushToken( bool handleIt ) noexcept;
|
||||
bool handleFlushToken( ) const noexcept;
|
||||
|
||||
template< typename T >
|
||||
T const& getData( ) const;
|
||||
template< typename T > T const& getData( ) const;
|
||||
template< typename T > T& getData( );
|
||||
|
||||
private:
|
||||
T_Variant const& getExecStackTop( ) const;
|
||||
T_Variant const& getExecStackTop( ) const noexcept;
|
||||
T_Variant& getExecStackTop( ) noexcept;
|
||||
|
||||
};
|
||||
M_CLASS_POINTERS( SRDParser );
|
||||
|
@ -87,6 +88,12 @@ inline T const& T_SRDParser::getData( ) const
|
|||
return getExecStackTop( ).value< T >( );
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
inline T& T_SRDParser::getData( )
|
||||
{
|
||||
return getExecStackTop( ).value< T >( );
|
||||
}
|
||||
|
||||
|
||||
} // namespace
|
||||
#endif // _H_EBCL_SRDPARSER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue