-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes: - add properties mechanism support in the LuaScripter ('endian' property only for now) - code splitting and refactoring - code comments
- Loading branch information
Showing
29 changed files
with
1,081 additions
and
384 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[submodule "external/Selene"] | ||
path = external/Selene | ||
url = /home/oleg/Downloads/Programming/Languages/Lua/Selene | ||
[submodule "external/sol"] | ||
path = external/sol | ||
url = /home/oleg/Downloads/Programming/Languages/Lua/sol | ||
[submodule "external/Catch"] | ||
path = external/Catch | ||
url = /home/okhryptul/Downloads/Programming/Languages/Lua/Catch | ||
[submodule "external/boost_endian"] | ||
path = external/boost_endian | ||
url = https://github.com/boostorg/endian.git |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* block_templ.h | ||
* | ||
* Created on: 25 жовт. 2014 | ||
* Author: oleg | ||
*/ | ||
|
||
#ifndef BLOCK_TEMPL_H_ | ||
#define BLOCK_TEMPL_H_ | ||
|
||
#include "block_templ_base.h" | ||
|
||
/** | ||
* Base class for the template structures declared via BD_TEMPL_DECL or BD_TEMPL macros. | ||
* Also it used directly for simple C datatypes (char, int, ... or plain structures). | ||
* | ||
* @param T Data type | ||
* @param simple_type true if | ||
*/ | ||
template<class T, bd_block_type _type = BD_TEMPL> | ||
class BlockTempl : public BlockTemplBase | ||
{ | ||
public: | ||
BlockTempl(bd_block_io* _blob, bd_cstring _var_name, bd_u32 _count, BlockTemplBase* _parent, const bd_property_records &props) | ||
: BlockTemplBase(_blob, _var_name, (bd_cstring) get_type_name<T>().c_str(), _type, sizeof(T), _count, _parent, props) | ||
{ | ||
} | ||
|
||
BlockTempl(bd_block_io* _block_io, bd_cstring _var_name, bd_cstring _type_name, bd_u32 _count, BlockTemplBase* _parent, const bd_property_records &props) | ||
: BlockTemplBase(_block_io, _var_name, _type_name, _type, sizeof(T), _count, _parent, props) | ||
{ | ||
} | ||
|
||
inline T value() | ||
{ | ||
return static_cast<T>(*this); | ||
} | ||
|
||
void apply() {} | ||
}; | ||
|
||
// Simple type templates | ||
#define BD_BLOCK_TYPE_DECL(name, tp) \ | ||
class name : public BlockTempl<name##_T, BD_##name> { \ | ||
public: name(bd_block_io* _block_io, bd_cstring _var_name, bd_u32 _count, BlockTemplBase* _parent, \ | ||
const bd_property_records &props) : \ | ||
BlockTempl(_block_io, _var_name, _count, _parent, props) {}}; | ||
BD_BLOCK_TYPES | ||
#undef BD_BLOCK_TYPE_DECL | ||
|
||
#endif /* BLOCK_TEMPL_H_ */ |
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
Oops, something went wrong.