浏览代码

Update README

Ole Krüger 10 年之前
父节点
当前提交
1fdd7a3e7e
共有 1 个文件被更改,包括 6 次插入24 次删除
  1. 6 24
      README.md

+ 6 - 24
README.md

@@ -4,7 +4,7 @@ A header-only C++ library which provides a Lua wrapper with minimal overhead.
 ## 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
-examples will have no use to you.
+examples will not be of use to you.
 
 
 ### Types
 ### Types
 A template `Value<T>` exists to capsulate push and check mechanisms for a type `T`. Default
 A template `Value<T>` exists to capsulate push and check mechanisms for a type `T`. Default
@@ -38,7 +38,7 @@ struct Value<T> {
 };
 };
 ```
 ```
 
 
-Have a look at the [type example](https://github.com/vapourismo/luwra/blob/master/examples/types.cpp).
+[Example](https://github.com/vapourismo/luwra/blob/master/examples/types.cpp)
 
 
 ### Stack
 ### Stack
 Instead of retrieving each value from the stack seperately, you can make use of `apply` which lets
 Instead of retrieving each value from the stack seperately, you can make use of `apply` which lets
@@ -47,7 +47,7 @@ you invoke a function, whose parameters map to the stack layout, using the stack
 Assuming your stack looks like this
 Assuming your stack looks like this
 
 
 Position | Value
 Position | Value
----------|--------------------
+---------|-----------
  3       | c = 42.32
  3       | c = 42.32
  2       | b = 73.31
  2       | b = 73.31
  1       | a = 13.37
  1       | a = 13.37
@@ -74,11 +74,11 @@ lua_Integer result = foo(
 );
 );
 ```
 ```
 
 
-There is a [complete example](https://github.com/vapourismo/luwra/blob/master/examples/stack.cpp).
+[Example](https://github.com/vapourismo/luwra/blob/master/examples/stack.cpp)
 
 
 ### Functions
 ### Functions
 Luwra's core feature is to wrap C/C++ functions so they can be used with the Lua VM.
 Luwra's core feature is to wrap C/C++ functions so they can be used with the Lua VM.
-
+All it takes is the signature of the function you want to wrap and a pointer to it.
 Wrapping them is as easy as this:
 Wrapping them is as easy as this:
 
 
 ```c++
 ```c++
@@ -93,25 +93,7 @@ lua_Number my_add(lua_Number a, lua_Number b) {
 lua_CFunction cfunc = WrapFunction<lua_Number(lua_Number, lua_Number), my_add>;
 lua_CFunction cfunc = WrapFunction<lua_Number(lua_Number, lua_Number), my_add>;
 ```
 ```
 
 
-All it takes is the signature of the function you want to wrap and a pointer to it.
-See [another example](https://github.com/vapourismo/luwra/blob/master/examples/functions.cpp).
-
-### Methods
-Method-wrapping works analogously to the wrapping of functions.
-
-```c++
-// A meta table name is needed
-const char* MyClass::MetatableName = "MyClass";
-
-// The method to be wrapped
-lua_Number MyClass::my_method(lua_Number a, lua_Number b) {
-	// ...
-}
-
-// ...
-
-lua_CFunction cfunc = WrapMethod<MyClass, lua_Number(lua_Number, lua_Number), &MyClass::my_method>;
-```
+[Example](https://github.com/vapourismo/luwra/blob/master/examples/functions.cpp)
 
 
 ### User types
 ### User types
 Something is going be here soon.
 Something is going be here soon.