Re: is it possible to obtain registed classes and functions list of a lua state?

Iliya Trendafilov <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Just for the record, you can also do that in luabind 0.8.1

On Mon, Nov 16, 2009 at 8:20 PM, Evan <[email protected]> wrote:
> Using luabind 0.9, you can iterate methods and properties of a class.  You can get it from github (http://github.com/luabind/luabind); there probably will be an official release before the year ends.
>
> In your C++ code, you need to do call this after luabind::open :
> luabind::bind_class_info(lua_State* L)
>
> Here's what you can do in Lua:
>
> c = class_info(Timeval())
> print(c.name)
> -- Timeval
> for k,v in pairs(c.attributes) do print(k,v) end
> -- 1    number
> -- 2    usec
> ---3    sec
>
> -- Here is the class_info for class_info
> c = class_info(class_info(Timeval()))
> print(c.name)
> -- class_info_data
> for k,v in pairs(c.attributes) do print(k,v) end
> -- 1    attributes
> -- 2    name
> -- 3    methods
> for k,v in pairs(c.methods) do print(k,v) end
>
>
> What's missing is the ability to know what the list of actual luabinded (luabound?) classes are -- you need to know a priori.   That would be make sense to add... I'll look at generating a patch to do that.
>
> Regards,
> Evan
>
>
> [email protected] wrote:
>> i`m binding a framework with lots of classes and functions into lua via
>> luabind,and i`m currently worry about the user experience so i decide to
>> work out a real time helping system like visual studio`s intelligence
>> sense in my application`s script editor,so first i need a trick to
>> obtain some information such as how many classes and functions are
>> registered into a lua_state and what are these and what`s everyone`s
>> signature,etc.is <http://etc.is> there any way to done this job?i
>> checked out the luabind document carefully,hope there may be some
>> callbacks to notice me anything when it doing registering works,but i
>> finally got nothing.
>> do i missed some important part or are there some tricks to solve my
>> problem?
>> thanks for any help.
>>
>>
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
>> trial. Simplify your report design, integration and deployment - and focus on
>> what you do best, core application coding. Discover what's new with
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> luabind-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/luabind-user
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.