浏览代码

Add development notification

Ole Krüger 10 年之前
父节点
当前提交
d517eaf177
共有 4 个文件被更改,包括 19 次插入19 次删除
  1. 2 2
      README.md
  2. 1 1
      lib/luwra.hpp
  3. 15 15
      lib/luwra/functions.hpp
  4. 1 1
      lib/luwra/usertypes.hpp

+ 2 - 2
README.md

@@ -1,6 +1,8 @@
 # Luwra
 # Luwra
 A header-only C++ library which provides a Lua wrapper with minimal overhead.
 A header-only C++ library which provides a Lua wrapper with minimal overhead.
 
 
+NOTE: Luwra is under heavy development the documentation might not be current.
+
 ## Usage
 ## Usage
 Most of Luwra's features are based on template specialization. If you are not familiar with
 Most of Luwra's features are based on template specialization. If you are not familiar with
 templates in C++, I highly recommend you inform yourself about them. Otherwise the following
 templates in C++, I highly recommend you inform yourself about them. Otherwise the following
@@ -97,5 +99,3 @@ lua_CFunction cfunc = WrapFunction<lua_Number(lua_Number, lua_Number), my_add>;
 
 
 ### User types
 ### User types
 Something is going be here soon.
 Something is going be here soon.
-
-Have a look at [the example](https://github.com/vapourismo/luwra/blob/master/examples/methods.cpp).

+ 1 - 1
lib/luwra.hpp

@@ -4,7 +4,7 @@
 #include "luwra/common.hpp"
 #include "luwra/common.hpp"
 #include "luwra/types.hpp"
 #include "luwra/types.hpp"
 #include "luwra/stack.hpp"
 #include "luwra/stack.hpp"
+#include "luwra/functions.hpp"
 #include "luwra/usertypes.hpp"
 #include "luwra/usertypes.hpp"
-#include "luwra/wrappers.hpp"
 
 
 #endif
 #endif

+ 15 - 15
lib/luwra/wrappers.hpp → lib/luwra/functions.hpp

@@ -4,8 +4,8 @@
  * Copyright (C) 2015, Ole Krüger <ole@vprsm.de>
  * Copyright (C) 2015, Ole Krüger <ole@vprsm.de>
  */
  */
 
 
-#ifndef LUWRA_WRAPPERS_H_
-#define LUWRA_WRAPPERS_H_
+#ifndef LUWRA_FUNCTIONS_H_
+#define LUWRA_FUNCTIONS_H_
 
 
 #include "common.hpp"
 #include "common.hpp"
 #include "types.hpp"
 #include "types.hpp"
@@ -24,37 +24,37 @@ namespace internal {
 
 
 	template <>
 	template <>
 	struct FunctionWrapper<void()> {
 	struct FunctionWrapper<void()> {
-		template <void(*funptr)()> static
-		int invoke(State*) {
-			funptr();
+		template <void(*FunctionPointer)()> static
+		int Invoke(State*) {
+			FunctionPointer();
 			return 0;
 			return 0;
 		}
 		}
 	};
 	};
 
 
 	template <typename R>
 	template <typename R>
 	struct FunctionWrapper<R()> {
 	struct FunctionWrapper<R()> {
-		template <R(*funptr)()> static
-		int invoke(State* state) {
-			return Value<R>::push(state, funptr());
+		template <R(*FunctionPointer)()> static
+		int Invoke(State* state) {
+			return Value<R>::push(state, FunctionPointer());
 		}
 		}
 	};
 	};
 
 
 	template <typename... A>
 	template <typename... A>
 	struct FunctionWrapper<void(A...)> {
 	struct FunctionWrapper<void(A...)> {
-		template <void (*funptr)(A...)> static
-		int invoke(State* state) {
-			apply(state, funptr);
+		template <void (*FunctionPointer)(A...)> static
+		int Invoke(State* state) {
+			apply(state, FunctionPointer);
 			return 0;
 			return 0;
 		}
 		}
 	};
 	};
 
 
 	template <typename R, typename... A>
 	template <typename R, typename... A>
 	struct FunctionWrapper<R(A...)> {
 	struct FunctionWrapper<R(A...)> {
-		template <R (*funptr)(A...)> static
-		int invoke(State* state) {
+		template <R (*FunctionPointer)(A...)> static
+		int Invoke(State* state) {
 			return Value<R>::push(
 			return Value<R>::push(
 				state,
 				state,
-				apply(state, funptr)
+				apply(state, FunctionPointer)
 			);
 			);
 		}
 		}
 	};
 	};
@@ -78,7 +78,7 @@ template <
 	S* FunctionPointer
 	S* FunctionPointer
 >
 >
 constexpr CFunction WrapFunction =
 constexpr CFunction WrapFunction =
-	&internal::FunctionWrapper<S>::template invoke<FunctionPointer>;
+	&internal::FunctionWrapper<S>::template Invoke<FunctionPointer>;
 
 
 LUWRA_NS_END
 LUWRA_NS_END
 
 

+ 1 - 1
lib/luwra/usertypes.hpp

@@ -10,7 +10,7 @@
 #include "common.hpp"
 #include "common.hpp"
 #include "types.hpp"
 #include "types.hpp"
 #include "stack.hpp"
 #include "stack.hpp"
-#include "wrappers.hpp"
+#include "functions.hpp"
 
 
 #include <sstream>
 #include <sstream>
 #include <utility>
 #include <utility>