With the release of version 0.9.0, Environs underwent major changes which provide:
- Change static API to object API which allows multiple instances of Environs objects to manage multiple application areas as the same time
- CPP API which provides an object oriented interface for pure c++ projects (requires c++11)
- Provide support and solutions for Visual Studio 2015
- There are much more features and changes under the hood. However, as long as you made use of the Object API, there’s no need to update the code further.
- With release 0.9.0, the RAW API of Environs got a new parameter to indicate a particular instance. The implementation of the Object API shows how to obtain and maintain instance handles.
The CPP API provides interface objects and enables the use of different c-runtimes at client code and framework code. This feature makes use of c++11 smart pointers to maintain memory allocation and disposal “at the right runtime side”.
We provide two simple examples (WindowsWin32, ChatApp.CPP) for the Windows platform which show how to use Environs from pure c++ client code. You may statically link against the framework library or use the object loader provided in Environs.Loader.cpp. The latter dynamically loads the framework library at runtime, creates an Environs object, and returns a smart pointer to the object interface. Client code therefore does not need to care about releasing memory or resources allocated for the object. Both features also provide the benefit that client code may use an arbitrary c-runtime (CRT) without having to care about the c-runtime of the framework library.
For iOS and OSX platforms, you may choose between the Objective-C or the CPP API. In order to show this, we provided CPP API examples in addition to the Objective-C examples in the iOSX folder.
The Objective-C API is actually a thin wrapper around the CPP API and connects the ARC (Automatic Reference Counting) of iOS/OSX projects with the object lifecycle management of the CPP API.
The tutorials and documentation will be updated soon to reflect the API changes.