![]() |
Yoba Perl
|
Base class for perl variables. More...
Inherited by Array, Code, Hash, and Scalar.
Public Member Functions | |
| Variable (Perl &perl, SV *sv, bool increase_refcount) | |
| Constructor. | |
| Variable (const Variable &to_copy) | |
| Copy constructor. More... | |
| Variable (Variable &&to_move) | |
| Move constructor. More... | |
| virtual | ~Variable () |
| Destructor. More... | |
Misc | |
| virtual std::string | toString () const =0 |
| Convert to C++ string. | |
| void | setReadOnly (bool state) |
| Add/remove readonly flag. | |
| bool | isReadOnly () const |
| Check if SV has readonly flag. | |
| Perl & | getPerl () const |
| Get Perl instance. | |
Internals | |
| SV * | getSV () const |
| Get raw scalar. | |
| SV * | detachSV () |
| Nullify object and return SV. More... | |
| SV * | detachMortalSV () |
| Nullify object and return mortalized SV. More... | |
| U32 | getRefcount () const |
| Get SV reference count. | |
| void | increaseRefcount () |
| Increase SV reference count. | |
| void | decreaseRefcount () |
| Decrease SV reference count. | |
| void | dump () const |
| Dump SV data to stderr. | |
Operators | |
| bool | operator== (const Variable &other) |
| Compare SV pointers. | |
| bool | operator!= (const Variable &other) |
| std::ostream & | operator<< (std::ostream &stream, const Variable &var) |
| Operator for streams. More... | |
Base class for perl variables.
Definition at line 20 of file variable.hpp.
|
virtual |
| SV * detachSV | ( | ) |
Nullify object and return SV.
Reference count not affected
Definition at line 70 of file variable.cpp.
| SV * detachMortalSV | ( | ) |
Nullify object and return mortalized SV.
Reference count not affected
Definition at line 77 of file variable.cpp.
|
friend |