Overriding __concat behavior

Teto <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hi there,

I'm doing everything I can to ease lua side debugging and for this purpose,
I need to override __tostring and __concat from C++.

I've succeeded in overriding tostring (followed the manual + looked on the
ml to see that if it didn't work with luabind::self, I could use const_self,
maybe that tip could go to the online tutorial)
.def( luabind::tostring(luabind::const_self) )

For __concat, I do that with a wrong prototype I guess ( std::string
CStaticBattery::concat() ):
        .def( "__concat",&CStaticBattery::concat )

Would the prototype : std::string CStaticBattery::concat(const std::string &
str1,const std::string& str2 ) work ?
What would be str1 and str2 ? Left and right ? like in print(
str1..myBatteryConcat..str2) ?

I will appreciate any example.


Thx

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar

_______________________________________________
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.