Created
June 21, 2017 03:11
-
-
Save CodeMouse92/89fcc55f7433ce59e2b8fd7424c09e6b to your computer and use it in GitHub Desktop.
IOChannel Memory Dump Demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pawlib/iochannel.hpp" | |
using namespace pawlib; | |
using namespace pawlib::ioformat; | |
class SomeMagicThing | |
{ | |
public: | |
SomeMagicThing(int n1, int n2, bool b1) | |
:foo(n1), bar(n2), baz(b1) | |
{} | |
~SomeMagicThing(){} | |
private: | |
int foo; | |
int bar; | |
bool baz; | |
}; | |
int main() | |
{ | |
SomeMagicThing* thingy = new SomeMagicThing(123, 456, true); | |
ioc << "The memory at " << fg_green << ta_bold << ptr_address << thingy << io_send; | |
ioc << " is: " << io_send; | |
ioc << fg_blue << ta_bold << num_upper << mem_allsep | |
<< ptr_memory << read_size(sizeof(SomeMagicThing)) << thingy << io_end; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment