source.binding.hpp (9024B)
1 // Auto generated code, do not edit. See gen_binding in project root. 2 #ifndef LIBSHIT_BINDING_GENERATOR 3 #if LIBSHIT_WITH_LUA 4 #include <libshit/lua/user_type.hpp> 5 6 7 const char ::Neptools::Source::TYPE_NAME[] = "neptools.source"; 8 9 const char ::Neptools::DumpableSource::TYPE_NAME[] = "neptools.dumpable_source"; 10 11 namespace Libshit::Lua 12 { 13 14 // class neptools.source 15 template<> 16 void TypeRegisterTraits<::Neptools::Source>::Register(TypeBuilder& bld) 17 { 18 19 bld.AddFunction< 20 &::Libshit::Lua::TypeTraits<::Neptools::Source>::Make<LuaGetRef<::Neptools::Source>, LuaGetRef<::Neptools::FilePosition>, LuaGetRef<::Neptools::FilePosition>> 21 >("new"); 22 bld.AddFunction< 23 static_cast<::Neptools::Source (*)(const ::boost::filesystem::path &)>(::Neptools::Source::FromFile) 24 >("from_file"); 25 bld.AddFunction< 26 static_cast<::Neptools::Source (*)(std::string)>(::Neptools::Source::FromMemory), 27 static_cast<::Neptools::Source (*)(::boost::filesystem::path, std::string)>(::Neptools::Source::FromMemory) 28 >("from_memory"); 29 bld.AddFunction< 30 static_cast<void (::Neptools::Source::*)(::Neptools::FilePosition, ::Neptools::FilePosition) noexcept>(&::Neptools::Source::Slice<Check::Throw>) 31 >("slice"); 32 bld.AddFunction< 33 static_cast<::Neptools::FilePosition (::Neptools::Source::*)() const noexcept>(&::Neptools::Source::GetOffset) 34 >("get_offset"); 35 bld.AddFunction< 36 static_cast<::Neptools::FilePosition (::Neptools::Source::*)() const noexcept>(&::Neptools::Source::GetOrigSize) 37 >("get_orig_size"); 38 bld.AddFunction< 39 static_cast<const ::boost::filesystem::path & (::Neptools::Source::*)() const noexcept>(&::Neptools::Source::GetFileName) 40 >("get_file_name"); 41 bld.AddFunction< 42 static_cast<::Neptools::FilePosition (::Neptools::Source::*)() const noexcept>(&::Neptools::Source::GetSize) 43 >("get_size"); 44 bld.AddFunction< 45 static_cast<void (::Neptools::Source::*)(::Neptools::FilePosition) noexcept>(&::Neptools::Source::Seek<Check::Throw>) 46 >("seek"); 47 bld.AddFunction< 48 static_cast<::Neptools::FilePosition (::Neptools::Source::*)() const noexcept>(&::Neptools::Source::Tell) 49 >("tell"); 50 bld.AddFunction< 51 static_cast<::Neptools::FilePosition (::Neptools::Source::*)() const noexcept>(&::Neptools::Source::GetRemainingSize) 52 >("get_remaining_size"); 53 bld.AddFunction< 54 static_cast<bool (::Neptools::Source::*)() const noexcept>(&::Neptools::Source::Eof) 55 >("eof"); 56 bld.AddFunction< 57 static_cast<void (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::CheckSize) 58 >("check_size"); 59 bld.AddFunction< 60 static_cast<void (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::CheckRemainingSize) 61 >("check_remaining_size"); 62 bld.AddFunction< 63 static_cast<std::uint8_t (::Neptools::Source::*)(::Neptools::Endian)>(&::Neptools::Source::ReadUint8<Check::Throw>) 64 >("read_uint8"); 65 bld.AddFunction< 66 static_cast<std::uint8_t (::Neptools::Source::*)(::Neptools::FilePosition, ::Neptools::Endian)>(&::Neptools::Source::PreadUint8<Check::Throw>) 67 >("pread_uint8"); 68 bld.AddFunction< 69 static_cast<std::uint8_t (::Neptools::Source::*)()>(&::Neptools::Source::ReadLittleUint8<Check::Throw>) 70 >("read_little_uint8"); 71 bld.AddFunction< 72 static_cast<std::uint8_t (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadLittleUint8<Check::Throw>) 73 >("pread_little_uint8"); 74 bld.AddFunction< 75 static_cast<std::uint8_t (::Neptools::Source::*)()>(&::Neptools::Source::ReadBigUint8<Check::Throw>) 76 >("read_big_uint8"); 77 bld.AddFunction< 78 static_cast<std::uint8_t (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadBigUint8<Check::Throw>) 79 >("pread_big_uint8"); 80 bld.AddFunction< 81 static_cast<std::uint16_t (::Neptools::Source::*)(::Neptools::Endian)>(&::Neptools::Source::ReadUint16<Check::Throw>) 82 >("read_uint16"); 83 bld.AddFunction< 84 static_cast<std::uint16_t (::Neptools::Source::*)(::Neptools::FilePosition, ::Neptools::Endian)>(&::Neptools::Source::PreadUint16<Check::Throw>) 85 >("pread_uint16"); 86 bld.AddFunction< 87 static_cast<std::uint16_t (::Neptools::Source::*)()>(&::Neptools::Source::ReadLittleUint16<Check::Throw>) 88 >("read_little_uint16"); 89 bld.AddFunction< 90 static_cast<std::uint16_t (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadLittleUint16<Check::Throw>) 91 >("pread_little_uint16"); 92 bld.AddFunction< 93 static_cast<std::uint16_t (::Neptools::Source::*)()>(&::Neptools::Source::ReadBigUint16<Check::Throw>) 94 >("read_big_uint16"); 95 bld.AddFunction< 96 static_cast<std::uint16_t (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadBigUint16<Check::Throw>) 97 >("pread_big_uint16"); 98 bld.AddFunction< 99 static_cast<std::uint32_t (::Neptools::Source::*)(::Neptools::Endian)>(&::Neptools::Source::ReadUint32<Check::Throw>) 100 >("read_uint32"); 101 bld.AddFunction< 102 static_cast<std::uint32_t (::Neptools::Source::*)(::Neptools::FilePosition, ::Neptools::Endian)>(&::Neptools::Source::PreadUint32<Check::Throw>) 103 >("pread_uint32"); 104 bld.AddFunction< 105 static_cast<std::uint32_t (::Neptools::Source::*)()>(&::Neptools::Source::ReadLittleUint32<Check::Throw>) 106 >("read_little_uint32"); 107 bld.AddFunction< 108 static_cast<std::uint32_t (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadLittleUint32<Check::Throw>) 109 >("pread_little_uint32"); 110 bld.AddFunction< 111 static_cast<std::uint32_t (::Neptools::Source::*)()>(&::Neptools::Source::ReadBigUint32<Check::Throw>) 112 >("read_big_uint32"); 113 bld.AddFunction< 114 static_cast<std::uint32_t (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadBigUint32<Check::Throw>) 115 >("pread_big_uint32"); 116 bld.AddFunction< 117 static_cast<std::uint64_t (::Neptools::Source::*)(::Neptools::Endian)>(&::Neptools::Source::ReadUint64<Check::Throw>) 118 >("read_uint64"); 119 bld.AddFunction< 120 static_cast<std::uint64_t (::Neptools::Source::*)(::Neptools::FilePosition, ::Neptools::Endian)>(&::Neptools::Source::PreadUint64<Check::Throw>) 121 >("pread_uint64"); 122 bld.AddFunction< 123 static_cast<std::uint64_t (::Neptools::Source::*)()>(&::Neptools::Source::ReadLittleUint64<Check::Throw>) 124 >("read_little_uint64"); 125 bld.AddFunction< 126 static_cast<std::uint64_t (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadLittleUint64<Check::Throw>) 127 >("pread_little_uint64"); 128 bld.AddFunction< 129 static_cast<std::uint64_t (::Neptools::Source::*)()>(&::Neptools::Source::ReadBigUint64<Check::Throw>) 130 >("read_big_uint64"); 131 bld.AddFunction< 132 static_cast<std::uint64_t (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadBigUint64<Check::Throw>) 133 >("pread_big_uint64"); 134 bld.AddFunction< 135 static_cast<std::string (::Neptools::Source::*)()>(&::Neptools::Source::ReadCString) 136 >("read_cstring"); 137 bld.AddFunction< 138 static_cast<std::string (::Neptools::Source::*)(::Neptools::FilePosition) const>(&::Neptools::Source::PreadCString) 139 >("pread_cstring"); 140 bld.AddFunction< 141 static_cast<void (::Neptools::Source::*)(::Neptools::Sink &) const>(&::Neptools::Source::Dump) 142 >("dump"); 143 bld.AddFunction< 144 static_cast<std::string (::Neptools::Source::*)() const>(&::Neptools::Source::Inspect) 145 >("inspect"); 146 bld.AddFunction< 147 static_cast<::Libshit::Lua::RetNum (*)(::Libshit::Lua::StateRef, ::Neptools::Source &, ::Neptools::FileMemSize)>(&Neptools::LuaRead) 148 >("read"); 149 bld.AddFunction< 150 static_cast<::Libshit::Lua::RetNum (*)(::Libshit::Lua::StateRef, ::Neptools::Source &, ::Neptools::FilePosition, ::Neptools::FileMemSize)>(&Neptools::LuaPread) 151 >("pread"); 152 153 } 154 static TypeRegister::StateRegister<::Neptools::Source> libshit_lua_statereg_1be8afd5e97d75555318af0d8a7f447718626c80aab25db7af2b06ad5cd3c49a; 155 156 // class neptools.dumpable_source 157 template<> 158 void TypeRegisterTraits<::Neptools::DumpableSource>::Register(TypeBuilder& bld) 159 { 160 bld.Inherit<::Neptools::DumpableSource, ::Neptools::Dumpable>(); 161 162 bld.AddFunction< 163 &::Libshit::Lua::TypeTraits<::Neptools::DumpableSource>::Make<LuaGetRef<const ::Neptools::Source &>, LuaGetRef<::Neptools::FilePosition>, LuaGetRef<::Neptools::FilePosition>>, 164 &::Libshit::Lua::TypeTraits<::Neptools::DumpableSource>::Make<LuaGetRef<const ::Neptools::Source &>> 165 >("new"); 166 bld.AddFunction< 167 static_cast<::Neptools::Source (::Neptools::DumpableSource::*)() const noexcept>(&::Neptools::DumpableSource::GetSource) 168 >("get_source"); 169 170 } 171 static TypeRegister::StateRegister<::Neptools::DumpableSource> libshit_lua_statereg_ac8926b869872034735ec57943fe7fae76ad8b985424f4b7280bcd903772d84f; 172 173 } 174 #endif 175 #endif