TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iLang Struct Referenceabstract
Inheritance diagram for iLang:
iUnknown

Platform

virtual iOSProcessManagerGetProcessManager () const =0
 Get the platform's process manager. {Property}. More...
 
virtual void Exit (tU32 aulErrorCode)=0
 Forcefully exit the application. More...
 
virtual tBool OnExit (iRunnable *apRunnable)=0
 Adds a runnable that will be called when the application exits through iLang::Exit(). More...
 
virtual void FatalError (const achar *aszMsg)=0
 Show an error message box then exit. More...
 
virtual void SetEnv (const achar *aaszEnv, const achar *aaszValue) const =0
 Set an OS environment variable. {Property}. More...
 
virtual cString GetEnv (const achar *aaszEnv) const =0
 Get an OS environment variable. {Property}. More...
 
virtual tBool InstallCrashHandler ()=0
 Install a crash handler. More...
 

System

virtual const tStringCMapGetProperties () const =0
 Get the system properties. {Property}. More...
 
virtual tBool HasProperty (const achar *aaszName) const =0
 Check whether the specified system property exists. More...
 
virtual void SetProperty (const achar *aaszName, const achar *aaszValue)=0
 Set the specified system property. {Property}. More...
 
virtual cString GetProperty (const achar *aaszName) const =0
 Get the specified system property. {Property}. More...
 
virtual tBool RegisterModuleDef (const iModuleDef *apDef)=0
 Register a module definition. More...
 
virtual tU32 GetNumModuleDefs () const =0
 Get the number of modules registered. {Property}. More...
 
virtual const iModuleDefGetModuleDef (tU32 anIndex) const =0
 Get the module at the specified index. {Property}. More...
 
virtual tU32 GetModuleDefIndex (const achar *aaszName) const =0
 Get the index of the module with the specified name. {Property}. More...
 
virtual const iModuleDefLoadModuleDef (const achar *aName, const achar *aaszFile=NULL)=0
 Load a module definition from a DLL. More...
 
virtual tCreateInstanceCMapGetCreateInstanceMap () const =0
 Create instance map. {Property}. More...
 
virtual iUnknownCreateInstance (const achar *aOID, const Var &aVarA=niVarNull, const Var &aVarB=niVarNull)=0
 Create instance of the specified object type. More...
 
virtual tGlobalInstanceCMapGetGlobalInstanceMap () const =0
 Get the global instance map. {Property}. More...
 
virtual tBool SetGlobalInstance (const achar *aaszName, iUnknown *apInstance)=0
 Set a global instance. More...
 
virtual iUnknownGetGlobalInstance (const achar *aaszName) const =0
 Get a global instance. {Property}. More...
 
virtual tBool RegisterEnumDef (const sEnumDef *apEnumDef)=0
 Register an enumeration definition. More...
 
virtual const sEnumDefGetEnumDef (const achar *aEID)=0
 Get an enum definition from the specified name. More...
 
virtual iHStringGetInterfaceName (const tUUID &aUUID) const =0
 Get the name of the interface with the specified UUID. {Property}. More...
 
virtual const tUUIDGetInterfaceUUID (iHString *ahspStr) const =0
 Get the UUID of the interface with the specified name. {Property}. More...
 
virtual const sInterfaceDefGetInterfaceDefFromUUID (const tUUID &aUUID) const =0
 Get the interface definition from the specified UUID. More...
 

HString & Localization

virtual void SetDefaultLocale (iHString *ahspLocale)=0
 Set the default locale. {Property}. More...
 
virtual iHStringGetDefaultLocale () const =0
 Get the default locale. {Property}. More...
 
virtual tU32 GetNumLocales () const =0
 Return the number of locales that have at least one localized string. {Property}. More...
 
virtual iHStringGetLocale (tU32 abIndex) const =0
 Return the name of the locale at the specified index. {Property}. More...
 
virtual tBool ClearLocalization (iHString *ahspLocale)=0
 Remove all localized strings of the specified locale. More...
 
virtual tBool SetLocalization (iHString *ahspLocale, iHString *ahspNative, iHString *ahspLocalized)=0
 Set the localization of the specified 'native' string. More...
 
virtual tBool SetLocalizationMap (iHString *ahspLocale, const tStringCMap *apLocalizationMap)=0
 Set the localization of the specified of all strings in the specified map. More...
 
virtual tU32 GetLocalizationMap (iHString *ahspLocale, tStringCMap *apLocalizedMap) const =0
 Get all localized strings of the specified locale. More...
 
virtual void SetMarkMissingLocalization (tBool abMarkMissing)=0
 Set whether the string table should mark missing locale translations. {Property}. More...
 
virtual tBool GetMarkMissingLocalization () const =0
 Get whether the string table should mark missing locale translations. {Property}. More...
 
virtual tStringCVecGetMissingLocalization (iHString *locale) const =0
 Get all missing strings of the specified locale. More...
 
virtual Ptr< iHStringCreateHString (const achar *aStr)=0
 Create a new HString. More...
 
virtual tBool LoadLocalization (iDataTable *apDT)=0
 Load a localization table. More...
 

UUID

virtual tUUID CreateLocalUUID ()=0
 Create a local UUID. More...
 
virtual tUUID CreateGlobalUUID ()=0
 Create a global UUID. More...
 

Log

virtual void SetLogFilter (tU32 exclude)=0
 Set the log filter. {Property}. More...
 
virtual tU32 GetLogFilter () const =0
 Get the log filter. {Property}. More...
 
virtual void SetLogToDebug (tBool abEnable)=0
 Set whether to log to the debug output. {Property}. More...
 
virtual tBool GetLogToDebug () const =0
 Get whether to log to the debug output. {Property}. More...
 
virtual void SetLogToFile (tBool abEnable)=0
 Set whether to log to the file output. {Property}. More...
 
virtual tBool GetLogToFile () const =0
 Get whether to log to the file output. {Property}. More...
 
virtual void Log (tLogFlags type, const achar *file, const achar *func, tU32 line, const achar *msg)=0
 Log a message. More...
 

File system

virtual iFileSystemGetRootFS () const =0
 Get the root file system. {Property}. More...
 
virtual iFileSystemCreateFileSystemDir (const achar *aaszDir, tFileSystemRightsFlags aRights) const =0
 Create a directory file system. More...
 
virtual iFileSystemCreateFileSystemHashed (const iFileSystem *apFS) const =0
 Creates a file system that store the file using its hashed file name. More...
 

Files.

virtual iFileCreateFile (iFileBase *apBase)=0
 Create a file from the specified file base. More...
 
virtual iFileBaseCreateFileBaseWriteDummy ()=0
 Create a dummy file base. More...
 
virtual iFileCreateFileWriteDummy ()=0
 Create a dummy file. More...
 
virtual iFileBaseCreateFileBaseMemory (tPtr apMem, tSize anSize, tBool abFree, const achar *aszPath=NULL)=0
 Create a memory file base. More...
 
virtual iFileCreateFileMemory (tPtr apMem, tSize anSize, tBool abFree, const achar *aszPath=NULL)=0
 Create a memory file. More...
 
virtual iFileBaseCreateFileBaseMemoryAlloc (tSize anSize, const achar *aszPath=NULL)=0
 Create a memory file base. More...
 
virtual iFileCreateFileMemoryAlloc (tSize anSize, const achar *aszPath=NULL)=0
 Create a memory file. More...
 
virtual iFileBaseCreateFileBaseDynamicMemory (tSize anSize=0, const achar *aszPath=NULL)=0
 Create a dynamic memory file base. More...
 
virtual iFileCreateFileDynamicMemory (tSize anSize=0, const achar *aszPath=NULL)=0
 Create a dynamic memory file. More...
 
virtual iFileBaseCreateFileBaseWindow (iFileBase *apBase, tI64 anBase, tI64 anSize, const achar *aaszPath, tBool abAutoSeekSet)=0
 Create a file base window. More...
 
virtual iFileCreateFileWindow (iFileBase *apBase, tI64 anBase, tI64 anSize, const achar *aaszPath, tBool abAutoSeekSet)=0
 Create a file window. More...
 

File and buffer encoder/decoder

virtual iFileBaseCreateFileBaseBufferEncoder (iFileBase *apBase, iBufferEncoder *apEnc)=0
 Create a file base buffer encoder. More...
 
virtual iFileCreateFileBufferEncoder (iFileBase *apBase, iBufferEncoder *apEnc)=0
 Create a file buffer encoder. More...
 
virtual iFileBaseCreateFileBaseBufferDecoder (iFileBase *apBase, iBufferDecoder *apDec, tSize aDecodedSize)=0
 Create a file base buffer decoder. More...
 
virtual iFileCreateFileBufferDecoder (iFileBase *apBase, iBufferDecoder *apDec, tSize aDecodedSize)=0
 Create a file buffer decoder. More...
 
virtual tSize FileBufferEncode (iBufferEncoder *apEnc, iFile *apSrc, tSize anSrcSize, iFile *apDest)=0
 Encodes a file using the specified buffer encoder. More...
 
virtual tSize FileBufferDecode (iBufferDecoder *apDec, iFile *apSrc, tSize anSrcSize, iFile *apDest, tSize anDestSize)=0
 Decodes a file using the specified buffer decoder. More...
 

OS Commands

virtual tI32 RunCommand (const achar *aaszCmd)=0
 Run the specified OS command. More...
 
virtual tI32 StartPath (const achar *aaszFile)=0
 Start the specified file/path. More...
 

Time

virtual const iTimeGetCurrentTime () const =0
 Get the current time. {Property}. More...
 
virtual tF64 TimerInSeconds () const =0
 Get the current value of the lowest level timer available in seconds. More...
 
virtual void ResetFrameTime ()=0
 Reset the frame time. More...
 
virtual tBool UpdateFrameTime (const tF64 afElapsedTime)=0
 Update the frame. More...
 
virtual tF64 GetTotalFrameTime () const =0
 Get the total time since the last ResetFrameTime. {Property}. More...
 
virtual tF64 GetFrameTime () const =0
 Get the time taken by the last frame. {Property}. More...
 
virtual tU32 GetFrameNumber () const =0
 Get the current frame number. {Property}. More...
 
virtual tF32 GetFrameRate () const =0
 Get the frame rate. {Property}. More...
 
virtual tU32 GetAverageFrameRate () const =0
 Get the average frame rate per seconds. {Property}. More...
 

Json

virtual ni::tBool JsonParseFile (ni::iFile *apFile, ni::iJsonParserSink *apSink)=0
 Parse Json contained in the specified file. More...
 
virtual ni::tBool JsonParseString (const ni::cString &aString, ni::iJsonParserSink *apSink)=0
 Parse Json contained in the specified string. More...
 
virtual ni::iJsonWriterCreateJsonSinkWriter (ni::iJsonWriterSink *apSink, ni::tBool abPrettyPrint)=0
 Create a Json writer to write to the specified sink. More...
 
virtual ni::iJsonWriterCreateJsonFileWriter (ni::iFile *apFile, ni::tBool abPrettyPrint)=0
 Create a Json writer to write to the specified file. More...
 

Xml

virtual ni::tBool XmlParseFile (ni::iFile *apFile, ni::iXmlParserSink *apSink)=0
 Parse Xml contained in the specified file. More...
 
virtual ni::tBool XmlParseString (const ni::cString &aString, ni::iXmlParserSink *apSink)=0
 Parse Xml contained in the specified string. More...
 

Expressions

virtual iExpressionContextGetExpressionContext () const =0
 Get the root expression context. {Property}. More...
 
virtual iExpressionContextCreateExpressionContext ()=0
 Create a new expression context. More...
 
virtual iExpressionVariableEval (const achar *aaszExpr)=0
 Evaluate the specified expression. More...
 
virtual cString EnumToString (tU32 anValue, const sEnumDef *apEnumDef, tEnumToStringFlags aFlags)=0
 Convert an enum value to an expression string. More...
 
virtual tU32 StringToEnum (const achar *aExpr, const sEnumDef *apEnumDef, tEnumToStringFlags aFlags)=0
 Convert an expression string to an enum value. More...
 

Scripting hosts

virtual tBool AddScriptingHost (iHString *ahspName, iScriptingHost *apHost)=0
 Add a scripting host. More...
 
virtual tBool RemoveScriptingHost (iHString *ahspName)=0
 Remove a scripting host. More...
 
virtual tU32 GetNumScriptingHosts () const =0
 Get the number of scripting hosts. {Property}. More...
 
virtual iHStringGetScriptingHostName (tU32 anIndex) const =0
 Get the name of the scripting host at the specified index. {Property}. More...
 
virtual iScriptingHostGetScriptingHost (tU32 anIndex)=0
 Get the scripting host at the specified index. {Property}. More...
 
virtual iScriptingHostGetScriptingHostFromName (iHString *ahspName)=0
 Get the scripting host from the specified name. {Property}. More...
 
virtual tU32 GetScriptingHostIndex (iScriptingHost *apHost) const =0
 Get the index of the specified scripting host. {Property}. More...
 
virtual void ServiceAllScriptingHosts (tBool abForceGC)=0
 Service all scripting hosts. More...
 
virtual iScriptingHostFindScriptingHost (iHString *ahspContext, iHString *ahspCodeResource)=0
 Get the first scripting host that can evaluate the code resources. More...
 

Profiler

virtual iProfGetProf () const =0
 Get the profiler instance. {Property}. More...
 

URL File

virtual cString URLGetProtocol (const achar *aURL)=0
 Get the protocol that will be used to access the specified URL. More...
 
virtual iURLFileHandlerURLGetHandler (const achar *aURL)=0
 Get the URL file handler that will be used to access the specified URL. More...
 
virtual iFileURLOpen (const achar *aURL)=0
 Open a synchronous stream to the specified URL. More...
 
virtual tBool URLExists (const achar *aURL)=0
 Validates the specified URL and if possible checks whether the resource the URL points to actually exists. More...
 

Serialization.

virtual tBool IsSerializedObject (iFile *apFile, const achar *aID, tI64 *apObjSize)=0
 Check if the file contains an object of the specified type. More...
 
virtual iUnknownSerializeObject (iFile *apFile, iUnknown *apObject, eSerializeMode aMode, tI64 *apObjSize)=0
 Serialize an object. More...
 
virtual tI64 ReadSerializationHeader (iFile *apFile, cString *apID, tI64 *apSize)=0
 Read serialization header. {NoAutomation}. More...
 
virtual tI64 WriteSerializationHeader (iFile *apFile, const achar *apID, tI64 anSize)=0
 Write serialization header. {NoAutomation}. More...
 

Device resource manager

virtual iDeviceResourceManagerCreateDeviceResourceManager (const achar *aszType)=0
 Create a new device resource manager. More...
 

Messages

virtual tMessageHandlerSinkLstGetSystemMessageHandlers () const =0
 Get the system message targets. {Property}. More...
 

Data tables

virtual iDataTableCreateDataTable (const achar *aaszName)=0
 Create a data table. More...
 
virtual tBool SerializeDataTable (const achar *aaszType, eSerializeMode aMode, iDataTable *apTable, iFile *apFile)=0
 Serialize the specified data table. More...
 
virtual iDataTableWriteStackCreateDataTableWriteStack (iDataTable *apDT)=0
 Create a data table write stack. More...
 
virtual iDataTableWriteStackCreateDataTableWriteStackFromName (const achar *aaszName)=0
 Create a data table write stack. More...
 
virtual iDataTableReadStackCreateDataTableReadStack (iDataTable *apDT)=0
 Create a data table read stack. More...
 
virtual cString GetAbsoluteDataTablePath (iDataTable *apDT, tU32 anPropIndex)=0
 Build an absolute path to the specified datatable and property. More...
 

Clipboard

virtual tBool SetClipboard (eClipboardType aType, iDataTable *apDT)=0
 Set the data of the specified clipboard. {Property}. More...
 
virtual iDataTableGetClipboard (eClipboardType aType) const =0
 Get the data of the specified clipboard. {Property}. More...
 

OS Windows

virtual tU32 GetNumMonitors () const =0
 Get the number of monitors connected to the comptuer. {Property}. More...
 
virtual tU32 GetMonitorIndex (tIntPtr aHandle) const =0
 Get the index of the monitor with the specified OS handle. {Property}. More...
 
virtual tIntPtr GetMonitorHandle (tU32 anIndex) const =0
 Get the OS handle to the monitor at the specified index. {Property}. More...
 
virtual const acharGetMonitorName (tU32 anIndex) const =0
 Get the name of the monitor at the specified index. {Property}. More...
 
virtual sRecti GetMonitorRect (tU32 anIndex) const =0
 Get the rectangle of the monitor at the specified index. {Property}. More...
 
virtual tOSMonitorFlags GetMonitorFlags (tU32 anIndex) const =0
 Get the flags of the monitor at the specified index. {Property}. More...
 
virtual iOSWindowCreateWindow (iOSWindow *apParent, const achar *aaszTitle, const sRecti &aRect, tOSWindowCreateFlags aCreate, tOSWindowStyleFlags aStyle)=0
 Create a new OS window. More...
 
virtual iOSWindowCreateWindowEx (tIntPtr aOSWindowHandle, tOSWindowCreateFlags aCreate)=0
 Create a an OS window from a generic OS window handle. More...
 
virtual eOSMessageBoxReturn MessageBox (iOSWindow *apParent, const achar *aaszTitle, const achar *aaszText, tOSMessageBoxFlags aFlags)=0
 Pop up a OS native modal message box. More...
 
virtual cString OpenFileDialog (iOSWindow *aParent, const achar *aTitle, const achar *aFilter, const achar *aInitDir)=0
 Pop up a OS native file open dialog box. More...
 
virtual cString SaveFileDialog (iOSWindow *aParent, const achar *aTitle, const achar *aFilter, const achar *aInitDir)=0
 Pop up a OS native file save dialog box. More...
 

OS Input

virtual tU32 GetNumGameCtrls () const =0
 Get the number of game controllers available on the system. {Property}. More...
 
virtual iGameCtrlGetGameCtrl (tU32 aulIdx) const =0
 Get a game controller input device interface. More...
 

Additional Inherited Members

- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual iOSProcessManager* GetProcessManager ( ) const
pure virtual

Get the platform's process manager. {Property}.

virtual void Exit ( tU32  aulErrorCode)
pure virtual

Forcefully exit the application.

virtual tBool OnExit ( iRunnable apRunnable)
pure virtual

Adds a runnable that will be called when the application exits through iLang::Exit().

Returns
eTrue if OnExit is supported, else eFalse.
virtual void FatalError ( const achar aszMsg)
pure virtual

Show an error message box then exit.

virtual void SetEnv ( const achar aaszEnv,
const achar aaszValue 
) const
pure virtual

Set an OS environment variable. {Property}.

virtual cString GetEnv ( const achar aaszEnv) const
pure virtual

Get an OS environment variable. {Property}.

virtual tBool InstallCrashHandler ( )
pure virtual

Install a crash handler.

Remarks
A crash handler shows a dialog box and offer the user the opportunity to save a core dump of the application when crashing, and ideally the opportunity to upload it to a server or send it to a specific email address.
virtual const tStringCMap* GetProperties ( ) const
pure virtual

Get the system properties. {Property}.

virtual tBool HasProperty ( const achar aaszName) const
pure virtual

Check whether the specified system property exists.

virtual void SetProperty ( const achar aaszName,
const achar aaszValue 
)
pure virtual

Set the specified system property. {Property}.

virtual cString GetProperty ( const achar aaszName) const
pure virtual

Get the specified system property. {Property}.

virtual tBool RegisterModuleDef ( const iModuleDef apDef)
pure virtual

Register a module definition.

virtual tU32 GetNumModuleDefs ( ) const
pure virtual

Get the number of modules registered. {Property}.

virtual const iModuleDef* GetModuleDef ( tU32  anIndex) const
pure virtual

Get the module at the specified index. {Property}.

virtual tU32 GetModuleDefIndex ( const achar aaszName) const
pure virtual

Get the index of the module with the specified name. {Property}.

virtual const iModuleDef* LoadModuleDef ( const achar aName,
const achar aaszFile = NULL 
)
pure virtual

Load a module definition from a DLL.

virtual tCreateInstanceCMap* GetCreateInstanceMap ( ) const
pure virtual

Create instance map. {Property}.

virtual iUnknown* CreateInstance ( const achar aOID,
const Var aVarA = niVarNull,
const Var aVarB = niVarNull 
)
pure virtual

Create instance of the specified object type.

virtual tGlobalInstanceCMap* GetGlobalInstanceMap ( ) const
pure virtual

Get the global instance map. {Property}.

virtual tBool SetGlobalInstance ( const achar aaszName,
iUnknown apInstance 
)
pure virtual

Set a global instance.

Remarks
All registered global instance will be included in the query interface on iLang objects. By example if you register an object that implements iResource you can do QueryInterface<iResource>(GetLang()) and it will return the instance of the registered global instance. {Property}
virtual iUnknown* GetGlobalInstance ( const achar aaszName) const
pure virtual

Get a global instance. {Property}.

virtual tBool RegisterEnumDef ( const sEnumDef apEnumDef)
pure virtual

Register an enumeration definition.

virtual const sEnumDef* GetEnumDef ( const achar aEID)
pure virtual

Get an enum definition from the specified name.

virtual iHString* GetInterfaceName ( const tUUID aUUID) const
pure virtual

Get the name of the interface with the specified UUID. {Property}.

virtual const tUUID& GetInterfaceUUID ( iHString ahspStr) const
pure virtual

Get the UUID of the interface with the specified name. {Property}.

virtual const sInterfaceDef* GetInterfaceDefFromUUID ( const tUUID aUUID) const
pure virtual

Get the interface definition from the specified UUID.

virtual void SetDefaultLocale ( iHString ahspLocale)
pure virtual

Set the default locale. {Property}.

virtual iHString* GetDefaultLocale ( ) const
pure virtual

Get the default locale. {Property}.

virtual tU32 GetNumLocales ( ) const
pure virtual

Return the number of locales that have at least one localized string. {Property}.

virtual iHString* GetLocale ( tU32  abIndex) const
pure virtual

Return the name of the locale at the specified index. {Property}.

virtual tBool ClearLocalization ( iHString ahspLocale)
pure virtual

Remove all localized strings of the specified locale.

virtual tBool SetLocalization ( iHString ahspLocale,
iHString ahspNative,
iHString ahspLocalized 
)
pure virtual

Set the localization of the specified 'native' string.

virtual tBool SetLocalizationMap ( iHString ahspLocale,
const tStringCMap apLocalizationMap 
)
pure virtual

Set the localization of the specified of all strings in the specified map.

virtual tU32 GetLocalizationMap ( iHString ahspLocale,
tStringCMap apLocalizedMap 
) const
pure virtual

Get all localized strings of the specified locale.

virtual void SetMarkMissingLocalization ( tBool  abMarkMissing)
pure virtual

Set whether the string table should mark missing locale translations. {Property}.

virtual tBool GetMarkMissingLocalization ( ) const
pure virtual

Get whether the string table should mark missing locale translations. {Property}.

virtual tStringCVec* GetMissingLocalization ( iHString locale) const
pure virtual

Get all missing strings of the specified locale.

Remarks
This retrieves all strings which should have been translated but are not.
virtual tUUID CreateLocalUUID ( )
pure virtual

Create a local UUID.

Remarks
A local UUID is garanteed to be unique only on the local computer.
Generating a local UUID can be considered to be faster in general.
virtual tUUID CreateGlobalUUID ( )
pure virtual

Create a global UUID.

Remarks
A gloabl UUID is garanteed to be unique among all computers.
Generating a global UUID should be considered as being a slow operation.
virtual void SetLogFilter ( tU32  exclude)
pure virtual

Set the log filter. {Property}.

virtual tU32 GetLogFilter ( ) const
pure virtual

Get the log filter. {Property}.

virtual void SetLogToDebug ( tBool  abEnable)
pure virtual

Set whether to log to the debug output. {Property}.

virtual tBool GetLogToDebug ( ) const
pure virtual

Get whether to log to the debug output. {Property}.

virtual void SetLogToFile ( tBool  abEnable)
pure virtual

Set whether to log to the file output. {Property}.

Remarks
The log file is written at 'ni.dirs.logs/ni.app.name.log.txt'.
virtual tBool GetLogToFile ( ) const
pure virtual

Get whether to log to the file output. {Property}.

virtual void Log ( tLogFlags  type,
const achar file,
const achar func,
tU32  line,
const achar msg 
)
pure virtual

Log a message.

virtual iFileSystem* GetRootFS ( ) const
pure virtual

Get the root file system. {Property}.

virtual iFileSystem* CreateFileSystemDir ( const achar aaszDir,
tFileSystemRightsFlags  aRights 
) const
pure virtual

Create a directory file system.

virtual iFileSystem* CreateFileSystemHashed ( const iFileSystem apFS) const
pure virtual

Creates a file system that store the file using its hashed file name.

Remarks
This allows to use anything as filename and use the underlying file system more as a key/value store.
virtual iFile* CreateFile ( iFileBase apBase)
pure virtual

Create a file from the specified file base.

virtual iFileBase* CreateFileBaseWriteDummy ( )
pure virtual

Create a dummy file base.

virtual iFile* CreateFileWriteDummy ( )
pure virtual

Create a dummy file.

virtual iFileBase* CreateFileBaseMemory ( tPtr  apMem,
tSize  anSize,
tBool  abFree,
const achar aszPath = NULL 
)
pure virtual

Create a memory file base.

virtual iFile* CreateFileMemory ( tPtr  apMem,
tSize  anSize,
tBool  abFree,
const achar aszPath = NULL 
)
pure virtual

Create a memory file.

virtual iFileBase* CreateFileBaseMemoryAlloc ( tSize  anSize,
const achar aszPath = NULL 
)
pure virtual

Create a memory file base.

virtual iFile* CreateFileMemoryAlloc ( tSize  anSize,
const achar aszPath = NULL 
)
pure virtual

Create a memory file.

virtual iFileBase* CreateFileBaseDynamicMemory ( tSize  anSize = 0,
const achar aszPath = NULL 
)
pure virtual

Create a dynamic memory file base.

virtual iFile* CreateFileDynamicMemory ( tSize  anSize = 0,
const achar aszPath = NULL 
)
pure virtual

Create a dynamic memory file.

virtual iFileBase* CreateFileBaseWindow ( iFileBase apBase,
tI64  anBase,
tI64  anSize,
const achar aaszPath,
tBool  abAutoSeekSet 
)
pure virtual

Create a file base window.

Remarks
If AutoSeekSet is true SeekSet will be called before each read/write operations which allows to have multiple file windows on the same file and read from them concurently. However that method is usually quite slow, a better approach is to open a new shared file handle of the base file with and create the file window with the offset and auto seek set disabled.
virtual iFile* CreateFileWindow ( iFileBase apBase,
tI64  anBase,
tI64  anSize,
const achar aaszPath,
tBool  abAutoSeekSet 
)
pure virtual

Create a file window.

virtual iFileBase* CreateFileBaseBufferEncoder ( iFileBase apBase,
iBufferEncoder apEnc 
)
pure virtual

Create a file base buffer encoder.

virtual iFile* CreateFileBufferEncoder ( iFileBase apBase,
iBufferEncoder apEnc 
)
pure virtual

Create a file buffer encoder.

virtual iFileBase* CreateFileBaseBufferDecoder ( iFileBase apBase,
iBufferDecoder apDec,
tSize  aDecodedSize 
)
pure virtual

Create a file base buffer decoder.

Parameters
apBase
apDec
aDecodedSizespecifies the size of the file when decoded. Pass zero to autodetect. Should be specified whenever possible, without it the whole file is decoded to determin the its size.
virtual iFile* CreateFileBufferDecoder ( iFileBase apBase,
iBufferDecoder apDec,
tSize  aDecodedSize 
)
pure virtual

Create a file buffer decoder.

virtual tSize FileBufferEncode ( iBufferEncoder apEnc,
iFile apSrc,
tSize  anSrcSize,
iFile apDest 
)
pure virtual

Encodes a file using the specified buffer encoder.

virtual tSize FileBufferDecode ( iBufferDecoder apDec,
iFile apSrc,
tSize  anSrcSize,
iFile apDest,
tSize  anDestSize 
)
pure virtual

Decodes a file using the specified buffer decoder.

virtual tI32 RunCommand ( const achar aaszCmd)
pure virtual

Run the specified OS command.

Remarks
This is equivalent to typing a command on the OS's command line/console.
virtual tI32 StartPath ( const achar aaszFile)
pure virtual

Start the specified file/path.

Remarks
This opens a file/path with the default application set to open the file/path's type.
virtual const iTime* GetCurrentTime ( ) const
pure virtual

Get the current time. {Property}.

virtual tF64 TimerInSeconds ( ) const
pure virtual

Get the current value of the lowest level timer available in seconds.

virtual void ResetFrameTime ( )
pure virtual

Reset the frame time.

virtual tBool UpdateFrameTime ( const tF64  afElapsedTime)
pure virtual

Update the frame.

virtual tF64 GetTotalFrameTime ( ) const
pure virtual

Get the total time since the last ResetFrameTime. {Property}.

virtual tF64 GetFrameTime ( ) const
pure virtual

Get the time taken by the last frame. {Property}.

virtual tU32 GetFrameNumber ( ) const
pure virtual

Get the current frame number. {Property}.

virtual tF32 GetFrameRate ( ) const
pure virtual

Get the frame rate. {Property}.

virtual tU32 GetAverageFrameRate ( ) const
pure virtual

Get the average frame rate per seconds. {Property}.

Remarks
This value is estimated every second, it shouldn't be used for accurate measurment.
virtual ni::tBool JsonParseFile ( ni::iFile apFile,
ni::iJsonParserSink apSink 
)
pure virtual

Parse Json contained in the specified file.

virtual ni::tBool JsonParseString ( const ni::cString aString,
ni::iJsonParserSink apSink 
)
pure virtual

Parse Json contained in the specified string.

virtual ni::iJsonWriter* CreateJsonSinkWriter ( ni::iJsonWriterSink apSink,
ni::tBool  abPrettyPrint 
)
pure virtual

Create a Json writer to write to the specified sink.

virtual ni::iJsonWriter* CreateJsonFileWriter ( ni::iFile apFile,
ni::tBool  abPrettyPrint 
)
pure virtual

Create a Json writer to write to the specified file.

virtual ni::tBool XmlParseFile ( ni::iFile apFile,
ni::iXmlParserSink apSink 
)
pure virtual

Parse Xml contained in the specified file.

virtual ni::tBool XmlParseString ( const ni::cString aString,
ni::iXmlParserSink apSink 
)
pure virtual

Parse Xml contained in the specified string.

virtual iExpressionContext* GetExpressionContext ( ) const
pure virtual

Get the root expression context. {Property}.

virtual iExpressionContext* CreateExpressionContext ( )
pure virtual

Create a new expression context.

virtual iExpressionVariable* Eval ( const achar aaszExpr)
pure virtual

Evaluate the specified expression.

Remarks
If the evaluated expression fails it returns an empty string variable named "EVALERR". This means that Eval() always returns a valid variable object and so their is no need to check for a NULL pointer.
virtual cString EnumToString ( tU32  anValue,
const sEnumDef apEnumDef,
tEnumToStringFlags  aFlags 
)
pure virtual

Convert an enum value to an expression string.

virtual tU32 StringToEnum ( const achar aExpr,
const sEnumDef apEnumDef,
tEnumToStringFlags  aFlags 
)
pure virtual

Convert an expression string to an enum value.

virtual tBool AddScriptingHost ( iHString ahspName,
iScriptingHost apHost 
)
pure virtual

Add a scripting host.

virtual tBool RemoveScriptingHost ( iHString ahspName)
pure virtual

Remove a scripting host.

virtual tU32 GetNumScriptingHosts ( ) const
pure virtual

Get the number of scripting hosts. {Property}.

virtual iHString* GetScriptingHostName ( tU32  anIndex) const
pure virtual

Get the name of the scripting host at the specified index. {Property}.

virtual iScriptingHost* GetScriptingHost ( tU32  anIndex)
pure virtual

Get the scripting host at the specified index. {Property}.

virtual iScriptingHost* GetScriptingHostFromName ( iHString ahspName)
pure virtual

Get the scripting host from the specified name. {Property}.

virtual tU32 GetScriptingHostIndex ( iScriptingHost apHost) const
pure virtual

Get the index of the specified scripting host. {Property}.

virtual void ServiceAllScriptingHosts ( tBool  abForceGC)
pure virtual

Service all scripting hosts.

virtual iScriptingHost* FindScriptingHost ( iHString ahspContext,
iHString ahspCodeResource 
)
pure virtual

Get the first scripting host that can evaluate the code resources.

virtual iProf* GetProf ( ) const
pure virtual

Get the profiler instance. {Property}.

virtual cString URLGetProtocol ( const achar aURL)
pure virtual

Get the protocol that will be used to access the specified URL.

Remarks
If no protocol is specified returns the "file" protocol if an absolute file path is detected (the path starts with a drive letter or / or ) else return the "default" protocol.
virtual iURLFileHandler* URLGetHandler ( const achar aURL)
pure virtual

Get the URL file handler that will be used to access the specified URL.

Remarks
If no protocol is specified the "default" protocol is assumed.
virtual iFile* URLOpen ( const achar aURL)
pure virtual

Open a synchronous stream to the specified URL.

Remarks
The operation is blocking, if necessary the whole file is downloaded before the function returns.
The operation is handed to a URLFileHandler which is retrived according to the protocol specified in the URL. For example for http://foo.com/stuff.jpg the GlobalInstance "URLFileHandler.http" is retrieved as file handler.
The RootFS is set as the default and file protocol handlers.
virtual tBool URLExists ( const achar aURL)
pure virtual

Validates the specified URL and if possible checks whether the resource the URL points to actually exists.

Remarks
See also
ni::iLang::URLOpen for precision about URL handling.
virtual Ptr<iHString> CreateHString ( const achar aStr)
pure virtual

Create a new HString.

virtual tBool LoadLocalization ( iDataTable apDT)
pure virtual

Load a localization table.

Remarks
The table's format is <Localization><String native="Hello" fr="Bonjour" cn="nihao" /></Localization>
virtual tBool IsSerializedObject ( iFile apFile,
const achar aID,
tI64 apObjSize 
)
pure virtual

Check if the file contains an object of the specified type.

virtual iUnknown* SerializeObject ( iFile apFile,
iUnknown apObject,
eSerializeMode  aMode,
tI64 apObjSize 
)
pure virtual

Serialize an object.

virtual tI64 ReadSerializationHeader ( iFile apFile,
cString apID,
tI64 apSize 
)
pure virtual

Read serialization header. {NoAutomation}.

virtual tI64 WriteSerializationHeader ( iFile apFile,
const achar apID,
tI64  anSize 
)
pure virtual

Write serialization header. {NoAutomation}.

virtual iDeviceResourceManager* CreateDeviceResourceManager ( const achar aszType)
pure virtual

Create a new device resource manager.

virtual tMessageHandlerSinkLst* GetSystemMessageHandlers ( ) const
pure virtual

Get the system message targets. {Property}.

virtual iDataTable* CreateDataTable ( const achar aaszName)
pure virtual

Create a data table.

virtual tBool SerializeDataTable ( const achar aaszType,
eSerializeMode  aMode,
iDataTable apTable,
iFile apFile 
)
pure virtual

Serialize the specified data table.

virtual iDataTableWriteStack* CreateDataTableWriteStack ( iDataTable apDT)
pure virtual

Create a data table write stack.

virtual iDataTableWriteStack* CreateDataTableWriteStackFromName ( const achar aaszName)
pure virtual

Create a data table write stack.

virtual iDataTableReadStack* CreateDataTableReadStack ( iDataTable apDT)
pure virtual

Create a data table read stack.

virtual cString GetAbsoluteDataTablePath ( iDataTable apDT,
tU32  anPropIndex 
)
pure virtual

Build an absolute path to the specified datatable and property.

Remarks
If anPropIndex == eInvalidHandle the path points to the datatable and not the property
virtual tBool SetClipboard ( eClipboardType  aType,
iDataTable apDT 
)
pure virtual

Set the data of the specified clipboard. {Property}.

Remarks
The datatable should have a at least a type member, type can be :
  • text : Has a 'text' property of type string containing the text
  • bitmap : Has a 'bitmap' property of type iUnknown containing the bitmap
virtual iDataTable* GetClipboard ( eClipboardType  aType) const
pure virtual

Get the data of the specified clipboard. {Property}.

virtual tU32 GetNumMonitors ( ) const
pure virtual

Get the number of monitors connected to the comptuer. {Property}.

virtual tU32 GetMonitorIndex ( tIntPtr  aHandle) const
pure virtual

Get the index of the monitor with the specified OS handle. {Property}.

virtual tIntPtr GetMonitorHandle ( tU32  anIndex) const
pure virtual

Get the OS handle to the monitor at the specified index. {Property}.

virtual const achar* GetMonitorName ( tU32  anIndex) const
pure virtual

Get the name of the monitor at the specified index. {Property}.

virtual sRecti GetMonitorRect ( tU32  anIndex) const
pure virtual

Get the rectangle of the monitor at the specified index. {Property}.

virtual tOSMonitorFlags GetMonitorFlags ( tU32  anIndex) const
pure virtual

Get the flags of the monitor at the specified index. {Property}.

virtual iOSWindow* CreateWindow ( iOSWindow apParent,
const achar aaszTitle,
const sRecti aRect,
tOSWindowCreateFlags  aCreate,
tOSWindowStyleFlags  aStyle 
)
pure virtual

Create a new OS window.

virtual iOSWindow* CreateWindowEx ( tIntPtr  aOSWindowHandle,
tOSWindowCreateFlags  aCreate 
)
pure virtual

Create a an OS window from a generic OS window handle.

virtual eOSMessageBoxReturn MessageBox ( iOSWindow apParent,
const achar aaszTitle,
const achar aaszText,
tOSMessageBoxFlags  aFlags 
)
pure virtual

Pop up a OS native modal message box.

virtual cString OpenFileDialog ( iOSWindow aParent,
const achar aTitle,
const achar aFilter,
const achar aInitDir 
)
pure virtual

Pop up a OS native file open dialog box.

Parameters
aParentis the parent window.
aTitletitle of the dialog. "Open" by default.
aFilterthe file extension filters. Example "pdf;txt;*", '*' means that all extensions are accepted.
aInitDirthe directory to start from.
Returns
An empty string if the user canceled, else the file path selected.
virtual cString SaveFileDialog ( iOSWindow aParent,
const achar aTitle,
const achar aFilter,
const achar aInitDir 
)
pure virtual

Pop up a OS native file save dialog box.

Parameters
aParentis the parent window.
aTitletitle of the dialog. "Open" by default.
aFilterthe file extension filters. Example "pdf;txt;*", '*' means that all extensions are accepted.
aInitDirthe directory to start from.
Returns
An empty string if the user canceled, else the file path selected.
virtual tU32 GetNumGameCtrls ( ) const
pure virtual

Get the number of game controllers available on the system. {Property}.

virtual iGameCtrl* GetGameCtrl ( tU32  aulIdx) const
pure virtual

Get a game controller input device interface.

Parameters
aulIdxis the index of the game controller that will be managed by the created interface.
Returns
NULL if the interface can't be get, else a pointer to a valid iGameCtrl interface. {Property}