1. Possible?
- Posted by Chris S <chris_saik at yahoo.com> Mar 03, 2006
- 403 views
If I were to write most of my app in C++, but yet I wanted to use Euphoria's database system to store my data, could I? If so, how? Can I use the Translator? Thanks! Chris
2. Re: Possible?
- Posted by Robert Craig <rds at RapidEuphoria.com> Mar 04, 2006
- 397 views
Chris S wrote: > If I were to write most of my app in C++, but yet I wanted to use Euphoria's > database system to store my data, could I? If so, how? Can I use the > Translator? I've tested database.e, converted to a .dll, and it worked fine, but I was interacting with it from a Euphoria program that opened the .dll. A C or C++ program could also interact with database.e in .dll form, but you'd need to convert C's rigid datatypes into Euphoria sequences and back again. I guess you could build a Euphoria layer (wrapper) around database.e that would take pointers to C data in memory and convert the C data into atoms and sequences. It would also have to convert the Euphoria data coming out of the database back into C data. The translator would be useful for making the .dll. In general, the translator can allow you to convert Euphoria code into C code that you might be able to link with your hand-coded C/C++ code. That's the way the Euphoria 2.5 interpreter is built. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Possible?
- Posted by Brian Broker <brian_broker at yahoo.com> Mar 04, 2006
- 408 views
Robert Craig wrote: > > Chris S wrote: > > If I were to write most of my app in C++, but yet I wanted to use Euphoria's > > database system to store my data, could I? If so, how? Can I use the > > Translator? > > I've tested database.e, converted to a .dll, and it worked fine, > but I was interacting with it from a Euphoria program that opened > the .dll. A C or C++ program could also interact with database.e > in .dll form, but you'd need to convert C's rigid datatypes into > Euphoria sequences and back again. I guess you could build > a Euphoria layer (wrapper) around database.e that would take pointers to > C data in memory and convert the C data into atoms and sequences. > It would also have to convert the Euphoria data coming out of the > database back into C data. The translator would be useful for making > the .dll. In general, the translator can allow you to convert Euphoria code > into C code that you might be able to link with your hand-coded C/C++ code. > That's the way the Euphoria 2.5 interpreter is built. > > Regards, > Rob Craig > Rapid Deployment Software > <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a> Of course, anything's "possible" if you put your mind to it. It just depends on whether the time spent on developing such a solution is worth it. If you are already developing most of your code as object-oriented, why wouldn't you use a pre-existing OO DB system? I'm just trying to grasp Chris' concept. -- Brian