wrappers

C function decorators (wrappers) at compile time

I'm trying to change the behaviour of some functions in C with help of the preprocessor; and also add optional parameters that can be set on or off... The basic pattern for the optional parameters is easy: #ifdef OPT_PARAM #define my_func(a, b, opt) _my_func(a, b, opt) #else #define my_func(a, b, opt) _my_func(a, b) #endif /*the r...

Wrap a variable parameter function in C++

I would like to wrap the xmlrpc "call" function (which takes a variable number of parameters) with another function (also taking a variable number of parameters). I would like to simply forward the variable number of parameters I get passed in to my wrapper function to the xmlrpc "call" function. I know how to use va_start and va_arg, b...

Can't get SFTP to work in PHP

I am writing a simple SFTP client in PHP because we have the need to programatically retrieve files via n remote servers. I am using the PECL SSH2 extension. I have run up against a road block, though. The documentation on php.net suggests that you can do this: $stream = fopen("ssh2.sftp://$sftp/path/to/file", 'r'); However, I have...

Cross platform SQL? (sqlite+mysql+tsql)

Is there a cross platform solution for sql? My prototype was in sqlite. I am switching to a server that offers tsql and i was considering mysql in the past for my webservers(maybe i should stick to tsql and sqlite). I am wondering if theres a .NET lib that allows me to write sql compatible with all. Some annoyance i had was in create ta...

C++ standard/de facto STL algorithm wrappers.

hello Are there any standard/de facto standard (boost) wrappers around standard algorithms which work with containers defining begin and end. Let me show you what I mean with the code: // instead of specifying begin and end std::copy(vector.begin(), vector.end(), output); // write as xxx::copy(vector, output); I know it can be writte...

Java wrapper classes. Casting.

Is there a name for when you convert a primitive to an object using wrapper classes? Im assuming this is also called casting correct? ...

Passing Joda Time objects between the App layers

I'm considering using Joda Time. I'm wondering if I should pay attention of what type of object my Interfaces are returning. Returning Joda Objects from my interface signature on the service layer means that every module that use it will have be dependent on jodaTime instead of the common Date API. Are you passing Joda objects around you...

C# wrapper for array of three pointers

I'm currently working on a C# wrapper to work with Dallmeier Common API light. See previous posting: http://stackoverflow.com/questions/2430089/c-wrapper-and-callbacks I've got pretty much everything 'wrapped' but I'm stuck on wrapping a callback which contains an array of three pointers & an array integers: dlm_setYUVDataCllback in...

Building C# Wrapper around C++ lib files.

Hello All, I have couple of lib files and I want to use in my project. How to build the C# Wrapper around C++ lib files. Any weblink or any tutorial you know, please send me. Thanks in advance. Harsha ...

C++ DLL causes error when specific method called from .NET wrapper

I have this C++ dll where i created a wrapper with PInvoker. This small app is working great on my development pc with windows 7 64 bit. But soon as i try to work the release on a xp machine and when a specific action is happening it throws an error that the device is not ready. The dll is managing a serial device, where in all other act...

writing a wrapper for a programming language

I want to write a ruby wrapper swi-prolog. Can anyone please tell me how to proceed with writing one? I would appreciate if anyone please explain me what steps need to be considered while attempting to write this sort. ...