Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > scripting C++

Thread Tools

scripting C++

christopher diggins
Posts: n/a
Using the OOTL (Object Oriented Template Library, ) it
would very feasable to write a scripting engine for C++ programs.

The way this hypothetical engine would work is that any OOTL object (that is
an object containing the OOTL_DEF_OBJECT macro) could be exposed along with
an interface written using the BIL (Boost Interfaces Library) IDL
(Interfaces Description Language).

Using the scripting library, would look like this (pardon any C++ usage

CppScriptEngine theEngine;

std::list<ootl::String> gList;

class MyClass {
void Push(ool::String x) {

BOOST_IDL_FN0(Push, void, (ootl::String, x))

int main() {
theEngine.Expose("MyClass", MyClass, IMyInterface);
while (!gList.empty()) {
std::cout << gList.back() << std::endl;
return 0;

When this program is run, it would go into a console mode, where it would
allow a limited C++ syntax, and support the core OOTL objects, i.e. Int,
Bool, Char, String, etc. So a possible user session might look like this:

String s = "hello";
MyClass m;

Does this kind of tool (open-source of course) interest anyone? Anyone
potentially interested in collaborating?

Christopher Diggins

[ See for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting wireless setup for automated deployment Wireless Networking 0 09-29-2005 02:17 PM
Using a Scripting Language as Your Scripting Language DaveInSidney Python 0 05-09-2005 03:13 AM
Python is the best and most popular general purpose scripting language; the universal scripting language Ron Stephens Python 23 04-12-2004 05:32 PM scripting Wilfredo Perez ASP .Net 1 02-24-2004 12:04 PM
Scripting and Mozilla Browser BillM Firefox 0 09-24-2003 04:11 PM