libqi  1.12
Namespaces | Defines | Typedefs | Functions
qi general

Namespaces

namespace  qi
 

SDKLayout implementation.


Defines

#define QI_API_LEVEL   1
 Define the API version of the Platform.

Typedefs

typedef std::codecvt< wchar_t,
char, std::mbstate_t > 
qi::codecvt_type
 standard std::codecvt accept by STL and boost. typedef for std::codecvt<wchar_t, char, std::mbstate_t> could be used with boost::filesystem::path or std::locale.

Functions

QI_API const codecvt_type & qi::unicodeFacet ()
 utf8 facet
QI_API void qi::init (int argc, char *argv[])
 Store argc and argv.
QI_API int qi::argc ()
 Get argc.
QI_API const char ** qi::argv ()
 Get argv.
QI_API const char * qi::program ()
 Return the current program.Computed using specific OS API:

Detailed Description

Various functions.


Define Documentation

#define QI_API_LEVEL   1

Define the API version of the Platform.

Version Mapping

API Level Version
0 / undefined Pre 1.12 release
1 NAOqi release 1.12

Definition at line 30 of file config.hpp.


Function Documentation

QI_API int qi::argc ( )

Get argc.

Returns:
return argc if qi::init is call, -1 otherwise
Examples:
boost_filesystem_example.cpp, log_example.cpp, qiconvloc_example.cpp, and qipath_example.cpp.
const char ** qi::argv ( )

Get argv.

Returns:
return argv if qi::init is call, NULL otherwise
Examples:
boost_filesystem_example.cpp, log_example.cpp, qiconvloc_example.cpp, and qipath_example.cpp.
const char * qi::program ( )

Return the current program.Computed using specific OS API:

  • Apple : _NSGetExecutablePath
  • Linux : reading "/proc/self/exe"
  • Windows: GetModuleFileName

If the former API fail it will try to guess the value from argv[0]. For this method to work qi::init(argc, argv) should have been called in the main.

Returns:
full path to the current running program
const codecvt_type & qi::unicodeFacet ( )

utf8 facet

return a facet object that can be used by stl (iostream, locale, ..) and std::locale compliant library like boost::filesystem.

this class allow convertion between utf8(char) and utf16/32(wchar).

Returns:
utf8 implementation for std::codecvt<wchar_t, char, std::mbstate_t>
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines