W3cubDocs

/Haxe C++

Lib

package cpp

Available on cpp

Platform-specific Cpp Library. Provides some platform-specific functions for the C++ target, such as conversion from Haxe types to native types and vice-versa.

Static methods

static _loadPrime (lib:String, prim:String, signature:String, quietFail:Bool = false):Dynamic

static inline bytesReference (s:String):Bytes

Returns bytes referencing the content of a string. Use with extreme caution - changing constant strings will crash. Changing one string can cause others to change unexpectedly. Only really safe if you are using it read-only or if it comes from stringReference above

static getBinDirectory ():String

static getDllExtension ():String

static haxeToNeko (v:Dynamic):Dynamic

This function is used to make porting from neko to cpp easy. It does not need to do anything because the c-code can work with any Dynamic

static load (lib:String, prim:String, nargs:Int):Dynamic

Load and return a Cpp primitive from a DLL library.

static loadLazy (lib:Unknown, prim:Unknown, nargs:Int):Dynamic

Tries to load, and always returns a valid function, but the function may throw if called.

static nekoToHaxe (v:Dynamic):Dynamic

This function is used to make porting from neko to cpp easy. It does not need to do anything because the c-code can work with any Dynamic

static print (v:Dynamic):Void

Print the specified value on the default output.

static println (v:Dynamic):Void

Print the specified value on the default output followed by a newline character.

static pushDllSearchPath (inPath:String):Void

static inline rethrow (inExp:Dynamic):Void

static setFloatFormat (inFormat:String):Void

static stringReference (inBytes:Bytes):String

static unloadAllLibraries ():Int

Unloaded all dynamic libraries in reverse order of loading. Returns the number of libraries unloaded.

© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/cpp/Lib.html