forked from luabind/luabind
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
109 additions
and
116 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
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
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 |
---|---|---|
|
@@ -457,7 +457,7 @@ namespace luabind | |
{ | ||
context[name] = property(get_); | ||
} | ||
|
||
Set set; | ||
SetPolicies set_policies; | ||
Get get; | ||
|
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
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
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
/** @file | ||
@brief Header | ||
@brief Header | ||
@date 2012 | ||
@date 2012 | ||
@author | ||
Ryan Pavlik | ||
<[email protected]> and <[email protected]> | ||
http://academic.cleardefinition.com/ | ||
Iowa State University Virtual Reality Applications Center | ||
Human-Computer Interaction Graduate Program | ||
@author | ||
Ryan Pavlik | ||
<[email protected]> and <[email protected]> | ||
http://academic.cleardefinition.com/ | ||
Iowa State University Virtual Reality Applications Center | ||
Human-Computer Interaction Graduate Program | ||
*/ | ||
|
||
// Copyright Iowa State University 2012. | ||
|
@@ -48,7 +48,7 @@ | |
|
||
namespace luabind { | ||
|
||
LUABIND_API int bind_function_introspection(lua_State * L); | ||
LUABIND_API int bind_function_introspection(lua_State * L); | ||
|
||
} // end of namespace luabind | ||
|
||
|
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 |
---|---|---|
|
@@ -35,4 +35,3 @@ struct lua_State; | |
#endif | ||
|
||
#endif // LUABIND_BACK_REFERENCE_FWD_040510_HPP | ||
|
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
/** @file | ||
@brief Header | ||
@brief Header | ||
@date 2012 | ||
@date 2012 | ||
@author | ||
Ryan Pavlik | ||
<[email protected]> and <[email protected]> | ||
http://academic.cleardefinition.com/ | ||
Iowa State University Virtual Reality Applications Center | ||
Human-Computer Interaction Graduate Program | ||
@author | ||
Ryan Pavlik | ||
<[email protected]> and <[email protected]> | ||
http://academic.cleardefinition.com/ | ||
Iowa State University Virtual Reality Applications Center | ||
Human-Computer Interaction Graduate Program | ||
*/ | ||
|
||
// Copyright Iowa State University 2012. | ||
|
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
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
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/** | ||
@file | ||
@brief Implementation | ||
@file | ||
@brief Implementation | ||
@date 2012 | ||
@date 2012 | ||
@author | ||
Ryan Pavlik | ||
<[email protected]> and <[email protected]> | ||
http://academic.cleardefinition.com/ | ||
Iowa State University Virtual Reality Applications Center | ||
Human-Computer Interaction Graduate Program | ||
@author | ||
Ryan Pavlik | ||
<[email protected]> and <[email protected]> | ||
http://academic.cleardefinition.com/ | ||
Iowa State University Virtual Reality Applications Center | ||
Human-Computer Interaction Graduate Program | ||
*/ | ||
|
||
// Copyright Iowa State University 2012. | ||
|
@@ -55,56 +55,56 @@ | |
namespace luabind { | ||
|
||
namespace { | ||
detail::function_object* get_function_object(argument const& fn) { | ||
lua_State * L = fn.interpreter(); | ||
{ | ||
fn.push(L); | ||
detail::stack_pop pop(L, 1); | ||
if (!detail::is_luabind_function(L, -1)) { | ||
return NULL; | ||
} | ||
} | ||
return *touserdata<detail::function_object*>(getupvalue(fn, 1)); | ||
} | ||
|
||
std::string get_function_name(argument const& fn) { | ||
detail::function_object * f = get_function_object(fn); | ||
if (!f) { | ||
return ""; | ||
} | ||
return f->name; | ||
} | ||
|
||
object get_function_overloads(argument const& fn) { | ||
lua_State * L = fn.interpreter(); | ||
detail::function_object * fobj = get_function_object(fn); | ||
if (!fobj) { | ||
return object(); | ||
} | ||
object overloadTable(newtable(L)); | ||
int count = 1; | ||
const char * function_name = fobj->name.c_str(); | ||
for (detail::function_object const* f = fobj; f != 0; f = f->next) | ||
detail::function_object* get_function_object(argument const& fn) { | ||
lua_State * L = fn.interpreter(); | ||
{ | ||
fn.push(L); | ||
detail::stack_pop pop(L, 1); | ||
if (!detail::is_luabind_function(L, -1)) { | ||
return NULL; | ||
} | ||
} | ||
return *touserdata<detail::function_object*>(getupvalue(fn, 1)); | ||
} | ||
|
||
std::string get_function_name(argument const& fn) { | ||
detail::function_object * f = get_function_object(fn); | ||
if (!f) { | ||
return ""; | ||
} | ||
return f->name; | ||
} | ||
|
||
object get_function_overloads(argument const& fn) { | ||
lua_State * L = fn.interpreter(); | ||
detail::function_object * fobj = get_function_object(fn); | ||
if (!fobj) { | ||
return object(); | ||
} | ||
object overloadTable(newtable(L)); | ||
int count = 1; | ||
const char * function_name = fobj->name.c_str(); | ||
for (detail::function_object const* f = fobj; f != 0; f = f->next) | ||
{ | ||
f->format_signature(L, function_name); | ||
detail::stack_pop pop(L, 1); | ||
overloadTable[count] = object(from_stack(L, -1)); | ||
|
||
++count; | ||
} | ||
/// @todo | ||
return overloadTable; | ||
} | ||
/// @todo | ||
|
||
return overloadTable; | ||
} | ||
|
||
} | ||
|
||
LUABIND_API int bind_function_introspection(lua_State * L) { | ||
module(L, "function_info")[ | ||
def("get_function_overloads", &get_function_overloads), | ||
def("get_function_name", &get_function_name) | ||
]; | ||
return 0; | ||
module(L, "function_info")[ | ||
def("get_function_overloads", &get_function_overloads), | ||
def("get_function_name", &get_function_name) | ||
]; | ||
return 0; | ||
} | ||
|
||
} // end of namespace luabind |
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ namespace luabind | |
LUABIND_API self_type self; | ||
LUABIND_API const_self_type const_self; | ||
} | ||
|
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
/** | ||
@file | ||
@brief Implementation | ||
@file | ||
@brief Implementation | ||
@date 2012 | ||
@date 2012 | ||
@author | ||
Ryan Pavlik | ||
<[email protected]> and <[email protected]> | ||
http://academic.cleardefinition.com/ | ||
Iowa State University Virtual Reality Applications Center | ||
Human-Computer Interaction Graduate Program | ||
@author | ||
Ryan Pavlik | ||
<[email protected]> and <[email protected]> | ||
http://academic.cleardefinition.com/ | ||
Iowa State University Virtual Reality Applications Center | ||
Human-Computer Interaction Graduate Program | ||
*/ | ||
|
||
// Copyright Iowa State University 2012. | ||
|
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
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.