You.i Engine
Utilities

Detailed Description

Utility classes useful for developing a You.i Engine application.

The utility classes in You.i Engine provide functionality which will be useful when developing a You.i Engine application.

Time

Utilities include various time related classes which are used for determining the current time as well as date time manipulation. CYIDateTime is a container class which can be used to represent time. CYIDateTime objects can be created with epoch time as well as an ISO 8061 formatted string. The class provides various accessors for parts of the date as well as mutators for modifying the date object.

The CYITime class provides information about the current frame time of the application and enables a user to register a listener for updates on the frame time. CYITime is used to provide the CYITimer utility, this utility can be used to handle an event which must occur after a period of time has passed.

Localization

Localization enables an application's text to be translated to different languages. You.i Engine supports localization of text contained in After Effects compositions as well as text located in source code. The CYILocale class is a container for a specific locale and can be populated using the system locale obtained from CYILocaleBridge contained in Platform.

The translation system is comprised of CYITranslation and CYITranslator. CYITranslation is the entry point for translation and CYITranslator is the is responsible for the translation of text to a specific language. The script runGetText.rb is a tool packaged with the engine and is used to generate a file containing all text instances which require translation. Text in After Effects that is not configured as dynamic text and strings wrapped in YiTranslate in source code will be added to this file. These strings can then be translated and compiled into a binary which You.i Engine loads to carry-out the localization process. See runGetText.rb for a detailed description of the generation process and the localization sample for an example of the end-to-end localization process.

Strings

You.i Engine provides the CYIString class that is a cross-platform string implementation which is used throughout You.i Engine and simplifies the use of strings. This string implementation provides common string manipulation functionality as well as conversion from platform specific string formats into CYIString.

Run-Time Type Information (RTTI)

Run-Time Type Information (RTTI) enables You.i Engine views to be instanced at import time based on the class information exported from After Effects. All CYISceneView subclasses must contain RTTI type information. RTTI also allows for downcasting types at runtime. See YiRtti.h for details and code snippets.

Files

file  YiRtti.h
 This file contains the classes and macros used to implement RTTI in You.i Engine.
 

Namespaces

 yi::deprecated
 Deprecated classes.
 

Classes

class  YiRootViewController
 The view controller under which all You.i Engine views are located. More...
 
class  CYIDevPanel
 A class used to manipulate developer utilities. More...
 
class  CYIDevWidget
 The base class for all dev widgets. More...
 
class  CYIDevWidgetWithText
 A dev widget used to display text to the user. More...
 
class  CYIDevWidgetWithView
 A dev widget that displays a scene view when activated. More...
 
class  CYIHud
 A class used to display information on top of the rendered scenes. More...
 
class  CYISignalWidget
 A dev widget that calls a signal when activated. More...
 
class  CYIAny
 A class that holds instances of any type that is copy-constructible. More...
 
class  CYIApp
 The base class for all applications. More...
 
class  CYIAppContext
 
class  CYIFramework
 CYIFramework is a singleton class used to acquire global instances of a number of classes. More...
 
class  CYIFrameworkConfiguration
 CYIFrameworkConfiguration is used to specify configuration settings for the CYIFramework class. More...
 
struct  YI_POINT
 
struct  YI_POINT2D
 
struct  YI_RECT
 
struct  YI_RECT_REL
 
struct  YI_FLOAT_RECT
 
struct  YI_FLOAT_RECT_REL
 
class  CYIScreen
 
class  CYIVersion
 CYIVersion is a data structure that represents semantic versioning. More...
 
class  CYIGPUExportUtilities
 GPU utilities. More...
 
class  CYISceneNodeBuilder
 
class  CYIBundle
 CYIBundle represents a collection of key-value pairs. More...
 
class  CYIColor
 A class used to represent a color value. More...
 
class  CYINamedColors
 
class  CYIConcurrentDeque< YI_DATA >
 A simple, thread safe deque. More...
 
class  CYIConcurrentQueue< YI_DATA >
 A simple, thread safe queue. More...
 
class  CYICondition
 Represents a boolean condition. More...
 
class  CYIConditionEvaluator
 Evaluates when CYICondition objects have been set, and notifies users. More...
 
class  CYICryptoUtility
 The CYICryptoUtility class contains utilities that are cryptographic in nature. More...
 
class  CYICustomMarkupTagsProvider
 
class  CYIDateTime
 Utility class that requires a string as per the following format: http://en.wikipedia.org/wiki/ISO_8601 to construct an instance and provides some commmonly used parts like year, month, hour etc. in different data types and formats. All dates are in the local timezone unless otherwise specified. More...
 
class  CYIDir
 This class provides functionality for working with directories. More...
 
class  CYIEasyProfiler
 A wrapper around easy_profiler's API for starting the profiler server, writing to a file, or starting and stopping capture of data globally. More...
 
struct  YiEnableBitmaskOperators< E >
 A struct used to enable bitmask operators for an enum class type. More...
 
class  CYIFile
 This class provides functionality for working with files. More...
 
class  CYIFontUtilities
 
class  CYIKeyValuePairConverter
 
class  CYILayoutUtility
 A utility class that helps retrieving attachment positions relative to an object. More...
 
class  CYILazy< YI_CLASS >
 CYILazy is a thread-safe lazy initializer of a class. The instance pointer remains null until CYILazy::Get() is called, which will trigger a thread-safe initialization of the instance. Also, a CYILazy::TryGet() is available, which will return the actual value while not instantiating, providing a convenient way to test for nullptr in the event that the user does not want the instantiation to occur. More...
 
class  CYILocale
 A class representing a locale. More...
 
class  CYIMatrixUtilities
 
struct  memsource_struct
 
class  CYIMOTranslator
 A translator object used for parsing and indexing localisation strings found in ".mo" binary files. These objects are available through the CYITranslation interface and should be primarily loaded through the CYIAssetLoader, which will provide a CYIAssetTranslation object. More...
 
class  CYIObjectPrinter
 A class used to get the string representation of an object or of a complex type. More...
 
class  CYIEmptyOptionalType
 The type of the value used to assign 'empty' to a CYIOptional object. More...
 
class  CYIOptional< T >
 A container class that either contains a value or 'nothing'. More...
 
class  CYIParsingError
 A class to store errors in the parsing of encoded data, such as JSON or XML. More...
 
class  CYIPersistentStore
 The CYIPersistentStore class manages storing and retrieving application state data. More...
 
class  CYIPreferences
 Property management class using CYIString names and values. More...
 
class  CYIProfileData
 This class is used as a profiling or a measurement tool for recurring activities. By marking the beginning and the end of a particular activity, various statistics can be queried from this class. More...
 
class  CYIProfiler
 CYIProfiler More...
 
class  CYIRandom
 
class  CYIRapidJSONUtility
 A front-end utility class aimed to simplify the use of RapidJSON tools. More...
 
class  CYIRuntimeTypeInfo
 The abstract runtime representation of a C++ type. More...
 
class  CYIRuntimeTypeInfoTyped< CLASS, BASES >
 The runtime representation of a C++ type. More...
 
class  RTTISampleClass
 This is a sample class to document the RTTI functions inserted into classes by the YI_TYPE_BASES(...) macro. More...
 
class  CYIRTTIRegistry
 A registry of all known RTTI types. More...
 
class  CYISceneNodeUtility
 
class  CYISmallVector< T, StackCapacity >
 A std::vector wrapper that makes use of pre-allocated memory for storing up to StackCapacity items. More...
 
class  CYIString
 Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode characters. More...
 
class  CYIStringCXUtilities
 
class  CYIStringICU
 A container class for functions that require the ICU library. More...
 
class  CYIStringParsing
 This class contains string parsing functions. More...
 
class  CYIStringUnorderedContainerKey
 A CYIString wrapper that can be used as key for an unordered container (such as std::unordered_map) while still allowing for lookup by CYIStringView. More...
 
class  CYICaseInsensitiveLessThanComparator
 
class  CYICaseInsensitiveEqualsPredicate
 
class  CYIStringView
 A lightweight wrapper around a sequence of Unicode characters. More...
 
class  CYITextMarkupParser
 
class  CYITime
 global class used to notify the system of time updates More...
 
class  CYITimeConversion
 
class  CYITimer
 A low-precision timer driven by the update loop. More...
 
class  CYITranslation
 Provides string localization. More...
 
class  CYITranslator
 
struct  YI_REMOVE_REFERENCE< YI_TYPE >
 
struct  YI_REMOVE_CONST< YI_TYPE >
 
struct  YI_REMOVE_VOLATILE< YI_TYPE >
 
struct  YI_REMOVE_CONST_VOLATILE< YI_TYPE >
 
struct  YI_REMOVE_POINTER< YI_TYPE >
 
struct  YiIsSameType< FIRST, SECOND >
 
struct  YiIntegralConstant< Type, templateValue >
 
struct  YiIsVoid< Type >
 
struct  YiIsIntegral< Type >
 
struct  YiIsFloatingPoint< Type >
 
class  YiIsBaseOf< BASE, DERIVED >
 
struct  YiHasOutputStreamOperator< STREAM, TYPE >
 
struct  YiEnableIf< CONDITION, TYPE >
 
struct  YiMakeIndexSequence< S >
 
struct  YiIndexSequence<... >
 
struct  YiDependentFalse< T >
 
struct  YiFunctionArity< F >
 
class  CYIReadOnlyFILEBuffer
 An implementation of std::streambuf backed by a YI_FILE handle. The wrapper uses YI_FREAD, YI_FSEEK and YI_FTELL, and only supports read operations. More...
 
class  CYIAssetIStream
 An implementation of std::istream used to access assets. More...
 
class  CYIYouIMarkupParser
 

Macros

#define YI_NULL   nullptr
 
#define YI_ENV_32   1
 
#define YI_FULLY_SUPPORTS_CPP14_CONSTEXPR   1
 
#define YI_IS_LITTLE_ENDIAN   1
 
#define YI_SYNCHRONIZATION_OBJECT_INIT_VALUE
 
#define strcat(dst, src)   YI_ERROR("strcat: Does not check for buffer overflows when concatenating to destination (CWE-120). Consider using YI_STRNCAT, strcat_s, or strlcat (warning, YI_STRNCAT is easily misused).")
 
#define strcpy(dst, src)   YI_ERROR("strcpy: Does not check for buffer overflows when copying to destination (CWE-120). Consider using YI_STRNCPY, strcpy_s, or strlcpy (warning, YI_STRNCAT is easily misused).")
 
#define gets(str)   YI_ERROR("gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.")
 
#define wcscpy(dst, src)   YI_ERROR("wcscpy: Does not check for buffer overflows when copying to destination (CWE-120). Consider using a function version that stops copying at the end of the buffer.")
 
#define wcscat(dst, src)   YI_ERROR("wcscat: Does not check for buffer overflows when concatenating to destination (CWE-120).")
 
#define YI_WTEXT(quote)   (const wchar_t *)L##quote
 
#define YI_TEXT(quote)   (const char *)quote
 
#define YI_TEXT16(quote)   (const char16_t *)L##quote
 
#define YI_TEXT32(quote)   (const char32_t *)L##quote
 
#define YI_INLINE
 
#define YI_EXTERNINLINE
 
#define YI_SEEK_SET   0
 
#define YI_SEEK_END   1
 
#define YI_SEEK_CUR   2
 
#define YI_MAX_PATH   260
 
#define YI_MAX_BUFFER   1024
 
#define YI_MIN(a, b)   (((a) < (b)) ? (a) : (b))
 
#define YI_MAX(a, b)   (((a) < (b)) ? (b) : (a))
 
#define YI_FLOAT_EQUAL(a, b)   ((a) >= ((b)-FLT_EPSILON) && (a) <= ((b) + FLT_EPSILON))
 
#define YI_UNUSED(param)   (void)(param)
 
#define YI_UNUSED_ATTRIBUTE   __attribute__((unused))
 
#define YI_FORCE_INLINE   inline
 
#define YI_FUNCTION_SPECIALIZATION_FULLY_SUPPORTED
 
#define YI_DISALLOW_COPY_AND_ASSIGN(TypeName)
 Delete the copy constructor and assignment operator (and consequently the move constructor as well) More...
 
#define YI_DEFAULT_MOVE_AND_COPY(TypeName)
 Explicitly define the copy constructor and move constructor, as well as assignment operators for each. More...
 
#define YI_DEFAULT_MOVE_NO_COPY(TypeName)
 Explicitly define the default move constructor and assignment operator, but disallow copying. More...
 
#define YI_DEFAULT_MOVE(TypeName)
 Explicitly define the default move constructor and assignment operator. More...
 
#define YI_DEFAULT_COPY(TypeName)
 Explicitly define the default copy constructor and assignment operator. More...
 
#define YI_REMOVE_CONSTANT_CONDITION(x)
 This is a C++ trick for avoiding constant condition warnings, particularly in Microsoft compilers. More...
 
#define YI_LITTLE_ENDIAN_16(a)   (a)
 
#define YI_LITTLE_ENDIAN_24(a)   (a)
 
#define YI_LITTLE_ENDIAN_32(a)   (a)
 
#define YI_LITTLE_ENDIAN_64(a)   (a)
 
#define YI_SYSTEM_FREE(a)   free(a)
 
#define YI_SYSTEM_MALLOC(a)   malloc(a)
 
#define YI_SYSTEM_REALLOC(a, b)   realloc(a, b)
 
#define YI_MEMCMP(a, b, c)   memcmp(a, b, c)
 
#define YI_MEMMOVE(a, b, c)   memmove(a, b, c)
 
#define YI_MEMCOPY(a, b, c)   memcpy(a, b, c)
 
#define YI_MEMSET(a, b, c)   memset(a, b, c)
 
#define YI_STRCAT(a, b)   strcat(a, b)
 
#define YI_STRCHR(a, b)   strchr(a, b)
 
#define YI_STRCMP(a, b)   strcmp(a, b)
 
#define YI_STRCPY(a, b)   strcpy(a, b)
 
#define YI_STRUP(a)   strdup(a)
 
#define YI_STRLEN(a)   strlen(a)
 
#define YI_STRREV(a)   STRREV(a)
 
#define YI_STRNCMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNICMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNCAT(a, b, c)   strncat(a, b, c)
 
#define YI_STRNCPY(a, b, c)   strncpy(a, b, c)
 
#define YI_STRRCHR(a, b)   strrchr(a, b)
 
#define YI_STRTOUL(a, b, c)   strtoul(a, b, c)
 
#define YI_VSNPRINTF(a, b, c, d)   vsnprintf(a, b, c, d)
 
#define YI_STRICMP(a, b)   strcmp(a, b)
 
#define YI_SPRINTF   sprintf
 
#define YI_SNPRINTF   snprintf
 
#define YI_ATOI(a)   atoi(a)
 
#define YI_ATOF(a)   atof(a)
 
#define YI_WCSCPY(a, b)   wcscpy(a, b)
 
#define YI_WCSNCPY(a, b, c)   wcsncpy(a, b, (size_t)c)
 
#define YI_WCSCAT(a, b)   wcscat(a, b)
 
#define YI_WCSLEN(a)   (int32_t) wcslen(a)
 
#define YI_WCSREV(a)   WCSREV(a)
 
#define YI_WCSCMP(a, b)   wcscmp(a, b)
 
#define YI_WCSNCMP(a, b, c)   wcsncmp(a, b, (size_t)c)
 
#define YI_WCSICMP(a, b)   WCSICMP(a, b)
 
#define YI_WCSNICMP(a, b, c)   WCSNICMP(a, b, (size_t)c)
 
#define YI_WCSNCAT(a, b, c)   wcsncat(a, b, (size_t)c)
 
#define YI_SLEEP(x)   usleep((x)*1000)
 
#define YI_USLEEP(x)   usleep(x)
 
#define YI_FILE   FILE
 
#define YI_FREAD   (size_t) fread
 
#define YI_FWRITE   fwrite
 
#define YI_FGETC   fgetc
 
#define YI_FPUTC   fputc
 
#define YI_KEYCODE_HOME_BUTTON   0x00000003
 
#define YI_KEYCODE_BACK_BUTTON   0x00000004
 
#define YI_HAS_VIRTUAL_KEYBOARD
 
#define YI_SYSTEM_FREE(a)   free(a)
 
#define YI_SYSTEM_MALLOC(a)   malloc(a)
 
#define YI_SYSTEM_REALLOC(a, b)   realloc(a, b)
 
#define YI_MEMCMP(a, b, c)   memcmp(a, b, c)
 
#define YI_MEMMOVE(a, b, c)   memmove(a, b, c)
 
#define YI_MEMCOPY(a, b, c)   memcpy(a, b, c)
 
#define YI_MEMSET(a, b, c)   memset(a, b, c)
 
#define YI_STRCAT(a, b)   strcat(a, b)
 
#define YI_STRCHR(a, b)   strchr(a, b)
 
#define YI_STRCMP(a, b)   strcmp(a, b)
 
#define YI_STRCPY(a, b)   strcpy(a, b)
 
#define YI_STRLEN(a)   strlen(a)
 
#define YI_STRREV(a)   STRREV(a)
 
#define YI_STRNCMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNICMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNCAT(a, b, c)   strncat(a, b, c)
 
#define YI_STRNCPY(a, b, c)   strncpy(a, b, c)
 
#define YI_STRRCHR(a, b)   strrchr(a, b)
 
#define YI_STRTOUL(a, b, c)   strtoul(a, b, c)
 
#define YI_VSNPRINTF(a, b, c, d)   vsnprintf(a, b, c, d)
 
#define YI_STRICMP(a, b)   strcasecmp(a, b)
 
#define YI_SPRINTF   sprintf
 
#define YI_SNPRINTF   snprintf
 
#define YI_ATOI(a)   atoi(a)
 
#define YI_ATOF(a)   atof(a)
 
#define YI_WCSCPY   WCSCPY
 
#define YI_WCSNCPY   WCSNCPY
 
#define YI_WCSLEN   WCSLEN
 
#define YI_WCSREV   WCSREV
 
#define YI_WCSCMP   WCSCMP
 
#define YI_WCSNCMP   WCSNCMP
 
#define YI_WCSICMP   WCSICMP
 
#define YI_WCSNICMP   WCSNICMP
 
#define YI_WCSCAT   WCSCAT
 
#define YI_WCSNCAT   WCSNCAT
 
#define YI_WCSSTR   WCSSTR
 
#define YI_WCSCHR   WCSCHR
 
#define YI_SWPRINTF   swprintf
 
#define YI_SLEEP(x)   usleep((x)*1000)
 
#define YI_USLEEP(x)   usleep(x)
 
#define YI_FILE   FILE
 
#define YI_FREAD   (size_t) fread
 
#define YI_FWRITE   fwrite
 
#define YI_FGETC   fgetc
 
#define YI_FPUTC   fputc
 
#define _SIZE_T_DEFINED
 
#define YI_SYSTEM_FREE(a)   free(a)
 
#define YI_SYSTEM_MALLOC(a)   malloc(a)
 
#define YI_SYSTEM_REALLOC(a, b)   realloc(a, b)
 
#define YI_MEMCMP(a, b, c)   memcmp(a, b, c)
 
#define YI_MEMMOVE(a, b, c)   memmove(a, b, c)
 
#define YI_MEMCOPY(a, b, c)   memcpy(a, b, c)
 
#define YI_MEMSET(a, b, c)   memset(a, b, c)
 
#define YI_STRCAT(a, b)   strcat(a, b)
 
#define YI_STRCHR(a, b)   strchr(a, b)
 
#define YI_STRCMP(a, b)   strcmp(a, b)
 
#define YI_STRCPY(a, b)   strcpy(a, b)
 
#define YI_STRLEN(a)   strlen(a)
 
#define YI_STRREV(a)   STRREV(a)
 
#define YI_STRNCMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNICMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNCAT(a, b, c)   strncat(a, b, c)
 
#define YI_STRNCPY(a, b, c)   strncpy(a, b, c)
 
#define YI_STRRCHR(a, b)   strrchr(a, b)
 
#define YI_STRTOUL(a, b, c)   strtoul(a, b, c)
 
#define YI_VSNPRINTF(a, b, c, d)   vsnprintf(a, b, c, d)
 
#define YI_STRICMP(a, b)   strcasecmp(a, b)
 
#define YI_SPRINTF   sprintf
 
#define YI_SNPRINTF   snprintf
 
#define YI_ATOI(a)   atoi(a)
 
#define YI_ATOF(a)   atof(a)
 
#define YI_WCSCPY   WCSCPY
 
#define YI_WCSNCPY   WCSNCPY
 
#define YI_WCSLEN   WCSLEN
 
#define YI_WCSREV   WCSREV
 
#define YI_WCSCMP   WCSCMP
 
#define YI_WCSNCMP   WCSNCMP
 
#define YI_WCSICMP   WCSICMP
 
#define YI_WCSNICMP   WCSNICMP
 
#define YI_WCSCAT   WCSCAT
 
#define YI_WCSNCAT   WCSNCAT
 
#define YI_WCSSTR   WCSSTR
 
#define YI_WCSCHR   WCSCHR
 
#define YI_SWPRINTF   swprintf
 
#define YI_SLEEP(x)   usleep((x)*1000)
 
#define YI_USLEEP(x)   usleep(x)
 
#define YI_FILE   FILE
 
#define YI_FREAD   (size_t) fread
 
#define YI_FWRITE   fwrite
 
#define YI_FGETC   fgetc
 
#define YI_FPUTC   fputc
 
#define _SIZE_T
 
#define _SIZE_T_DEFINED
 
#define YI_SYSTEM_FREE(a)   free(a)
 
#define YI_SYSTEM_MALLOC(a)   malloc(a)
 
#define YI_SYSTEM_REALLOC(a, b)   realloc(a, b)
 
#define YI_MEMCMP(a, b, c)   memcmp(a, b, c)
 
#define YI_MEMMOVE(a, b, c)   memmove(a, b, c)
 
#define YI_MEMCOPY(a, b, c)   memcpy(a, b, c)
 
#define YI_MEMSET(a, b, c)   memset(a, b, c)
 
#define YI_STRCAT(a, b)   strcat(a, b)
 
#define YI_STRCHR(a, b)   strchr(a, b)
 
#define YI_STRCMP(a, b)   strcmp(a, b)
 
#define YI_STRCPY(a, b)   strcpy(a, b)
 
#define YI_STRLEN(a)   strlen(a)
 
#define YI_STRREV(a)   STRREV(a)
 
#define YI_STRNCMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNICMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNCAT(a, b, c)   strncat(a, b, c)
 
#define YI_STRNCPY(a, b, c)   strncpy(a, b, c)
 
#define YI_STRRCHR(a, b)   strrchr(a, b)
 
#define YI_STRTOUL(a, b, c)   strtoul(a, b, c)
 
#define YI_VSNPRINTF(a, b, c, d)   vsnprintf(a, b, c, d)
 
#define YI_STRICMP(a, b)   strcasecmp(a, b)
 
#define YI_SPRINTF   sprintf
 
#define YI_SNPRINTF   snprintf
 
#define YI_ATOI(a)   atoi(a)
 
#define YI_ATOF(a)   atof(a)
 
#define YI_WCSCPY   WCSCPY
 
#define YI_WCSNCPY   WCSNCPY
 
#define YI_WCSLEN   WCSLEN
 
#define YI_WCSREV   WCSREV
 
#define YI_WCSCMP   WCSCMP
 
#define YI_WCSNCMP   WCSNCMP
 
#define YI_WCSICMP   WCSICMP
 
#define YI_WCSNICMP   WCSNICMP
 
#define YI_WCSCAT   WCSCAT
 
#define YI_WCSNCAT   WCSNCAT
 
#define YI_WCSSTR   WCSSTR
 
#define YI_WCSCHR   WCSCHR
 
#define YI_SWPRINTF   swprintf
 
#define YI_SLEEP(x)   sceKernelUsleep((x)*1000)
 
#define YI_USLEEP(x)   sceKernelUsleep(x)
 
#define YI_FILE   FILE
 
#define YI_FREAD   (size_t) fread
 
#define YI_FWRITE   fwrite
 
#define YI_FGETC   fgetc
 
#define YI_FPUTC   fputc
 
#define YI_HAS_VIRTUAL_KEYBOARD   1
 
#define YI_SYNCHRONIZATION_OBJECT_INIT_VALUE   nullptr
 
#define YI_HASINLINE
 
#define YI_SYSTEM_FREE(a)   free(a)
 
#define YI_SYSTEM_MALLOC(a)   malloc(a)
 
#define YI_SYSTEM_REALLOC(a, b)   realloc(a, b)
 
#define YI_MEMCMP(dst, src, size)   memcmp(dst, src, size)
 
#define YI_MEMMOVE(dst, src, size)   memmove(dst, src, size)
 
