MCPcopy Create free account
hub / github.com/DentonW/DevIL / StringAutoMarshal

Class StringAutoMarshal

DevIL/bindings/DotNet/DevIL.NET.cpp:38–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace DevIL
37{
38 class StringAutoMarshal
39 {
40 char* m_string;
41
42 inline explicit StringAutoMarshal(const StringAutoMarshal& i_Source) : m_string(NULL) {}
43 inline StringAutoMarshal& operator= (const StringAutoMarshal& i_Source) {}
44
45 public:
46 inline explicit StringAutoMarshal(const System::String __gc* i_strString) : m_string(NULL)
47 {
48 m_string = (char*)(void*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(const_cast<System::String __gc*>(i_strString));
49 }
50
51
52 inline ~StringAutoMarshal()
53 {
54 System::Runtime::InteropServices::Marshal::FreeHGlobal((void*)m_string);
55 }
56
57 inline char* GetNativeString()
58 {
59 return m_string;
60 }
61
62 inline operator char*()
63 {
64 return m_string;
65 }
66 };
67
68 public __value enum DevILScaleFilter
69 {

Callers 2

LoadBitmapAndScaleMethod · 0.85
SaveBitmapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected