This namespace holds all common classes and functions of the engine, RTTI, application, threads, utilities, plugins, stats, profiler, memory, events, exceptions, resources, properties, streams, xml etc. More...
Data Structures | |
| class | SystemInfo |
| Holds System info, used with getSystemInfo(). More... | |
| class | DateTime |
| Holds System date and time, used with getSystemDateTime(). More... | |
| class | FoundFileInfo |
| Used with findFirstFile/findNextFile to retrieve found file's info. More... | |
Typedefs | |
| typedef uint32(* | TThreadFunc )(voidptr pUserData) |
| The thread function. | |
Enumerations | |
| enum | EThreadPriorityLevel { eThreadPriorityLevel_AboveNormal = NYTRO_BIT(0), eThreadPriorityLevel_BelowNormal = NYTRO_BIT(1), eThreadPriorityLevel_Highest = NYTRO_BIT(2), eThreadPriorityLevel_Idle = NYTRO_BIT(3), eThreadPriorityLevel_Lowest = NYTRO_BIT(4), eThreadPriorityLevel_Normal = NYTRO_BIT(5), eThreadPriorityLevel_TimeCritical = NYTRO_BIT(6) } |
Used with thread functions, the thread's priority. More... | |
| enum | EMessageBoxFlag { eMessageBoxFlag_Error = NYTRO_BIT(0), eMessageBoxFlag_Info = NYTRO_BIT(1), eMessageBoxFlag_Exclamation = NYTRO_BIT(2), eMessageBoxFlag_Question = NYTRO_BIT(3), eMessageBoxFlag_Ok = NYTRO_BIT(4), eMessageBoxFlag_OkCancel = NYTRO_BIT(5), eMessageBoxFlag_YesNo = NYTRO_BIT(6), eMessageBoxFlag_YesNoCancel = NYTRO_BIT(7) } |
Used with messageBox functions, the box's flags. More... | |
| enum | EMessageBoxResult { eMessageBoxResult_Yes = NYTRO_BIT(0), eMessageBoxResult_No = NYTRO_BIT(1), eMessageBoxResult_Cancel = NYTRO_BIT(2) } |
Used with messageBox functions, the box's return values. More... | |
| enum | EFindFileFlag { eFindFileFlag_Directory = NYTRO_BIT(0), eFindFileFlag_Hidden = NYTRO_BIT(1), eFindFileFlag_Normal = NYTRO_BIT(2), eFindFileFlag_Readonly = NYTRO_BIT(3), eFindFileFlag_System = NYTRO_BIT(4) } |
Used with findFirstFile/findNextFile in FoundFileInfo::m_fileFlags. More... | |
| enum | EFileAttribute { eFileAttribute_Temporary = NYTRO_BIT(0), eFileAttribute_Hidden = NYTRO_BIT(1), eFileAttribute_Normal = NYTRO_BIT(2), eFileAttribute_Readonly = NYTRO_BIT(3), eFileAttribute_Archive = NYTRO_BIT(4), eFileAttribute_System = NYTRO_BIT(5) } |
Functions | |
| NYTRO_EXPORT void | errorMessageBox (const char *pFmt,...) |
| show an error message box, using the OS' functions | |
| NYTRO_EXPORT uint32 | messageBox (uint32 aFlags, const char *pFmt,...) |
| show an message box, using the OS' functions | |
| NYTRO_EXPORT void | copyTextToClipboard (const char *pText) |
| clipboard copy from text | |
| NYTRO_EXPORT string | pasteTextFromClipboard () |
| clipboard copy to text | |
| NYTRO_EXPORT void | getFileExtension (const char *pFile, string &rExt) |
| NYTRO_EXPORT void | extractFileName (const char *pFile, string &rFilename) |
| NYTRO_EXPORT void | getFileNameNoExtension (const char *pFile, string &rName) |
| NYTRO_EXPORT void | getFilePath (const char *pFile, string &rPath) |
| NYTRO_EXPORT string | cleanupPath (const char *pPath) |
| cleanup path and make it linux-like, ex.: C:.x --> c:/SomeFilePath/TesT.x | |
| NYTRO_EXPORT bool | isFileExists (const char *pFile) |
| returns true if file exists | |
| NYTRO_EXPORT bool | isPathValid (const char *pPath) |
| returns true if path exists and valid | |
| NYTRO_EXPORT void | mergePathFile (const char *pPath, const char *pFile, string &rResult) |
| merges a path to a file | |
| NYTRO_EXPORT string | mergePathFile (const char *pPath, const char *pFile) |
| merges a path to a file, returning the result | |
| NYTRO_EXPORT string | mergePathPath (const char *pPath1, const char *pPath2) |
| merges a path to another path, returning the result | |
| NYTRO_EXPORT void | mergePathFileExtension (const char *pPath, const char *pFile, const char *pExt, string &rResult) |
| merges a path to a file to an extension | |
| NYTRO_EXPORT bool | addFileExtension (string &rFilename, const char *pExtension) |
| adds a file extension to a filename, only if that extension is not there | |
| NYTRO_EXPORT bool | deleteFile (const char *pFile) |
| delete a file | |
| NYTRO_EXPORT uint32 | getFileAttributes (const char *pFile) |
| NYTRO_EXPORT void | setFileAttributes (const char *pFile, uint32 aAttrs) |
| set file attributes | |
| NYTRO_EXPORT bool | getFileDateTime (const char *pFile, DateTime *pCreationTime, DateTime *pLastAccess=NULL, DateTime *pLastWrite=NULL) |
| get file date and time | |
| NYTRO_EXPORT void | deleteFolder (const char *pPath) |
| delete folder | |
| NYTRO_EXPORT bool | createFolder (const char *pPath) |
| create folder | |
| NYTRO_EXPORT bool | findFirstFile (const char *pDir, const char *pMask, string &rFilename, FoundFileInfo *pFileInfo=NULL) |
| find the first file from pDir folder, with pMask, returns the filname into rFilename | |
| NYTRO_EXPORT bool | findNextFile (string &rFilename, FoundFileInfo *pFileInfo=NULL) |
| find the next file from findFirstFile(), returns false if none found | |
| NYTRO_EXPORT string | getCurrentWorkingPath () |
| NYTRO_EXPORT void | setCurrentWorkingPath (const char *pPath) |
| set the current working directory ( can be influenced in your apps on win32 by open/save dialogs and SetCurrentDirectory(...) ) | |
| NYTRO_EXPORT string | getApplicationPath () |
| NYTRO_EXPORT TLibraryHandle | loadDynamicLibrary (const char *pFile) |
| load a dynamic library | |
| NYTRO_EXPORT int32 | freeDynamicLibrary (TLibraryHandle aLib) |
| free dynamic library | |
| NYTRO_EXPORT voidptr | getLibraryFunctionAddress (TLibraryHandle aLib, const char *pProcName) |
| NYTRO_EXPORT uint32 | createThread (TThreadFunc pFunc, voidptr pUserData, EThreadPriorityLevel aPriority=eThreadPriorityLevel_Normal, uint32 aStackLen=0, const char *pName="NytroThread") |
| create a new thread, returns the thread handle | |
| NYTRO_EXPORT void | setThreadPriority (uint32 aThreadHandle, uint32 aPriority) |
| set a thread's priority | |
| NYTRO_EXPORT void | setThreadName (uint32 hThread, const char *pThreadName) |
| set thread name, called in thread function | |
| NYTRO_EXPORT void | suspendThread (uint32 aThreadHandle) |
| suspend a thread's activity | |
| NYTRO_EXPORT void | resumeThread (uint32 aThreadHandle) |
| resume a thread's activity | |
| NYTRO_EXPORT void | exitThread (uint32 aExitCode) |
| exit a thread, called from the thread function itself | |
| NYTRO_EXPORT void | killThread (uint32 aThreadHandle, uint32 aExitCode=1) |
| kill a thread | |
| NYTRO_EXPORT void | closeThread (uint32 aThreadHandle) |
| close a thread handle | |
| NYTRO_EXPORT uint32 | getThreadExitCode (uint32 aThreadHandle) |
| NYTRO_EXPORT uint64 | createCriticalSection () |
| NYTRO_EXPORT void | deleteCriticalSection (uint64 aId) |
| delete a critical section by its id | |
| NYTRO_EXPORT bool | enterCriticalSection (uint64 aId) |
| enter in a critical section | |
| NYTRO_EXPORT bool | leaveCriticalSection (uint64 aId) |
| leave a critical section | |
| NYTRO_EXPORT bool | tryEnterCriticalSection (uint64 aId) |
| try to enter a critical section, if it cannot enter, then returns false | |
| NYTRO_EXPORT uint32 | getTickCount () |
| NYTRO_EXPORT float64 | getAccurateTickCount () |
| NYTRO_EXPORT void | sleep (uint32 aTimeMSec) |
| pause execution aTimeMsec milliseconds | |
| NYTRO_EXPORT void | getSystemInfo (SystemInfo &rSystemInfo) |
| NYTRO_EXPORT void | getSystemDateTime (DateTime &rDateTime) |
This namespace holds all common classes and functions of the engine, RTTI, application, threads, utilities, plugins, stats, profiler, memory, events, exceptions, resources, properties, streams, xml etc.
| typedef uint32( * Nytro::System::TThreadFunc)(voidptr pUserData) |
The thread function.
Definition at line 76 of file nySystem.h.
| eFileAttribute_Temporary | |
| eFileAttribute_Hidden | |
| eFileAttribute_Normal | |
| eFileAttribute_Readonly | |
| eFileAttribute_Archive | |
| eFileAttribute_System |
Definition at line 65 of file nySystem.h.
Used with findFirstFile/findNextFile in FoundFileInfo::m_fileFlags.
| eFindFileFlag_Directory | |
| eFindFileFlag_Hidden | |
| eFindFileFlag_Normal | |
| eFindFileFlag_Readonly | |
| eFindFileFlag_System |
Definition at line 56 of file nySystem.h.
Used with messageBox functions, the box's flags.
| eMessageBoxFlag_Error | |
| eMessageBoxFlag_Info | |
| eMessageBoxFlag_Exclamation | |
| eMessageBoxFlag_Question | |
| eMessageBoxFlag_Ok | |
| eMessageBoxFlag_OkCancel | |
| eMessageBoxFlag_YesNo | |
| eMessageBoxFlag_YesNoCancel |
Definition at line 35 of file nySystem.h.
Used with messageBox functions, the box's return values.
Definition at line 48 of file nySystem.h.
Used with thread functions, the thread's priority.
Definition at line 23 of file nySystem.h.
| NYTRO_EXPORT bool Nytro::System::addFileExtension | ( | string & | rFilename, | |
| const char * | pExtension | |||
| ) |
adds a file extension to a filename, only if that extension is not there
| NYTRO_EXPORT string Nytro::System::cleanupPath | ( | const char * | pPath | ) |
cleanup path and make it linux-like, ex.: C:.x --> c:/SomeFilePath/TesT.x
| NYTRO_EXPORT void Nytro::System::closeThread | ( | uint32 | aThreadHandle | ) |
close a thread handle
| NYTRO_EXPORT void Nytro::System::copyTextToClipboard | ( | const char * | pText | ) |
clipboard copy from text
| NYTRO_EXPORT uint64 Nytro::System::createCriticalSection | ( | ) |
| NYTRO_EXPORT bool Nytro::System::createFolder | ( | const char * | pPath | ) |
create folder
| NYTRO_EXPORT uint32 Nytro::System::createThread | ( | TThreadFunc | pFunc, | |
| voidptr | pUserData, | |||
| EThreadPriorityLevel | aPriority = eThreadPriorityLevel_Normal, |
|||
| uint32 | aStackLen = 0, |
|||
| const char * | pName = "NytroThread" | |||
| ) |
create a new thread, returns the thread handle
| NYTRO_EXPORT void Nytro::System::deleteCriticalSection | ( | uint64 | aId | ) |
delete a critical section by its id
| NYTRO_EXPORT bool Nytro::System::deleteFile | ( | const char * | pFile | ) |
delete a file
| NYTRO_EXPORT void Nytro::System::deleteFolder | ( | const char * | pPath | ) |
delete folder
| NYTRO_EXPORT bool Nytro::System::enterCriticalSection | ( | uint64 | aId | ) |
enter in a critical section
| NYTRO_EXPORT void Nytro::System::errorMessageBox | ( | const char * | pFmt, | |
| ... | ||||
| ) |
show an error message box, using the OS' functions
| NYTRO_EXPORT void Nytro::System::exitThread | ( | uint32 | aExitCode | ) |
exit a thread, called from the thread function itself
| NYTRO_EXPORT void Nytro::System::extractFileName | ( | const char * | pFile, | |
| string & | rFilename | |||
| ) |
| NYTRO_EXPORT bool Nytro::System::findFirstFile | ( | const char * | pDir, | |
| const char * | pMask, | |||
| string & | rFilename, | |||
| FoundFileInfo * | pFileInfo = NULL | |||
| ) |
find the first file from pDir folder, with pMask, returns the filname into rFilename
| NYTRO_EXPORT bool Nytro::System::findNextFile | ( | string & | rFilename, | |
| FoundFileInfo * | pFileInfo = NULL | |||
| ) |
find the next file from findFirstFile(), returns false if none found
| NYTRO_EXPORT int32 Nytro::System::freeDynamicLibrary | ( | TLibraryHandle | aLib | ) |
free dynamic library
| NYTRO_EXPORT float64 Nytro::System::getAccurateTickCount | ( | ) |
| NYTRO_EXPORT string Nytro::System::getApplicationPath | ( | ) |
| NYTRO_EXPORT string Nytro::System::getCurrentWorkingPath | ( | ) |
| NYTRO_EXPORT uint32 Nytro::System::getFileAttributes | ( | const char * | pFile | ) |
| NYTRO_EXPORT bool Nytro::System::getFileDateTime | ( | const char * | pFile, | |
| DateTime * | pCreationTime, | |||
| DateTime * | pLastAccess = NULL, |
|||
| DateTime * | pLastWrite = NULL | |||
| ) |
get file date and time
| NYTRO_EXPORT void Nytro::System::getFileExtension | ( | const char * | pFile, | |
| string & | rExt | |||
| ) |
| NYTRO_EXPORT void Nytro::System::getFileNameNoExtension | ( | const char * | pFile, | |
| string & | rName | |||
| ) |
| NYTRO_EXPORT void Nytro::System::getFilePath | ( | const char * | pFile, | |
| string & | rPath | |||
| ) |
| NYTRO_EXPORT voidptr Nytro::System::getLibraryFunctionAddress | ( | TLibraryHandle | aLib, | |
| const char * | pProcName | |||
| ) |
| NYTRO_EXPORT void Nytro::System::getSystemDateTime | ( | DateTime & | rDateTime | ) |
| NYTRO_EXPORT void Nytro::System::getSystemInfo | ( | SystemInfo & | rSystemInfo | ) |
| NYTRO_EXPORT uint32 Nytro::System::getThreadExitCode | ( | uint32 | aThreadHandle | ) |
| NYTRO_EXPORT uint32 Nytro::System::getTickCount | ( | ) |
| NYTRO_EXPORT bool Nytro::System::isFileExists | ( | const char * | pFile | ) |
returns true if file exists
| NYTRO_EXPORT bool Nytro::System::isPathValid | ( | const char * | pPath | ) |
returns true if path exists and valid
| NYTRO_EXPORT void Nytro::System::killThread | ( | uint32 | aThreadHandle, | |
| uint32 | aExitCode = 1 | |||
| ) |
kill a thread
| NYTRO_EXPORT bool Nytro::System::leaveCriticalSection | ( | uint64 | aId | ) |
leave a critical section
| NYTRO_EXPORT TLibraryHandle Nytro::System::loadDynamicLibrary | ( | const char * | pFile | ) |
load a dynamic library
| NYTRO_EXPORT void Nytro::System::mergePathFile | ( | const char * | pPath, | |
| const char * | pFile, | |||
| string & | rResult | |||
| ) |
merges a path to a file
| NYTRO_EXPORT string Nytro::System::mergePathFile | ( | const char * | pPath, | |
| const char * | pFile | |||
| ) |
merges a path to a file, returning the result
| NYTRO_EXPORT void Nytro::System::mergePathFileExtension | ( | const char * | pPath, | |
| const char * | pFile, | |||
| const char * | pExt, | |||
| string & | rResult | |||
| ) |
merges a path to a file to an extension
| NYTRO_EXPORT string Nytro::System::mergePathPath | ( | const char * | pPath1, | |
| const char * | pPath2 | |||
| ) |
merges a path to another path, returning the result
| NYTRO_EXPORT uint32 Nytro::System::messageBox | ( | uint32 | aFlags, | |
| const char * | pFmt, | |||
| ... | ||||
| ) |
show an message box, using the OS' functions
| aFlags | flags for the message box from MessageBoxFlagType |
| NYTRO_EXPORT string Nytro::System::pasteTextFromClipboard | ( | ) |
clipboard copy to text
| NYTRO_EXPORT void Nytro::System::resumeThread | ( | uint32 | aThreadHandle | ) |
resume a thread's activity
| NYTRO_EXPORT void Nytro::System::setCurrentWorkingPath | ( | const char * | pPath | ) |
set the current working directory ( can be influenced in your apps on win32 by open/save dialogs and SetCurrentDirectory(...) )
| NYTRO_EXPORT void Nytro::System::setFileAttributes | ( | const char * | pFile, | |
| uint32 | aAttrs | |||
| ) |
set file attributes
| NYTRO_EXPORT void Nytro::System::setThreadName | ( | uint32 | hThread, | |
| const char * | pThreadName | |||
| ) |
set thread name, called in thread function
| NYTRO_EXPORT void Nytro::System::setThreadPriority | ( | uint32 | aThreadHandle, | |
| uint32 | aPriority | |||
| ) |
set a thread's priority
| NYTRO_EXPORT void Nytro::System::sleep | ( | uint32 | aTimeMSec | ) |
pause execution aTimeMsec milliseconds
| NYTRO_EXPORT void Nytro::System::suspendThread | ( | uint32 | aThreadHandle | ) |
suspend a thread's activity
| NYTRO_EXPORT bool Nytro::System::tryEnterCriticalSection | ( | uint64 | aId | ) |
try to enter a critical section, if it cannot enter, then returns false