#define YI_MEMCOPY(dst, src, size)   memcpy(dst, src, size)
 
#define YI_MEMSET(dst, src, size)   memset(dst, src, size)
 
#define YI_STRCAT(a, b)   strcat(a, b)
 
#define YI_STRCHR(a, b)   strchr(a, b)
 
#define YI_STRCMP(a, b)   strcmp(a, b)
 
#define YI_STRCPY(a, b)   strcpy(a, b)
 
#define YI_STRREV(a)   _strrev(a)
 
#define YI_STRLEN(a)   (int32_t) strlen(a)
 
#define YI_STRNCMP(a, b, c)   strncmp(a, b, c)
 
#define YI_STRNCPY(a, b, c)   strncpy(a, b, c)
 
#define YI_STRNCAT(a, b, c)   strncat(a, b, c)
 
#define YI_STRRCHR(a, b)   strrchr(a, b)
 
#define YI_STRTOUL(a, b, c)   strtoul(a, b, c)
 
#define YI_VSNPRINTF(s, c, f, a)   _vsnprintf_s(s, c, _TRUNCATE, f, a)
 
#define YI_STRICMP(a, b)   _stricmp(a, b)
 
#define YI_STRNICMP(a, b, c)   _strnicmp(a, b, c)
 
#define YI_SPRINTF   sprintf
 
#define YI_SNPRINTF(s, c, f, ...)   _snprintf_s(s, c, _TRUNCATE, f, __VA_ARGS__)
 
#define YI_ATOI(a)   atoi(a)
 
#define YI_ATOF(a)   atof(a)
 
#define YI_WCSCPY(a, b)   wcscpy(a, b)
 
#define YI_WCSNCPY(a, b, c)   wcsncpy(a, b, (size_t)c)
 
#define YI_WCSCAT(a, b)   wcscat(a, b)
 
#define YI_WCSLEN(a)   (int32_t) wcslen(a)
 
#define YI_WCSREV(a)   _wcsrev(a)
 
#define YI_WCSCMP(a, b)   wcscmp(a, b)
 
#define YI_WCSNCMP(a, b, c)   wcsncmp(a, b, (size_t)c)
 
#define YI_WCSICMP(a, b)   _wcsicmp(a, b)
 
#define YI_WCSNICMP(a, b, c)   _wcsnicmp(a, b, (size_t)c)
 
#define YI_WCSNCAT(a, b, c)   wcsncat(a, b, (size_t)c)
 
#define YI_WCSSTR   WCSSTR
 
#define YI_WCSCHR   WCSCHR
 
#define YI_SWPRINTF   swprintf
 
#define YI_SLEEP(x)   ::Sleep(x)
 
#define YI_USLEEP(x)   ::Sleep((DWORD)(x) / 1000)
 
#define YI_FILE   FILE
 
#define YI_FREAD   (size_t) fread
 
#define YI_FWRITE   fwrite
 
#define YI_FGETC   fgetc
 
#define YI_FPUTC   fputc
 
#define YI_FERROR   ferror
 
#define YI_KEYCODE_BACK_BUTTON   0x00000008
 
#define YI_ERROR_NONE   0
 
#define YI_ERROR_NOTSUPPORT_BITDEPTH   -10
 
#define YI_ERROR_NOTSUPPORT_SCREENACCESS   -20
 
#define YI_ERROR_NOTSUPPORT_INPUTACCESS   -30
 
#define YI_ERROR_DISPLAY_BUFFER_CREATION   -40
 
#define YI_ASSERT(condition, tag, msg, ...)   YI_REMOVE_CONSTANT_CONDITION(YI_UNUSED(sizeof(condition)); YI_UNUSED(tag);)
 Platform-independent assertion macro. More...
 
#define YI_MAKE_VARIADIC_MACRO(fn, ...)
 
#define YI_MAKE_VARIADIC_MACRO_2(fn, ...)
 
#define YI_STRINGIFY(x)
 
#define YI_CONCATENATE
 
#define YI_STATIC_ASSERT(EXPRESSION, MSG)
 
#define YI_WARNING(MSG)
 
#define YI_ERROR(MSG)
 
#define YI_ENSURE_STRING_LITERAL(x)   "" x ""
 
#define YI_TYPE_BASES(CLASS, BASES...)
 
#define YI_TYPE_DEF(CLASS, BASES...)
 
#define YI_TYPE_DEF_WITH_NAME(CLASS, NAME, BASES...)
 
#define YI_TYPE_DEF_INST(CLASS, BASES...)
 
#define YI_TYPE_DEF_INST_WITH_NAME(CLASS, NAME, BASES...)
 

Typedefs

typedef uint8_t yi::deprecated::YI_UINT8
 
typedef int8_t yi::deprecated::YI_INT8
 
typedef uint16_t yi::deprecated::YI_UINT16
 
typedef int16_t yi::deprecated::YI_INT16
 
typedef uint32_t yi::deprecated::YI_UINT32
 
typedef int32_t yi::deprecated::YI_INT32
 
typedef uint64_t yi::deprecated::YI_UINT64
 
typedef int64_t yi::deprecated::YI_INT64
 
typedef float yi::deprecated::YI_FLOAT
 
typedef double yi::deprecated::YI_DOUBLE
 
typedef ssize_t yi::deprecated::YI_UID
 
typedef wchar_t yi::deprecated::YI_WCHAR
 
typedef char yi::deprecated::YI_CHAR
 
typedef char16_t yi::deprecated::YI_CHAR16
 
typedef char32_t yi::deprecated::YI_CHAR32
 
typedef intptr_t yi::deprecated::YI_INTPTR
 
typedef uintptr_t yi::deprecated::YI_UINTPTR
 
typedef size_t yi::deprecated::YI_SIZE
 
typedef ssize_t yi::deprecated::YI_SSIZE
 
typedef void * HANDLE
 
typedef unsigned long size_t
 
typedef void * HANDLE
 
typedef unsigned int size_t
 
typedef void * HANDLE
 
typedef int ssize_t
 
typedef struct memsource_struct YI_MEMSRC
 
typedef YiIntegralConstant< bool, true > YiTrueType
 
typedef YiIntegralConstant< bool, false > YiFalseType
 

Functions

template<typename T >
std::decay_t< T > & AnyCast (CYIAny &any)
 
template<typename T >
const std::decay_t< T > & AnyCast (const CYIAny &any)
 
template<typename T >
std::decay_t< T > * AnyCast (CYIAny *pAny)
 
template<typename T >
const std::decay_t< T > * AnyCast (const CYIAny *pAny)
 
template<typename T , typename... Args>
int sprintf (T &&, Args &&...)
 
bool operator== (const CYIColor &lhs, const CYIColor &rhs)
 
bool operator!= (const CYIColor &lhs, const CYIColor &rhs)
 
bool operator< (const CYIColor &lhs, const CYIColor &rhs)
 
CYIDateTime operator+ (CYIDateTime lhs, CYIDateTime::TimeDelta delta)
 
CYIDateTime operator- (CYIDateTime lhs, CYIDateTime::TimeDelta delta)
 
CYIDateTime::TimeDelta operator- (const CYIDateTime &a, const CYIDateTime &b)
 
std::ostream & operator<< (std::ostream &rStream, const CYIDateTime &rVal)
 
template<typename E >
constexpr std::enable_if< YiEnableBitmaskOperators< E >::enable, E >::type operator| (E a, E b)
 
template<typename E >
constexpr std::enable_if< YiEnableBitmaskOperators< E >::enable, E >::type operator& (E a, E b)
 
template<typename E >
constexpr std::enable_if< YiEnableBitmaskOperators< E >::enable, E >::type operator^ (E a, E b)
 
template<typename E >
constexpr std::enable_if< YiEnableBitmaskOperators< E >::enable, E >::type operator~ (E a)
 
template<typename E >
std::enable_if< YiEnableBitmaskOperators< E >::enable, E >::type & operator|= (E &a, E b)
 
template<typename E >
std::enable_if< YiEnableBitmaskOperators< E >::enable, E >::type & operator&= (E &a, E b)
 
template<typename E >
std::enable_if< YiEnableBitmaskOperators< E >::enable, E >::type & operator^= (E &a, E b)
 
template<typename E >
constexpr std::enable_if< YiEnableBitmaskOperators< E >::enable, bool >::type Any (E a)
 
template<typename E >
constexpr std::enable_if< YiEnableBitmaskOperators< E >::enable, bool >::type None (E a)
 
template<typename E >
constexpr std::enable_if< YiEnableBitmaskOperators< E >::enable, typename std::underlying_type< E >::type >::type ToInteger (E a)
 
YI_MEMSRCYI_MOPEN (const uint8_t *data, size_t size)
 
void YI_MCLOSE (YI_MEMSRC *mp)
 
size_t YI_MTELL (YI_MEMSRC *mp)
 
void YI_MSEEK (YI_MEMSRC *mp, size_t pos, int32_t mode)
 
size_t YI_MREAD (void *dest, size_t size, size_t count, YI_MEMSRC *mp)
 
void * YI_VOID_MOPEN (void *data, char *mode, size_t size)
 
void YI_VOID_MCLOSE (void *mp)
 
size_t YI_VOID_MTELL (void *mp)
 
void YI_VOID_MSEEK (void *mp, size_t pos, int32_t mode)
 
size_t YI_VOID_MREAD (void *dest, size_t size, size_t count, void *mp)
 
void * YI_VOID_FOPEN (void *filepath, char *mode, size_t size)
 
void YI_VOID_FCLOSE (void *fp)
 
size_t YI_VOID_FTELL (void *fp)
 
void YI_VOID_FSEEK (void *fp, size_t pos, int32_t mode)
 
size_t YI_VOID_FREAD (void *dest, size_t size, size_t count, void *fp)
 
void * YI_MALLOC (size_t size)
 
void * YI_CALLOC (size_t size)
 
void * YI_REALLOC (void *pOldBuf, size_t size)
 
void YI_FREE (void *pBuf)
 
template<typename T , typename... Args>
constexpr CYIOptional< T > YiMakeOptional (Args &&...args)
 
template<typename T1 , typename T2 >
constexpr bool operator== (const CYIOptional< T1 > &first, const CYIOptional< T2 > &second)
 
template<typename T , typename U >
constexpr bool operator== (const CYIOptional< T > &first, const U &second)
 
template<typename T , typename U >
constexpr bool operator== (const U &first, const CYIOptional< T > &second)
 
template<typename T >
constexpr bool operator== (const CYIOptional< T > &first, const CYIEmptyOptionalType &)
 
template<typename T >
constexpr bool operator== (const CYIEmptyOptionalType &, const CYIOptional< T > &second)
 
template<typename T1 , typename T2 >
constexpr bool operator!= (const CYIOptional< T1 > &first, const CYIOptional< T2 > &second)
 
template<typename T , typename U >
constexpr bool operator!= (const CYIOptional< T > &first, const U &second)
 
template<typename T , typename U >
constexpr bool operator!= (const U &first, const CYIOptional< T > &second)
 
template<typename T1 , typename T2 >
constexpr bool operator< (const CYIOptional< T1 > &first, const CYIOptional< T2 > &second)
 
template<typename T , typename U >
constexpr bool operator< (const CYIOptional< T > &first, const U &second)
 
template<typename T , typename U >
constexpr bool operator< (const U &first, const CYIOptional< T > &second)
 
template<typename T >
constexpr bool operator< (const CYIOptional< T > &first, const CYIEmptyOptionalType &)
 
template<typename T >
constexpr bool operator< (const CYIEmptyOptionalType &, const CYIOptional< T > &second)
 
template<typename T1 , typename T2 >
constexpr bool operator> (const CYIOptional< T1 > &first, const CYIOptional< T2 > &second)
 
template<typename T , typename U >
constexpr bool operator> (const CYIOptional< T > &first, const U &second)
 
template<typename T , typename U >
constexpr bool operator> (const U &first, const CYIOptional< T > &second)
 
template<typename T >
constexpr bool operator> (const CYIOptional< T > &first, const CYIEmptyOptionalType &)
 
template<typename T >
constexpr bool operator> (const CYIEmptyOptionalType &, const CYIOptional< T > &second)
 
template<typename T1 , typename T2 >
constexpr bool operator>= (const CYIOptional< T1 > &first, const CYIOptional< T2 > &second)
 
template<typename T , typename U >
constexpr bool operator>= (const CYIOptional< T > &first, const U &second)
 
template<typename T , typename U >
constexpr bool operator>= (const U &first, const CYIOptional< T > &second)
 
template<typename T1 , typename T2 >
constexpr bool operator<= (const CYIOptional< T1 > &first, const CYIOptional< T2 > &second)
 
template<typename T , typename U >
constexpr bool operator<= (const CYIOptional< T > &first, const U &second)
 
template<typename T , typename U >
constexpr bool operator<= (const U &first, const CYIOptional< T > &second)
 
std::ostream & operator<< (std::ostream &stream, const CYIPreferences &val)
 
template<typename TARGET , typename SOURCE >
TARGET * YiDynamicCast (SOURCE *pObject)
 Casts the pointer pObject to type T*. More...
 
template<typename TARGET , typename SOURCE >
std::shared_ptr< TARGET > YiDynamicPointerCast (const std::shared_ptr< SOURCE > &pObject)
 Casts the shared pointer pObject to shared pointer type T*. More...
 
template<typename TARGET , typename SOURCE >
std::shared_ptr< TARGET > YiDynamicCast (const std::shared_ptr< SOURCE > &pObject)
 Casts the shared pointer pObject to shared pointer type T*. More...
 
template<typename T >
std::unique_ptr< T > YiRTTINew (CYIStringView name)
 Creates a new instance of the type identifed by name. More...
 
const CYIRuntimeTypeInfoYiGetTypeInfo (const char *pTypeName)
 
const CYIRuntimeTypeInfoYiGetTypeInfo (CYIStringView typeName)
 
template<typename T >
const CYIRuntimeTypeInfoYiGetTypeInfo (T *pObject)
 
std::ostream & operator<< (std::ostream &stream, const CYIString &val)
 
std::istream & operator>> (std::istream &stream, CYIString &val)
 
CYIString operator+ (CYIStringView lhs, CYIStringView rhs)
 
template<class T >
constexpr bool operator== (CYIStringView lhs, T rhs) noexcept
 
template<class T >
constexpr bool operator== (T lhs, CYIStringView rhs) noexcept
 
template<class T >
constexpr bool operator!= (CYIStringView lhs, T rhs) noexcept
 
template<class T >
constexpr bool operator!= (T lhs, CYIStringView rhs) noexcept
 
wchar_t * WStrDup (const wchar_t *pStr)
 
char * YI_STRDUP (const char *pStr)
 
wchar_t * WCSNCPY (wchar_t *pDest, const wchar_t *pSrc, int32_t count)
 
wchar_t * WCSCPY (wchar_t *pDest, const wchar_t *pSrc)
 
int16_t WCSNCMP (const wchar_t *pDest, const wchar_t *pSrc, int32_t count)
 
int16_t WCSCMP (const wchar_t *pStr1, const wchar_t *pStr2)
 
int16_t WCSNICMP (const wchar_t *pDest, const wchar_t *pSrc, int32_t count)
 
int16_t WCSICMP (const wchar_t *pStr1, const wchar_t *pStr2)
 
int16_t STRICMP (const char *pStr1, const char *pStr2)
 
int16_t STRNICMP (const char *pDest, const char *pSrc, int32_t count)
 
wchar_t * WCSCAT (wchar_t *pDest, const wchar_t *pSrc)
 
wchar_t * WCSNCAT (wchar_t *pDest, const wchar_t *pSrc, int32_t count)
 
wchar_t * WCSSTR (wchar_t *pData, wchar_t *pString)
 
wchar_t * WCSCHR (wchar_t *pData, wchar_t iSymbol)
 
uint32_t WCSLEN (const wchar_t *str)
 
wchar_t * WCSREV (wchar_t *pSrc)
 
char * STRREV (char *pSrc)
 
std::ostream & operator<< (std::ostream &stream, const CYIStringView &val)
 
YI_CONSTEXPR bool operator== (CYIStringView lhs, CYIStringView rhs) noexcept
 
YI_CONSTEXPR bool operator!= (CYIStringView lhs, CYIStringView rhs) noexcept
 
bool operator< (CYIStringView lhs, CYIStringView rhs) noexcept
 
bool operator> (CYIStringView lhs, CYIStringView rhs) noexcept
 
bool operator<= (CYIStringView lhs, CYIStringView rhs) noexcept
 
bool operator>= (CYIStringView lhs, CYIStringView rhs) noexcept
 
CYIString YiTranslate (const CYIString &text)
 
CYIString YiTranslateMarker (const CYIString &text)
 
bool YiGetFileName (char &pFileName, char *pFilter)
 
CYIString YiGetLocalDirectory ()
 
bool YiMakeDirectory (const CYIString &path)
 
bool YiDeleteFile (const CYIString &path)
 
bool YiDeleteFile (const char *pPath)
 
bool YiCopyFile (const char *pSourcePath, const char *pDestinationPath)
 
bool YiFilesAreIdentical (const char *pReferencePath, const char *pTestPath)
 
template<typename YI_SWAP_TYPE >
void YI_SWAP (YI_SWAP_TYPE &a, YI_SWAP_TYPE &b)
 
YI_EXTERNINLINE uint16_t RandomWORD (void)
 
YI_EXTERNINLINE int32_t YI_MIN4 (int32_t a, int32_t b, int32_t c, int32_t d)
 
YI_EXTERNINLINE int32_t YI_MAX4 (int32_t a, int32_t b, int32_t c, int32_t d)
 
bool CompareNames (wchar_t *Name, wchar_t *Compare)
 
YI_FILEYI_FOPEN (const char *pPath, const char *pMode)
 
YI_FILEYI_WFOPEN (const wchar_t *pPath, const wchar_t *pMode)
 
void YI_FCLOSE (YI_FILE *pFile)
 
ssize_t YI_FSEEK (YI_FILE *pFile, size_t pos, int32_t mode)
 
size_t YI_FTELL (YI_FILE *pFile)
 
int32_t YI_TRUNCATE (YI_FILE *pFile, int32_t length)
 
uint64_t YiGetTimeuS (void)
 
void YILockFrameRate (int32_t fps)
 
uint8_t * YiReadFile (YI_FILE *pFile, size_t *pBufferSize, size_t additionalPadding)
 
std::vector< char > YiBase64Encode (CYIStringView data)
 
std::vector< char > YiBase64Encode (const char *pData, size_t unInputLength)
 
std::vector< char > YiBase64Decode (CYIStringView data)
 
std::vector< char > YiBase64Decode (const char *pData, size_t unInputLength)
 
std::vector< char > YiBase16Decode (CYIStringView str)
 
std::vector< char > YiBase16Decode (const char *pData, size_t unInputLength)
 
constexpr bool YiIsLittleEndian ()
 
constexpr bool YiIsBigEndian ()
 
uint32_t YiFromBigEndian (uint32_t bigEndianValue)
 
template<typename T , size_t N>
size_t YI_SIZE_OF_ARRAY (const T(&a)[N])
 
uint64_t YiTimestampToUs (uint64_t timestamp, uint64_t scale)
 
 YI_RECT::YI_RECT (const YI_RECT_REL &rect)
 
YI_RECTYI_RECT::operator= (const YI_RECT_REL &rect)
 
 YI_FLOAT_RECT::YI_FLOAT_RECT (const YI_FLOAT_RECT_REL &rect)
 
YI_FLOAT_RECTYI_FLOAT_RECT::operator= (const YI_FLOAT_RECT_REL &rect)
 
static glm::vec3 CYIMatrixUtilities::TransformVector (const glm::mat4 &rMat4x4, const glm::vec3 &rV)
 
static glm::vec3 CYIMatrixUtilities::ProjectVector (const glm::vec3 &A, const glm::vec3 &normalizedB)
 
virtual ErrorType CYIParsingError::GetParsingErrorCode () const
 
virtual CYIString CYIParsingError::GetParsingErrorMessage () const
 
virtual void CYIParsingError::SetParsingErrorCode (ErrorType errorCode)
 
virtual void CYIParsingError::SetParsingErrorMessage (CYIString errorMessage)
 
virtual bool CYIParsingError::HasError () const
 
virtual bool CYIParsingError::IsRequiredField (const CYIString &rFieldName) const
 

Variables

constexpr CYIEmptyOptionalType YiEmptyOptional = {}
 A value used to assign 'empty' to a CYIOptional object. While {} can also be assigned, using this value may be more descriptive. More...
 

Macro Definition Documentation

#define _SIZE_T
#define _SIZE_T_DEFINED
#define _SIZE_T_DEFINED
#define gets (   str)    YI_ERROR("gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.")
#define strcat (   dst,
  src 
)    YI_ERROR("strcat: Does not check for buffer overflows when concatenating to destination (CWE-120). Consider using YI_STRNCAT, strcat_s, or strlcat (warning, YI_STRNCAT is easily misused).")
#define strcpy (   dst,
  src 
)    YI_ERROR("strcpy: Does not check for buffer overflows when copying to destination (CWE-120). Consider using YI_STRNCPY, strcpy_s, or strlcpy (warning, YI_STRNCAT is easily misused).")
#define wcscat (   dst,
  src 
)    YI_ERROR("wcscat: Does not check for buffer overflows when concatenating to destination (CWE-120).")
#define wcscpy (   dst,
  src 
)    YI_ERROR("wcscpy: Does not check for buffer overflows when copying to destination (CWE-120). Consider using a function version that stops copying at the end of the buffer.")
#define YI_ASSERT (   condition,
  tag,
  msg,
  ... 
)    YI_REMOVE_CONSTANT_CONDITION(YI_UNUSED(sizeof(condition)); YI_UNUSED(tag);)

Platform-independent assertion macro.

This macro gets turned into a no-op when you are building with debugging turned off. Be careful that the expression you pass to it does not perform actions that are vital for the correct behaviour of your program.

#define YI_ATOF (   a)    atof(a)
#define YI_ATOF (   a)    atof(a)
#define YI_ATOF (   a)    atof(a)
#define YI_ATOF (   a)    atof(a)
#define YI_ATOF (   a)    atof(a)
#define YI_ATOI (   a)    atoi(a)
#define YI_ATOI (   a)    atoi(a)
#define YI_ATOI (   a)    atoi(a)
#define YI_ATOI (   a)    atoi(a)
#define YI_ATOI (   a)    atoi(a)
#define YI_CONCATENATE

A macro used to concatenate two preprocessor tokens.

Example:

1 int YI_CONCATENATE(m_uniqueMemberAtLine, __LINE__);
#define YI_DEFAULT_COPY (   TypeName)
Value:
TypeName &operator=(const TypeName &) = default; \
TypeName(const TypeName &) = default;

Explicitly define the default copy constructor and assignment operator.

#define YI_DEFAULT_MOVE (   TypeName)
Value:
TypeName &operator=(TypeName &&) = default; \
TypeName(TypeName &&) = default;

Explicitly define the default move constructor and assignment operator.

#define YI_DEFAULT_MOVE_AND_COPY (   TypeName)
Value:
TypeName &operator=(const TypeName &) = default; \
TypeName &operator=(TypeName &&) = default; \
TypeName(const TypeName &) = default; \
TypeName(TypeName &&) = default;

Explicitly define the copy constructor and move constructor, as well as assignment operators for each.

#define YI_DEFAULT_MOVE_NO_COPY (   TypeName)
Value:
TypeName &operator=(const TypeName &) = delete; \
TypeName &operator=(TypeName &&) = default; \
TypeName(const TypeName &) = delete; \
TypeName(TypeName &&) = default;

Explicitly define the default move constructor and assignment operator, but disallow copying.

#define YI_DISALLOW_COPY_AND_ASSIGN (   TypeName)
Value:
TypeName(const TypeName &) = delete; \
TypeName &operator=(const TypeName &) = delete;

Delete the copy constructor and assignment operator (and consequently the move constructor as well)

#define YI_ENSURE_STRING_LITERAL (   x)    "" x ""

A macro used to ensure that an expression is a string literal

Example:

1 YI_ENSURE_STRING_LITERAL("hello world."); // ok
2 
3 const char *msg = "hello world.";
4 YI_ENSURE_STRING_LITERAL(msg); // compile error
#define YI_ENV_32   1
#define YI_ERROR (   MSG)

A macro that outputs the provided message as a compiler error. This is equivalent to #error, but can also be used within other macros.

Example:

1 #define A_REALLY_OLD_MACRO YI_ERROR("The macro A_REALLY_OLD_MACRO is no longer available. Please use A_NEWER_MACRO instead.")
#define YI_ERROR_DISPLAY_BUFFER_CREATION   -40
#define YI_ERROR_NONE   0
#define YI_ERROR_NOTSUPPORT_BITDEPTH   -10
#define YI_ERROR_NOTSUPPORT_INPUTACCESS   -30
#define YI_ERROR_NOTSUPPORT_SCREENACCESS   -20
#define YI_EXTERNINLINE
#define YI_FERROR   ferror
#define YI_FGETC   fgetc
#define YI_FGETC   fgetc
#define YI_FGETC   fgetc
#define YI_FGETC   fgetc
#define YI_FGETC   fgetc
#define YI_FILE   FILE
#define YI_FILE   FILE
#define YI_FILE   FILE
#define YI_FILE   FILE
#define YI_FILE   FILE
#define YI_FLOAT_EQUAL (   a,
 
)    ((a) >= ((b)-FLT_EPSILON) && (a) <= ((b) + FLT_EPSILON))
#define YI_FORCE_INLINE   inline
#define YI_FPUTC   fputc
#define YI_FPUTC   fputc
#define YI_FPUTC   fputc
#define YI_FPUTC   fputc
#define YI_FPUTC   fputc
#define YI_FREAD   (size_t) fread
#define YI_FREAD   (size_t) fread
#define YI_FREAD   (size_t) fread
#define YI_FREAD   (size_t) fread
#define YI_FREAD   (size_t) fread
#define YI_FULLY_SUPPORTS_CPP14_CONSTEXPR   1
#define YI_FUNCTION_SPECIALIZATION_FULLY_SUPPORTED
#define YI_FWRITE   fwrite
#define YI_FWRITE   fwrite
#define YI_FWRITE   fwrite
#define YI_FWRITE   fwrite
#define YI_FWRITE   fwrite
#define YI_HAS_VIRTUAL_KEYBOARD   1
#define YI_HAS_VIRTUAL_KEYBOARD
#define YI_HASINLINE
#define YI_INLINE
#define YI_IS_LITTLE_ENDIAN   1
#define YI_KEYCODE_BACK_BUTTON   0x00000004
#define YI_KEYCODE_BACK_BUTTON   0x00000008
#define YI_KEYCODE_HOME_BUTTON   0x00000003
#define YI_LITTLE_ENDIAN_16 (   a)    (a)
#define YI_LITTLE_ENDIAN_24 (   a)    (a)
#define YI_LITTLE_ENDIAN_32 (   a)    (a)
#define YI_LITTLE_ENDIAN_64 (   a)    (a)
#define YI_MAKE_VARIADIC_MACRO (   fn,
  ... 
)

A macro used to create a variadic macro. Calls to this macro are distributed to one or more other macros, depending on the number of parameters provided in the macro invocation. Up to 62 parameters are supported.

Example:

1 #define MY_FUNCTION(...) YI_MAKE_VARIADIC_MACRO(MY_FUNCTION_, ##__VA_ARGS__)
2 #define MY_FUNCTION_1(A) do_stuff(A);
3 #define MY_FUNCTION_2(A, B) do_stuff((A), (B));
Warning
Avoid using the no-arguments version of variadic functions as it is not supported on platforms that use the Visual Studio compiler.
#define YI_MAKE_VARIADIC_MACRO_2 (   fn,
  ... 
)

A macro used to create a variadic macro with up to two definitions. Calls to this macro are distributed to up to 3 macros, depending on the number of parameters provided in the macro invocation. When the macro is called with more than 1 argument, the last macro is called with all remaining arguments. Up to 62 parameters are supported. This macro is generally used to support having a different implementation when called with 1 argument vs when called with more than 1 argument.

Example:

1 #define MY_FUNCTION(...) YI_MAKE_VARIADIC_MACRO_2(MY_FUNCTION_, ##__VA_ARGS__)
2 #define MY_FUNCTION_0() do_stuff();
3 #define MY_FUNCTION_1(A) do_stuff(A);
4 #define MY_FUNCTION_2(A, ...) do_stuff((A), __VA_ARGS__);
Warning
Avoid using the no-arguments version of variadic functions as it is not supported on platforms that use the Visual Studio compiler.
#define YI_MAX (   a,
 
)    (((a) < (b)) ? (b) : (a))
#define YI_MAX_BUFFER   1024
#define YI_MAX_PATH   260
#define YI_MEMCMP (   a,
  b,
 
)    memcmp(a, b, c)
#define YI_MEMCMP (   a,
  b,
 
)    memcmp(a, b, c)
#define YI_MEMCMP (   a,
  b,
 
)    memcmp(a, b, c)
#define YI_MEMCMP (   a,
  b,
 
)    memcmp(a, b, c)
#define YI_MEMCMP (   dst,
  src,
  size 
)    memcmp(dst, src, size)
#define YI_MEMCOPY (   a,
  b,
 
)    memcpy(a, b, c)
#define YI_MEMCOPY (   a,
  b,
 
)    memcpy(a, b, c)
#define YI_MEMCOPY (   a,
  b,
 
)    memcpy(a, b, c)
#define YI_MEMCOPY (   a,
  b,
 
)    memcpy(a, b, c)
#define YI_MEMCOPY (   dst,
  src,
  size 
)    memcpy(dst, src, size)
#define YI_MEMMOVE (   a,
  b,
 
)    memmove(a, b, c)
#define YI_MEMMOVE (   a,
  b,
 
)    memmove(a, b, c)
#define YI_MEMMOVE (   a,
  b,
 
)    memmove(a, b, c)
#define YI_MEMMOVE (   a,
  b,
 
)    memmove(a, b, c)
#define YI_MEMMOVE (   dst,
  src,
  size 
)    memmove(dst, src, size)
#define YI_MEMSET (   a,
  b,
 
)    memset(a, b, c)
#define YI_MEMSET (   a,
  b,
 
)    memset(a, b, c)
#define YI_MEMSET (   a,
  b,
 
)    memset(a, b, c)
#define YI_MEMSET (   a,
  b,
 
)    memset(a, b, c)
#define YI_MEMSET (   dst,
  src,
  size 
)    memset(dst, src, size)
#define YI_MIN (   a,
 
)    (((a) < (b)) ? (a) : (b))
#define YI_NULL   nullptr
Deprecated:
YI_NULL is deprecated and may be removed in future releases. Use nullptr instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
#define YI_REMOVE_CONSTANT_CONDITION (   x)
Value:
do \
{ \
x \
} while ((void)0, 0)

This is a C++ trick for avoiding constant condition warnings, particularly in Microsoft compilers.

Note
Variadic arguments cannot be passed down into the condition body, as most compilers reset the VA_ARGS by the time it parses the code.
See also
https://msdn.microsoft.com/en-us/library/6t66728h.aspx
#define YI_SEEK_CUR   2
#define YI_SEEK_END   1
#define YI_SEEK_SET   0
#define YI_SLEEP (   x)    sceKernelUsleep((x)*1000)
#define YI_SLEEP (   x)    usleep((x)*1000)
#define YI_SLEEP (   x)    usleep((x)*1000)
#define YI_SLEEP (   x)    usleep((x)*1000)
#define YI_SLEEP (   x)    ::Sleep(x)
#define YI_SNPRINTF   snprintf
#define YI_SNPRINTF   snprintf
#define YI_SNPRINTF   snprintf
#define YI_SNPRINTF   snprintf
#define YI_SNPRINTF (   s,
  c,
  f,
  ... 
)    _snprintf_s(s, c, _TRUNCATE, f, __VA_ARGS__)
#define YI_SPRINTF   sprintf
#define YI_SPRINTF   sprintf
#define YI_SPRINTF   sprintf
#define YI_SPRINTF   sprintf
#define YI_SPRINTF   sprintf
#define YI_STATIC_ASSERT (   EXPRESSION,
  MSG 
)
Deprecated:
Please use static_assert instead.

A macro used to perform C++11-style static assertions. An identifier that can represent a C++ type must be used as message.

Example:

1 YI_STATIC_ASSERT(SOME_CONSTANT < 3, some_constant_must_be_smaller_than_3);
#define YI_STRCAT (   a,
 
)    strcat(a, b)
#define YI_STRCAT (   a,
 
)    strcat(a, b)
#define YI_STRCAT (   a,
 
)    strcat(a, b)
#define YI_STRCAT (   a,
 
)    strcat(a, b)
#define YI_STRCAT (   a,
 
)    strcat(a, b)
#define YI_STRCHR (   a,
 
)    strchr(a, b)
#define YI_STRCHR (   a,
 
)    strchr(a, b)
#define YI_STRCHR (   a,
 
)    strchr(a, b)
#define YI_STRCHR (   a,
 
)    strchr(a, b)
#define YI_STRCHR (   a,
 
)    strchr(a, b)
#define YI_STRCMP (   a,
 
)    strcmp(a, b)
#define YI_STRCMP (   a,
 
)    strcmp(a, b)
#define YI_STRCMP (   a,
 
)    strcmp(a, b)
#define YI_STRCMP (   a,
 
)    strcmp(a, b)
#define YI_STRCMP (   a,
 
)    strcmp(a, b)
#define YI_STRCPY (   a,
 
)    strcpy(a, b)
#define YI_STRCPY (   a,
 
)    strcpy(a, b)
#define YI_STRCPY (   a,
 
)    strcpy(a, b)
#define YI_STRCPY (   a,
 
)    strcpy(a, b)
#define YI_STRCPY (   a,
 
)    strcpy(a, b)
#define YI_STRICMP (   a,
 
)    strcasecmp(a, b)
#define YI_STRICMP (   a,
 
)    strcmp(a, b)
#define YI_STRICMP (   a,
 
)    strcasecmp(a, b)
#define YI_STRICMP (   a,
 
)    strcasecmp(a, b)
#define YI_STRICMP (   a,
 
)    _stricmp(a, b)
#define YI_STRINGIFY (   x)

A macro used to convert a preprocessor token to a string.

Example:

1 std::cout << "Line number = " << YI_STRINGIFY(__LINE__) << std::endl;
Warning
This macro does not support being called with no arguments (e.g. YI_STRINGIFY() ).
#define YI_STRLEN (   a)    strlen(a)
#define YI_STRLEN (   a)    strlen(a)
#define YI_STRLEN (   a)    strlen(a)
#define YI_STRLEN (   a)    strlen(a)
#define YI_STRLEN (   a)    (int32_t) strlen(a)
#define YI_STRNCAT (   a,
  b,
 
)    strncat(a, b, c)
#define YI_STRNCAT (   a,
  b,
 
)    strncat(a, b, c)
#define YI_STRNCAT (   a,
  b,
 
)    strncat(a, b, c)
#define YI_STRNCAT (   a,
  b,
 
)    strncat(a, b, c)
#define YI_STRNCAT (   a,
  b,
 
)    strncat(a, b, c)
#define YI_STRNCMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNCMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNCMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNCMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNCMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNCPY (   a,
  b,
 
)    strncpy(a, b, c)
#define YI_STRNCPY (   a,
  b,
 
)    strncpy(a, b, c)
#define YI_STRNCPY (   a,
  b,
 
)    strncpy(a, b, c)
#define YI_STRNCPY (   a,
  b,
 
)    strncpy(a, b, c)
#define YI_STRNCPY (   a,
  b,
 
)    strncpy(a, b, c)
#define YI_STRNICMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNICMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNICMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNICMP (   a,
  b,
 
)    strncmp(a, b, c)
#define YI_STRNICMP (   a,
  b,
 
)    _strnicmp(a, b, c)
#define YI_STRRCHR (   a,
 
)    strrchr(a, b)
#define YI_STRRCHR (   a,
 
)    strrchr(a, b)
#define YI_STRRCHR (   a,
 
)    strrchr(a, b)
#define YI_STRRCHR (   a,
 
)    strrchr(a, b)
#define YI_STRRCHR (   a,
 
)    strrchr(a, b)
#define YI_STRREV (   a)    STRREV(a)
#define YI_STRREV (   a)    STRREV(a)
#define YI_STRREV (   a)    STRREV(a)
#define YI_STRREV (   a)    STRREV(a)
#define YI_STRREV (   a)    _strrev(a)
#define YI_STRTOUL (   a,
  b,
 
)    strtoul(a, b, c)
#define YI_STRTOUL (   a,
  b,
 
)    strtoul(a, b, c)
#define YI_STRTOUL (   a,
  b,
 
)    strtoul(a, b, c)
#define YI_STRTOUL (   a,
  b,
 
)    strtoul(a, b, c)
#define YI_STRTOUL (   a,
  b,
 
)    strtoul(a, b, c)
#define YI_STRUP (   a)    strdup(a)
#define YI_SWPRINTF   swprintf
#define YI_SWPRINTF   swprintf
#define YI_SWPRINTF   swprintf
#define YI_SWPRINTF   swprintf
#define YI_SYNCHRONIZATION_OBJECT_INIT_VALUE
#define YI_SYNCHRONIZATION_OBJECT_INIT_VALUE   nullptr
#define YI_SYSTEM_FREE (   a)    free(a)
#define YI_SYSTEM_FREE (   a)    free(a)
#define YI_SYSTEM_FREE (   a)    free(a)
#define YI_SYSTEM_FREE (   a)    free(a)
#define YI_SYSTEM_FREE (   a)    free(a)
#define YI_SYSTEM_MALLOC (   a)    malloc(a)
#define YI_SYSTEM_MALLOC (   a)    malloc(a)
#define YI_SYSTEM_MALLOC (   a)    malloc(a)
#define YI_SYSTEM_MALLOC (   a)    malloc(a)
#define YI_SYSTEM_MALLOC (   a)    malloc(a)
#define YI_SYSTEM_REALLOC (   a,
 
)    realloc(a, b)
#define YI_SYSTEM_REALLOC (   a,
 
)    realloc(a, b)
#define YI_SYSTEM_REALLOC (   a,
 
)    realloc(a, b)
#define YI_SYSTEM_REALLOC (   a,
 
)    realloc(a, b)
#define YI_SYSTEM_REALLOC (   a,
 
)    realloc(a, b)
#define YI_TEXT (   quote)    (const char *)quote
#define YI_TEXT16 (   quote)    (const char16_t *)L##quote
#define YI_TEXT32 (   quote)    (const char32_t *)L##quote
#define YI_TYPE_BASES (   CLASS,
  BASES... 
)

A macro used to declare a class as being an RTTI type.

To use, the macro should be inserted into the class declaration (typically in a header file). The the class name must be provided as the first argument to the macro. If the class has RTTI'ed bases, those bases should be listed, in order, after the class name. By convention, the call to YI_TYPE_BASES(...) is typically placed at the end of the class' declaration.

Example:

1 class MyView : public CYISceneView
2 {
3  void Foo();
4  YI_TYPE_BASES(MyView, CYISceneView)
5 };
Note
The bases of the bases of the class should not be specified in the YI_TYPE_BASES(...) call. In the previous example, CYISceneNode is a base of CYISceneView, but is not listed in the YI_TYPE_BASES(...) call.
See also
YI_TYPE_DEF(...)
#define YI_TYPE_DEF (   CLASS,
  BASES... 
)

A macro used to define a class as being an RTTI type.

To use, the macro should be inserted in a compilation unit (typically the class's cpp file). The same arguments should be provided to this macro as to YI_TYPE_BASES(...). By convention, the call to YI_TYPE_DEF(...) is typically placed near the top of the class' definition.

Example:

1 YI_TYPE_DEF(MyView, CYISceneView)
2 void MyView::Foo()
3 {
4  // foo function implementation
5 }
Note
The bases of the bases of the class should not be specified in the YI_TYPE_BASES(...) call. In the previous example, CYISceneNode is a base of CYISceneView, but is not listed in the YI_TYPE_BASES(...) call.
See also
YI_TYPE_BASES(...)
YI_TYPE_DEF_WITH_NAME(...)
#define YI_TYPE_DEF_INST (   CLASS,
  BASES... 
)
Deprecated:
This function is deprecated and may be removed in a future release. YI_TYPE_DEF should be used instead (which automatically detects if the associated type is instantiable)

A macro used to define a class as being an instantiable RTTI type.

To use, the macro should be inserted in a compilation unit (typically the class's cpp file). The same arguments should be provided to this macro as to YI_TYPE_BASES(...). By convention, the call to YI_TYPE_DEF_INST(...) is typically placed near the top of the class' definition.

Example:

1 YI_TYPE_DEF_INST(MyView, CYISceneView)
2 void MyView::Foo()
3 {
4 // foo function implementation
5 }
Note
The bases of the bases of the class should not be specified in the YI_TYPE_BASES(...) call. In the previous example, CYISceneNode is a base of CYISceneView, but is not listed in the YI_TYPE_BASES(...) call.
See also
YI_TYPE_DEF(...)
YI_TYPE_BASES(...)
YI_TYPE_DEF_INST_WITH_NAME(...)
#define YI_TYPE_DEF_INST_WITH_NAME (   CLASS,
  NAME,
  BASES... 
)
Deprecated:
This function is deprecated and may be removed in a future release. YI_TYPE_DEF_WITH_NAME should be used instead (which automatically detects if the associated type is instantiable)

A specialized version of YI_TYPE_DEF_INST(...) which allows for specifying the name used to identify the type in the CYIRTTIRegistry instance. This macro's typical use cases are for namespaced types and inner types.

Example:

1 YI_TYPE_DEF_INST_WITH_NAME(MyView, "MyNamespace::MyView", CYISceneView)
2 void MyView::Foo()
3 {
4 // foo function implementation
5 }
See also
YI_TYPE_DEF_WITH_NAME(...)
YI_TYPE_BASES(...)
YI_TYPE_DEF_INST(...)
#define YI_TYPE_DEF_WITH_NAME (   CLASS,
  NAME,
  BASES... 
)

A specialized version of YI_TYPE_DEF(...) which allows for specifying the name used to identify the type in the CYIRTTIRegistry instance. This macro's typical use cases are for namespaced types and inner types.

Example:

1 YI_TYPE_DEF_WITH_NAME(MyView, "MyNamespace::MyView", CYISceneView)
2 void MyView::Foo()
3 {
4 // foo function implementation
5 }
See also
YI_TYPE_BASES(...)
YI_TYPE_DEF(...)
#define YI_UNUSED (   param)    (void)(param)
#define YI_UNUSED_ATTRIBUTE   __attribute__((unused))
#define YI_USLEEP (   x)    sceKernelUsleep(x)
#define YI_USLEEP (   x)    usleep(x)
#define YI_USLEEP (   x)    usleep(x)
#define YI_USLEEP (   x)    usleep(x)
#define YI_USLEEP (   x)    ::Sleep((DWORD)(x) / 1000)
#define YI_VSNPRINTF (   a,
  b,
  c,
 
)    vsnprintf(a, b, c, d)
#define YI_VSNPRINTF (   a,
  b,
  c,
 
)    vsnprintf(a, b, c, d)
#define YI_VSNPRINTF (   a,
  b,
  c,
 
)    vsnprintf(a, b, c, d)
#define YI_VSNPRINTF (   a,
  b,
  c,
 
)    vsnprintf(a, b, c, d)
#define YI_VSNPRINTF (   s,
  c,
  f,
 
)    _vsnprintf_s(s, c, _TRUNCATE, f, a)
#define YI_WARNING (   MSG)

A macro that outputs the provided message as a compiler warning. This is equivalent to #warning, but can also be used within other macros.

Example:

1 #define AN_OLD_MACRO YI_WARNING("The macro AN_OLD_MACRO has been deprecated. Please use A_NEWER_MACRO instead.")
#define YI_WCSCAT (   a,
 
)    wcscat(a, b)
#define YI_WCSCAT   WCSCAT
#define YI_WCSCAT   WCSCAT
#define YI_WCSCAT   WCSCAT
#define YI_WCSCAT (   a,
 
)    wcscat(a, b)
#define YI_WCSCHR   WCSCHR
#define YI_WCSCHR   WCSCHR
#define YI_WCSCHR   WCSCHR
#define YI_WCSCHR   WCSCHR
#define YI_WCSCMP   WCSCMP
#define YI_WCSCMP (   a,
 
)    wcscmp(a, b)
#define YI_WCSCMP   WCSCMP
#define YI_WCSCMP   WCSCMP
#define YI_WCSCMP (   a,
 
)    wcscmp(a, b)
#define YI_WCSCPY   WCSCPY
#define YI_WCSCPY (   a,
 
)    wcscpy(a, b)
#define YI_WCSCPY   WCSCPY
#define YI_WCSCPY   WCSCPY
#define YI_WCSCPY (   a,
 
)    wcscpy(a, b)
#define YI_WCSICMP   WCSICMP
#define YI_WCSICMP (   a,
 
)    WCSICMP(a, b)
#define YI_WCSICMP   WCSICMP
#define YI_WCSICMP   WCSICMP
#define YI_WCSICMP (   a,
 
)    _wcsicmp(a, b)
#define YI_WCSLEN   WCSLEN
#define YI_WCSLEN (   a)    (int32_t) wcslen(a)
#define YI_WCSLEN   WCSLEN
#define YI_WCSLEN   WCSLEN
#define YI_WCSLEN (   a)    (int32_t) wcslen(a)
#define YI_WCSNCAT   WCSNCAT
#define YI_WCSNCAT (   a,
  b,
 
)    wcsncat(a, b, (size_t)c)
#define YI_WCSNCAT   WCSNCAT
#define YI_WCSNCAT   WCSNCAT
#define YI_WCSNCAT (   a,
  b,
 
)    wcsncat(a, b, (size_t)c)
#define YI_WCSNCMP   WCSNCMP
#define YI_WCSNCMP (   a,
  b,
 
)    wcsncmp(a, b, (size_t)c)
#define YI_WCSNCMP   WCSNCMP
#define YI_WCSNCMP   WCSNCMP
#define YI_WCSNCMP (   a,
  b,
 
)    wcsncmp(a, b, (size_t)c)
#define YI_WCSNCPY   WCSNCPY
#define YI_WCSNCPY (   a,
  b,
 
)    wcsncpy(a, b, (size_t)c)
#define YI_WCSNCPY   WCSNCPY
#define YI_WCSNCPY   WCSNCPY
#define YI_WCSNCPY (   a,
  b,
 
)    wcsncpy(a, b, (size_t)c)
#define YI_WCSNICMP   WCSNICMP
#define YI_WCSNICMP (   a,
  b,
 
)    WCSNICMP(a, b, (size_t)c)
#define YI_WCSNICMP   WCSNICMP
#define YI_WCSNICMP   WCSNICMP
#define YI_WCSNICMP (   a,
  b,
 
)    _wcsnicmp(a, b, (size_t)c)
#define YI_WCSREV   WCSREV
#define YI_WCSREV (   a)    WCSREV(a)
#define YI_WCSREV   WCSREV
#define YI_WCSREV   WCSREV
#define YI_WCSREV (   a)    _wcsrev(a)
#define YI_WCSSTR   WCSSTR
#define YI_WCSSTR   WCSSTR
#define YI_WCSSTR   WCSSTR
#define YI_WCSSTR   WCSSTR
#define YI_WTEXT (   quote)    (const wchar_t *)L##quote

Typedef Documentation

typedef void* HANDLE
typedef void* HANDLE
typedef void* HANDLE
typedef unsigned int size_t
typedef unsigned long size_t
typedef int ssize_t
Deprecated:
YI_CHAR is deprecated and may be removed in future releases. Use char instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef char16_t yi::deprecated::YI_CHAR16
Deprecated:
YI_CHAR16 is deprecated and may be removed in future releases. Use char16_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef char32_t yi::deprecated::YI_CHAR32
Deprecated:
YI_CHAR32 is deprecated and may be removed in future releases. Use char32_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef double yi::deprecated::YI_DOUBLE
Deprecated:
YI_DOUBLE is deprecated and may be removed in future releases. Use double instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef float yi::deprecated::YI_FLOAT
Deprecated:
YI_FLOAT is deprecated and may be removed in future releases. Use float instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef int16_t yi::deprecated::YI_INT16
Deprecated:
YI_UINT16 is deprecated and may be removed in future releases. Use int16_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef int32_t yi::deprecated::YI_INT32
Deprecated:
YI_UINT32 is deprecated and may be removed in future releases. Use int32_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef int64_t yi::deprecated::YI_INT64
Deprecated:
YI_UINT64 is deprecated and may be removed in future releases. Use int64_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef int8_t yi::deprecated::YI_INT8
Deprecated:
YI_UINT8 is deprecated and may be removed in future releases. Use int8_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef intptr_t yi::deprecated::YI_INTPTR
Deprecated:
YI_INTPTR is deprecated and may be removed in future releases. Use intptr_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef struct memsource_struct YI_MEMSRC
Deprecated:
YI_SIZE is deprecated and may be removed in future releases. Use size_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
Deprecated:
YI_SSIZE is deprecated and may be removed in future releases. Use ssize_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
Deprecated:
YI_UID is deprecated and may be removed in future releases. Use ssize_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef uint16_t yi::deprecated::YI_UINT16
Deprecated:
YI_UINT16 is deprecated and may be removed in future releases. Use uint16_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef uint32_t yi::deprecated::YI_UINT32
Deprecated:
YI_UINT32 is deprecated and may be removed in future releases. Use uint32_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef uint64_t yi::deprecated::YI_UINT64
Deprecated:
YI_UINT64 is deprecated and may be removed in future releases. Use uint64_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef uint8_t yi::deprecated::YI_UINT8
Deprecated:
YI_UINT8 is deprecated and may be removed in future releases. Use uint8_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef uintptr_t yi::deprecated::YI_UINTPTR
Deprecated:
YI_UINTPTR is deprecated and may be removed in future releases. Use uintptr_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef wchar_t yi::deprecated::YI_WCHAR
Deprecated:
YI_WCHAR is deprecated and may be removed in future releases. Use wchar_t instead, or define YI_DEPRECATED_TYPES in your project to enable the use of deprecated types.
typedef YiIntegralConstant<bool, false> YiFalseType

A backported equivalent of std::false_type, making the feature available on platforms that don't implement it.

See http://en.cppreference.com/w/cpp/types/integral_constant for more details.

typedef YiIntegralConstant<bool, true> YiTrueType

A backported equivalent of std::true_type, making the feature available on platforms that don't implement it.

See http://en.cppreference.com/w/cpp/types/integral_constant for more details.

Function Documentation

template<typename E >
constexpr std::enable_if<YiEnableBitmaskOperators<E>::enable, bool>::type Any ( a)
inline

Returns true if any of the bits are set to 1 in the enum of type E. This is equivalent to comparing with 0.

See also
YiEnableBitmaskOperators
template<typename T >
std::decay_t<T>& AnyCast ( CYIAny any)

Returns a reference to the value contained in the provided CYIAny. The type of the value stored in the provided CYIAny must match the provided type (excluding const and reference qualifiers).

See also
CYIAny::Get()
template<typename T >
const std::decay_t<T>& AnyCast ( const CYIAny any)

Returns a reference to the value contained in the provided CYIAny. The type of the value stored in the provided CYIAny must match the provided type (excluding const and reference qualifiers).

See also
CYIAny::Get()
template<typename T >
std::decay_t<T>* AnyCast ( CYIAny pAny)

Returns a pointer to the value contained in the provided CYIAny, or nullptr if pAny is null. The type of the value stored in the provided CYIAny must match the provided type (excluding const and reference qualifiers).

See also
CYIAny::Get()
template<typename T >
const std::decay_t<T>* AnyCast ( const CYIAny pAny)

Returns a pointer to the value contained in the provided CYIAny, or nullptr if pAny is null. The type of the value stored in the provided CYIAny must match the provided type (excluding const and reference qualifiers).

See also
CYIAny::Get()
bool CompareNames ( wchar_t *  Name,
wchar_t *  Compare 
)
CYIParsingError::ErrorType CYIParsingError::GetParsingErrorCode ( ) const
inlinevirtual

Returns the current parsing error status.

CYIString CYIParsingError::GetParsingErrorMessage ( ) const
inlinevirtual

Returns the current parsing error message, if an error has occurred.

bool CYIParsingError::HasError ( ) const
inlinevirtual

Returns true if a parsing error has occurred.

bool CYIParsingError::IsRequiredField ( const CYIString rFieldName) const
inlinevirtual

Returns true if the specified field is a required field.

template<typename E >
constexpr std::enable_if<YiEnableBitmaskOperators<E>::enable, bool>::type None ( a)
inline

Returns true if none of the bits are set to 1 in the enum of type E. This is equivalent to comparing with 0.

See also
YiEnableBitmaskOperators
template<typename T1 , typename T2 >
constexpr bool operator!= ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)
template<typename T , typename U >
constexpr bool operator!= ( const CYIOptional< T > &  first,
const U &  second 
)
template<typename T , typename U >
constexpr bool operator!= ( const U &  first,
const CYIOptional< T > &  second 
)
YI_CONSTEXPR bool operator!= ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept
bool operator!= ( const CYIColor lhs,
const CYIColor rhs 
)
template<class T >
constexpr bool operator!= ( CYIStringView  lhs,
rhs 
)
noexcept

Compares a string view lhs with a CYIString rhs for inequality.

Note
This overload is selected only when rhs cannot be converted to CYIStringView but can be converted to CYIString. In most cases, operator!=(CYIStringView, CYIStringView) is selected instead.
template<class T >
constexpr bool operator!= ( lhs,
CYIStringView  rhs 
)
noexcept

Compares a CYIString lhs with a string view rhs for inequality.

Note
This overload is selected only when lhs cannot be converted to CYIStringView but can be converted to CYIString. In most cases, operator!=(CYIStringView, CYIStringView) is selected instead.
template<typename E >
constexpr std::enable_if<YiEnableBitmaskOperators<E>::enable, E>::type operator& ( a,
b 
)
inline

Performs a binary AND between two enums of type E.

See also
YiEnableBitmaskOperators
template<typename E >
std::enable_if<YiEnableBitmaskOperators<E>::enable, E>::type& operator&= ( E &  a,
b 
)
inline

Performs a binary AND between two enums of type E.

See also
YiEnableBitmaskOperators
CYIDateTime operator+ ( CYIDateTime  lhs,
CYIDateTime::TimeDelta  delta 
)
CYIString operator+ ( CYIStringView  lhs,
CYIStringView  rhs 
)

Concatenates both lhs and rhs strings together and returns a new string with the concatenation result.

CYIDateTime operator- ( CYIDateTime  lhs,
CYIDateTime::TimeDelta  delta 
)
CYIDateTime::TimeDelta operator- ( const CYIDateTime a,
const CYIDateTime b 
)
template<typename T1 , typename T2 >
constexpr bool operator< ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)
template<typename T , typename U >
constexpr bool operator< ( const CYIOptional< T > &  first,
const U &  second 
)
template<typename T , typename U >
constexpr bool operator< ( const U &  first,
const CYIOptional< T > &  second 
)
template<typename T >
constexpr bool operator< ( const CYIOptional< T > &  first,
const CYIEmptyOptionalType  
)
template<typename T >
constexpr bool operator< ( const CYIEmptyOptionalType ,
const CYIOptional< T > &  second 
)
bool operator< ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept
bool operator< ( const CYIColor lhs,
const CYIColor rhs 
)
std::ostream& operator<< ( std::ostream &  stream,
const CYIPreferences val 
)
std::ostream& operator<< ( std::ostream &  rStream,
const CYIDateTime rVal 
)
std::ostream& operator<< ( std::ostream &  stream,
const CYIStringView val 
)
std::ostream& operator<< ( std::ostream &  stream,
const CYIString val 
)
template<typename T1 , typename T2 >
constexpr bool operator<= ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)
template<typename T , typename U >
constexpr bool operator<= ( const CYIOptional< T > &  first,
const U &  second 
)
template<typename T , typename U >
constexpr bool operator<= ( const U &  first,
const CYIOptional< T > &  second 
)
bool operator<= ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept
YI_RECT & YI_RECT::operator= ( const YI_RECT_REL rect)
inline
YI_FLOAT_RECT & YI_FLOAT_RECT::operator= ( const YI_FLOAT_RECT_REL rect)
inline
template<typename T1 , typename T2 >
constexpr bool operator== ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)
template<typename T , typename U >
constexpr bool operator== ( const CYIOptional< T > &  first,
const U &  second 
)
template<typename T , typename U >
constexpr bool operator== ( const U &  first,
const CYIOptional< T > &  second 
)
template<typename T >
constexpr bool operator== ( const CYIOptional< T > &  first,
const CYIEmptyOptionalType  
)
template<typename T >
constexpr bool operator== ( const CYIEmptyOptionalType ,
const CYIOptional< T > &  second 
)
YI_CONSTEXPR bool operator== ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept
bool operator== ( const CYIColor lhs,
const CYIColor rhs 
)
template<class T >
constexpr bool operator== ( CYIStringView  lhs,
rhs 
)
noexcept

Compares a string view lhs with a CYIString rhs for equality.

Note
This overload is selected only when rhs cannot be converted to CYIStringView but can be converted to CYIString. In most cases, operator==(CYIStringView, CYIStringView) is selected instead.
template<class T >
constexpr bool operator== ( lhs,
CYIStringView  rhs 
)
noexcept

Compares a CYIString lhs with a string view rhs for equality.

Note
This overload is selected only when lhs cannot be converted to CYIStringView but can be converted to CYIString. In most cases, operator==(CYIStringView, CYIStringView) is selected instead.
template<typename T1 , typename T2 >
constexpr bool operator> ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)
template<typename T , typename U >
constexpr bool operator> ( const CYIOptional< T > &  first,
const U &  second 
)
template<typename T , typename U >
constexpr bool operator> ( const U &  first,
const CYIOptional< T > &  second 
)
template<typename T >
constexpr bool operator> ( const CYIOptional< T > &  first,
const CYIEmptyOptionalType  
)
template<typename T >
constexpr bool operator> ( const CYIEmptyOptionalType ,
const CYIOptional< T > &  second 
)
bool operator> ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept
template<typename T1 , typename T2 >
constexpr bool operator>= ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)
template<typename T , typename U >
constexpr bool operator>= ( const CYIOptional< T > &  first,
const U &  second 
)
template<typename T , typename U >
constexpr bool operator>= ( const U &  first,
const CYIOptional< T > &  second 
)
bool operator>= ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept
std::istream& operator>> ( std::istream &  stream,
CYIString val 
)

Reads a single element from the stream stream and assigns it to the string val. By default, elements are delimited by whitespace characters, through this can be changed within the stream. The old value of val is discarded, even if an error occurred reading from the stream.

template<typename E >
constexpr std::enable_if<YiEnableBitmaskOperators<E>::enable, E>::type operator^ ( a,
b 
)
inline

Performs a binary XOR (exclusive OR) between two enums of type E.

See also
YiEnableBitmaskOperators
template<typename E >
std::enable_if<YiEnableBitmaskOperators<E>::enable, E>::type& operator^= ( E &  a,
b 
)
inline

Performs a binary XOR (exclusive OR) between two enums of type E.

See also
YiEnableBitmaskOperators
template<typename E >
constexpr std::enable_if<YiEnableBitmaskOperators<E>::enable, E>::type operator| ( a,
b 
)
inline

Performs a binary OR between two enums of type E.

See also
YiEnableBitmaskOperators
template<typename E >
std::enable_if<YiEnableBitmaskOperators<E>::enable, E>::type& operator|= ( E &  a,
b 
)
inline

Performs a binary OR between two enums of type E.

See also
YiEnableBitmaskOperators
template<typename E >
constexpr std::enable_if<YiEnableBitmaskOperators<E>::enable, E>::type operator~ ( a)
inline

Performs a binary NOT (invert) between two enums of type E.

See also
YiEnableBitmaskOperators
glm::vec3 CYIMatrixUtilities::ProjectVector ( const glm::vec3 &  A,
const glm::vec3 &  normalizedB 
)
inlinestatic

Projects the vector A onto the vector normalizedB.

Warning
The normalizedB vector must normalized.
YI_EXTERNINLINE uint16_t RandomWORD ( void  )
void CYIParsingError::SetParsingErrorCode ( ErrorType  errorCode)
inlinevirtual

Sets the current parsing error status.

void CYIParsingError::SetParsingErrorMessage ( CYIString  errorMessage)
inlinevirtual

Sets the current parsing error message.

template<typename T , typename... Args>
int sprintf ( T &&  ,
Args &&  ... 
)
inline
int16_t STRICMP ( const char *  pStr1,
const char *  pStr2 
)
int16_t STRNICMP ( const char *  pDest,
const char *  pSrc,
int32_t  count 
)
char* STRREV ( char *  pSrc)
template<typename E >
constexpr std::enable_if<YiEnableBitmaskOperators<E>::enable, typename std::underlying_type<E>::type>::type ToInteger ( a)
inline

Returns the integer representation of an enum of type E. The return type is the underlying type of E.

See also
YiEnableBitmaskOperators
glm::vec3 CYIMatrixUtilities::TransformVector ( const glm::mat4 &  rMat4x4,
const glm::vec3 &  rV 
)
inlinestatic

Multiplies the matrix rMat4x4 by the vector rV. The value of rMat4x4[3][3] is expected to be 1.0f.

wchar_t* WCSCAT ( wchar_t *  pDest,
const wchar_t *  pSrc 
)
wchar_t* WCSCHR ( wchar_t *  pData,
wchar_t  iSymbol 
)
int16_t WCSCMP ( const wchar_t *  pStr1,
const wchar_t *  pStr2 
)
wchar_t* WCSCPY ( wchar_t *  pDest,
const wchar_t *  pSrc 
)
int16_t WCSICMP ( const wchar_t *  pStr1,
const wchar_t *  pStr2 
)
uint32_t WCSLEN ( const wchar_t *  str)
wchar_t* WCSNCAT ( wchar_t *  pDest,
const wchar_t *  pSrc,
int32_t  count 
)
int16_t WCSNCMP ( const wchar_t *  pDest,
const wchar_t *  pSrc,
int32_t  count 
)
wchar_t* WCSNCPY ( wchar_t *  pDest,
const wchar_t *  pSrc,
int32_t  count 
)
int16_t WCSNICMP ( const wchar_t *  pDest,
const wchar_t *  pSrc,
int32_t  count 
)
wchar_t* WCSREV ( wchar_t *  pSrc)
wchar_t* WCSSTR ( wchar_t *  pData,
wchar_t *  pString 
)
wchar_t* WStrDup ( const wchar_t *  pStr)
void* YI_CALLOC ( size_t  size)
void YI_FCLOSE ( YI_FILE pFile)
YI_FLOAT_RECT::YI_FLOAT_RECT ( const YI_FLOAT_RECT_REL rect)
inline
YI_FILE* YI_FOPEN ( const char *  pPath,
const char *  pMode 
)
void YI_FREE ( void *  pBuf)
ssize_t YI_FSEEK ( YI_FILE pFile,
size_t  pos,
int32_t  mode 
)
size_t YI_FTELL ( YI_FILE pFile)
void* YI_MALLOC ( size_t  size)
YI_EXTERNINLINE int32_t YI_MAX4 ( int32_t  a,
int32_t  b,
int32_t  c,
int32_t  d 
)
void YI_MCLOSE ( YI_MEMSRC mp)
YI_EXTERNINLINE int32_t YI_MIN4 ( int32_t  a,
int32_t  b,
int32_t  c,
int32_t  d 
)
YI_MEMSRC* YI_MOPEN ( const uint8_t *  data,
size_t  size 
)
size_t YI_MREAD ( void *  dest,
size_t  size,
size_t  count,
YI_MEMSRC mp 
)
void YI_MSEEK ( YI_MEMSRC mp,
size_t  pos,
int32_t  mode 
)
size_t YI_MTELL ( YI_MEMSRC mp)
void* YI_REALLOC ( void *  pOldBuf,
size_t  size 
)
YI_RECT::YI_RECT ( const YI_RECT_REL rect)
inline
template<typename T , size_t N>
size_t YI_SIZE_OF_ARRAY ( const T(&)  a[N])
inline

This templated function returns the number of elements from an array. The size of the array is determined at compile time.

Example:

1 std::string strArray[] = {
2  "Purple",
3  "Monkey",
4  "Dishwasher",
5  "Tangerine"
6 }
7 
8 size_t strCount = YI_SIZE_OF_ARRAY(strArray); // returns 4

It is equivalent to the following:

1 size_t strCount = sizeof(strArray) / sizeof(std::string);
1 size_t strCount = sizeof(strArray) / sizeof(*strArray);
1 size_t strCount = sizeof(strArray) / sizeof(strArray[0]);
char* YI_STRDUP ( const char *  pStr)
template<typename YI_SWAP_TYPE >
void YI_SWAP ( YI_SWAP_TYPE &  a,
YI_SWAP_TYPE &  b 
)
inline
int32_t YI_TRUNCATE ( YI_FILE pFile,
int32_t  length 
)
void YI_VOID_FCLOSE ( void *  fp)
void* YI_VOID_FOPEN ( void *  filepath,
char *  mode,
size_t  size 
)
size_t YI_VOID_FREAD ( void *  dest,
size_t  size,
size_t  count,
void *  fp 
)
void YI_VOID_FSEEK ( void *  fp,
size_t  pos,
int32_t  mode 
)
size_t YI_VOID_FTELL ( void *  fp)
void YI_VOID_MCLOSE ( void *  mp)
void* YI_VOID_MOPEN ( void *  data,
char *  mode,
size_t  size 
)
size_t YI_VOID_MREAD ( void *  dest,
size_t  size,
size_t  count,
void *  mp 
)
void YI_VOID_MSEEK ( void *  mp,
size_t  pos,
int32_t  mode 
)
size_t YI_VOID_MTELL ( void *  mp)
YI_FILE* YI_WFOPEN ( const wchar_t *  pPath,
const wchar_t *  pMode 
)
std::vector<char> YiBase16Decode ( CYIStringView  str)

This function will decode a given Base16 (Hexadecimal) encoded CYIStringView into its original state.

std::vector<char> YiBase16Decode ( const char *  pData,
size_t  unInputLength 
)
inline

THelper wrapper function that decodes a given Base16 (Hexadecimal) encoded byte array pointer with a given size into its original state.

std::vector<char> YiBase64Decode ( CYIStringView  data)

This function will decode a given Base64 encoded CYIStringView into its original state.

std::vector<char> YiBase64Decode ( const char *  pData,
size_t  unInputLength 
)
inline

Helper wrapper function that decodes a given Base64 encoded byte array pointer with a given size into its original state.

std::vector<char> YiBase64Encode ( CYIStringView  data)

This function will encode a given CYIStringView into Base64.

std::vector<char> YiBase64Encode ( const char *  pData,
size_t  unInputLength 
)
inline

Helper wrapper function that will encode a given byte array pointer with a given size into Base64.

bool YiCopyFile ( const char *  pSourcePath,
const char *  pDestinationPath 
)
bool YiDeleteFile ( const CYIString path)
bool YiDeleteFile ( const char *  pPath)
template<typename TARGET , typename SOURCE >
TARGET* YiDynamicCast ( SOURCE *  pObject)
inline

Casts the pointer pObject to type T*.

This function performs a dynamic cast on pointed-to object pObject, turning it into a pointer of type T*. If pObject cannot be cast to type T, nullptr is returned. If pObject is nullptr, nullptr is returned.

Example:

1 CYISceneNode *pNode = pParent->GetChild(0);
2 CYIPushButtonView *pButton = YiDynamicCast<CIYPushButtonView>(pNode);
3 if (pButton)
4 {
5  // Perform actions on pButton
6 }
Note
Both TARGET and SOURCE must be RTTI types. A compilation error will occur otherwise.
When called on a const pointer to SOURCE, this function returns a const pointer to TARGET.
If TARGET is a base of SOURCE (e.g. when performing an upcast), this function is equivalent to calling static_cast<TARGET*>(pObject).
When using non-virtual diamond inheritance and performing an upcast, it may be necessary to first perform a dynamic cast on one of the 'branches' of the diamond inheritance tree. Alternatively, use virtual inheritance instead of non-virtual inheritance.
Template Parameters
TARGETThe target type.
SOURCEThe source type.
template<typename TARGET , typename SOURCE >
std::shared_ptr<TARGET> YiDynamicCast ( const std::shared_ptr< SOURCE > &  pObject)
inline

Casts the shared pointer pObject to shared pointer type T*.

This function performs a dynamic cast on pointed-to object pObject, turning it into a pointer of type T*. If pObject cannot be cast to type T, nullptr is returned. If pObject is nullptr, a null shared pointer is returned.

Note
This function is the YiRTTI equivalent of std::dynamic_pointer_cast.
Both TARGET and SOURCE must be RTTI types. A compilation error will occur otherwise.
When called on a const pointer to SOURCE, this function returns a const pointer to TARGET.
If TARGET is a base of SOURCE (e.g. when performing an upcast), this function is equivalent to calling std::static_pointer_cast<TARGET*>(pObject).
When using non-virtual diamond inheritance and performing an upcast, it may be necessary to first perform a dynamic cast on one of the 'branches' of the diamond inheritance tree. Alternatively, use virtual inheritance instead of non-virtual inheritance.
Template Parameters
TARGETThe target type.
SOURCEThe source type.
template<typename TARGET , typename SOURCE >
std::shared_ptr<TARGET> YiDynamicPointerCast ( const std::shared_ptr< SOURCE > &  pObject)
inline

Casts the shared pointer pObject to shared pointer type T*.

This function performs a dynamic cast on pointed-to object pObject, turning it into a pointer of type T*. If pObject cannot be cast to type T, nullptr is returned. If pObject is nullptr, a null shared pointer is returned.

Note
This function is the YiRTTI equivalent of std::dynamic_pointer_cast.
Both TARGET and SOURCE must be RTTI types. A compilation error will occur otherwise.
When called on a const pointer to SOURCE, this function returns a const pointer to TARGET.
If TARGET is a base of SOURCE (e.g. when performing an upcast), this function is equivalent to calling std::static_pointer_cast<TARGET*>(pObject).
When using non-virtual diamond inheritance and performing an upcast, it may be necessary to first perform a dynamic cast on one of the 'branches' of the diamond inheritance tree. Alternatively, use virtual inheritance instead of non-virtual inheritance.
Template Parameters
TARGETThe target type.
SOURCEThe source type.
bool YiFilesAreIdentical ( const char *  pReferencePath,
const char *  pTestPath 
)

Compares the given files byte by byte and returns true if they are identical. Returns false early if the file sizes are different.

uint32_t YiFromBigEndian ( uint32_t  bigEndianValue)

Converts a value from the big endian byte order to the order used on the target platform.

This function reimplements ntohl in a platform-independent manner (some platforms like Tizen-NaCl are missing the ntohl API).

bool YiGetFileName ( char &  pFileName,
char *  pFilter 
)
CYIString YiGetLocalDirectory ( )
uint64_t YiGetTimeuS ( void  )
const CYIRuntimeTypeInfo* YiGetTypeInfo ( const char *  pTypeName)

Finds and returns the CYIRuntimeTypeInfo object identified by pTypeName. If no such type exists, nullptr is returned.

const CYIRuntimeTypeInfo* YiGetTypeInfo ( CYIStringView  typeName)

Finds and returns the CYIRuntimeTypeInfo object identified by typeName. If no such type exists, nullptr is returned.

template<typename T >
const CYIRuntimeTypeInfo* YiGetTypeInfo ( T *  pObject)
inline

Returns the runtime CYIRuntimeTypeInfo object associated with pObject. If pObject is nullptr, nullptr is returned.

constexpr bool YiIsBigEndian ( )

Returns true is the current system is big-endian, false otherwise.

constexpr bool YiIsLittleEndian ( )

Returns true is the current system is little-endian, false otherwise.

void YILockFrameRate ( int32_t  fps)
bool YiMakeDirectory ( const CYIString path)
template<typename T , typename... Args>
constexpr CYIOptional<T> YiMakeOptional ( Args &&...  args)

Creates and returns an instance of CYIOptional containing an instance of T. The parameters args are passed to the appropriate constructor of T to initialize the contained value.

uint8_t* YiReadFile ( YI_FILE pFile,
size_t pBufferSize,
size_t  additionalPadding 
)
template<typename T >
std::unique_ptr<T> YiRTTINew ( CYIStringView  name)

Creates a new instance of the type identifed by name.

The resulting instance is cast to T* prior to being returned.

Note
If no RTTI type can be found with name name, a warning is logged and nullptr is returned.
If the specified RTTI type cannot be cast to T, a warning is logged and nullptr is returned.
If the specified RTTI type is not instantiable, a warning is logged and nullptr is returned.
Template Parameters
TThe target type.
uint64_t YiTimestampToUs ( uint64_t  timestamp,
uint64_t  scale 
)

Returns the timestamp in microseconds. Scale represents the number of ticks into a second. For example, a standard video timestamp will have a scale of 90,000. If timestamp is 180,000, then the returned value will be 2,000,000 representing 2sec in microseconds. The formula is as follow: timestampUs = timestamp * 1000000 / scale;

CYIString YiTranslate ( const CYIString text)

Translates the given text based on the current locale. If a string literal is passed, it will also mark that as being translateable.

CYIString YiTranslateMarker ( const CYIString text)

Marks the given string literal as being translateable and returns text.

Variable Documentation

constexpr CYIEmptyOptionalType YiEmptyOptional = {}

A value used to assign 'empty' to a CYIOptional object. While {} can also be assigned, using this value may be more descriptive.

This value can also be used in comparison operators.

See also
CYIOptional