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  CYIBundleJsonUtility
 JSON utility functions to handle CYIAny and CYIBundle There are currently some limitations with the conversion. More...
 
class  YiRootViewController
 The view controller under which all You.i Engine views are located. More...
 
class  CYIDevPanelBase
 The base class for the CYIDevPanel class. More...
 
class  CYIHudBase
 The base class for the CYIHud class. More...
 
struct  yi::deprecated::YI_POINT
 
struct  yi::deprecated::YI_POINT2D
 
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...
 
class  CYIGPUExportUtilities
 GPU utilities. More...
 
class  CYICondition
 Represents a boolean condition. More...
 
class  CYIConditionEvaluator
 Evaluates when CYICondition objects have been set, and notifies users. More...
 
class  CYICrashHandler
 A collection of functions used to report information about a crash. More...
 
class  CYICryptoUtility
 The CYICryptoUtility class contains utilities that are cryptographic in nature. More...
 
class  CYICustomMarkupTagsProvider
 
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...
 
class  CYIFontUtilities
 
class  CYILayoutUtility
 A utility class that helps retrieving attachment positions relative to an object. More...
 
class  CYILocale
 A class representing a locale. More...
 
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  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  CYIRapidJSONUtility
 A front-end utility class aimed to simplify the use of RapidJSON tools. More...
 
class  CYISceneNodeUtility
 
class  CYISecureStore
 The CYISecureStore class manages storing and retrieving application data securely. More...
 
class  CYIStringICU
 A container class for functions that require the ICU library. More...
 
class  CYITextMarkupParser
 
class  CYITime
 global class used to notify the system of time updates More...
 
class  CYITimer
 A low-precision timer driven by the update loop. More...
 
class  CYITranslation
 Provides string localization. More...
 
class  CYITranslator
 
class  CYIYouIMarkupParser
 
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  CYIVersion
 CYIVersion is a data structure that represents semantic versioning. More...
 
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  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...
 
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  CYIKeyValuePairConverter
 
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  CYIMatrixUtilities
 
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  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  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  CYISmallVector< T, StackCapacity >
 A std::vector wrapper that makes use of pre-allocated memory for storing up to StackCapacity items. More...
 
class  CYIAssetIStream
 An implementation of std::istream used to access assets. More...
 
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  CYIString
 Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode characters. More...
 
class  CYIStringCXUtilities
 
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  CYITimeConversion
 
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 >
 

Macros

#define YI_ENV_32   1
 
#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_REALLOC(a, b)   realloc(a, b)
 
#define YI_SYSTEM_REALLOC(a, b)   realloc(a, b)
 
#define _SIZE_T_DEFINED
 
#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   inline
 
#define YI_EXTERNINLINE   extern inline
 
#define YI_MAX_BUFFER   1024
 
#define YI_UNUSED_ATTRIBUTE   __attribute__((unused))
 
#define YI_FUNCTION_SPECIALIZATION_FULLY_SUPPORTED
 
#define YI_ASSERT(condition, tag, msg, ...)   YI_REMOVE_CONSTANT_CONDITION(YI_UNUSED(sizeof(condition)); YI_UNUSED(tag);)
 Platform-independent assertion macro. More...
 
#define YI_FULLY_SUPPORTS_CPP14_CONSTEXPR   1
 
#define YI_IS_LITTLE_ENDIAN   1
 
#define YI_NO_INLINE   __attribute__((noinline))
 
#define YI_FORCE_INLINE   __attribute__((always_inline)) inline
 
#define YI_SYNCHRONIZATION_OBJECT_INIT_VALUE
 
#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 strcat(dst, src)   static_assert(false, "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)   static_assert(false, "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)   static_assert(false, "gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.")
 
#define wcscpy(dst, src)   static_assert(false, "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)   static_assert(false, "wcscat: Does not check for buffer overflows when concatenating to destination (CWE-120).")
 
#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_LITTLE_ENDIAN_16(a)   (((a & 0xff) << 8) | ((a & 0xff00) >> 8))
 
#define YI_LITTLE_ENDIAN_24(a)   (((a >> 16) & 0xff) | (a & 0xff00) | ((a & 0xff) << 16))
 
#define YI_LITTLE_ENDIAN_32(a)   (((a >> 24) & 0xff) | ((a >> 8) & 0xff00) | ((a & 0xff00) << 8) | ((a & 0xff) << 24))
 
#define YI_LITTLE_ENDIAN_64(a)
 
#define YI_FILE   FILE
 
#define YI_FREAD   (size_t) fread
 
#define YI_FWRITE   fwrite
 
#define YI_FGETC   fgetc
 
#define YI_FPUTC   fputc
 
#define YI_SEEK_SET   0
 
#define YI_SEEK_END   1
 
#define YI_SEEK_CUR   2
 
#define YI_MAX_PATH   260
 
#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_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...)
 
#define YI_STRCMP(a, b)   strcmp(a, b)
 
#define YI_STRLEN(a)   strlen(a)
 
#define YI_SNPRINTF   snprintf
 

Typedefs

typedef unsigned long yi::deprecated::size_t
 
typedef void * yi::deprecated::HANDLE
 
typedef YiIntegralConstant< bool, true > YiTrueType
 
typedef YiIntegralConstant< bool, false > YiFalseType
 

Functions

template<typename T , typename... Args>
int yi::deprecated::sprintf (T &&, Args &&...)
 
CYIString YiTranslate (const CYIString &text)
 
CYIString YiTranslateMarker (const CYIString &text)
 
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)
 
constexpr bool YiIsLittleEndian ()
 
constexpr bool YiIsBigEndian ()
 
uint32_t YiFromBigEndian (uint32_t bigEndianValue)
 
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_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)
 
CYIString YiGetLocalDirectory ()
 
void * YI_MALLOC (size_t size)
 
void * YI_CALLOC (size_t size)
 
void * YI_REALLOC (void *pOldBuffer, size_t size)
 
void YI_FREE (void *pBuffer)
 
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)
 
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
 
std::vector< char > YiBase64Encode (CYIStringView data)
 
std::vector< char > YiBase64Encode (const char *pData, size_t inputLength)
 
std::vector< char > YiBase64Decode (CYIStringView data)
 
std::vector< char > YiBase64Decode (const char *pData, size_t inputLength)
 
std::vector< char > YiBase16Encode (CYIStringView data)
 
std::vector< char > YiBase16Encode (const char *pData, size_t inputLength)
 
std::vector< char > YiBase16Decode (CYIStringView str)
 
std::vector< char > YiBase16Decode (const char *pData, size_t inputLength)
 
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
 
void YI_SLEEP (long timeMs)
 
void YI_USLEEP (long timeUs)
 
uint64_t YiGetTimeuS ()
 
uint64_t YiTimestampToUs (uint64_t timestampInTicks, uint64_t scale)
 
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
 
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)
 

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

◆ _SIZE_T_DEFINED

#define _SIZE_T_DEFINED

◆ gets [1/2]

#define gets (   str)    static_assert(false, "gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.")

◆ gets [2/2]

#define gets (   str)    YI_ERROR("gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.")

◆ strcat [1/2]

#define strcat (   dst,
  src 
)    static_assert(false, "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).")

◆ strcat [2/2]

#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).")

◆ strcpy [1/2]

#define strcpy (   dst,
  src 
)    static_assert(false, "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).")

◆ strcpy [2/2]

#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).")

◆ wcscat [1/2]

#define wcscat (   dst,
  src 
)    static_assert(false, "wcscat: Does not check for buffer overflows when concatenating to destination (CWE-120).")

◆ wcscat [2/2]

#define wcscat (   dst,
  src 
)    YI_ERROR("wcscat: Does not check for buffer overflows when concatenating to destination (CWE-120).")

◆ wcscpy [1/2]

#define wcscpy (   dst,
  src 
)    static_assert(false, "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.")

◆ wcscpy [2/2]

#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.")

◆ YI_ASSERT

#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.

◆ YI_CONCATENATE

#define YI_CONCATENATE

A macro used to concatenate two preprocessor tokens.

Example:

int YI_CONCATENATE(m_uniqueMemberAtLine, __LINE__);

◆ YI_DEFAULT_COPY

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

Explicitly define the default copy constructor and assignment operator.

◆ YI_DEFAULT_MOVE

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

Explicitly define the default move constructor and assignment operator.

◆ YI_DEFAULT_MOVE_AND_COPY

#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.

◆ YI_DEFAULT_MOVE_NO_COPY

#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.

◆ YI_DISALLOW_COPY_AND_ASSIGN

#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)

◆ YI_ENSURE_STRING_LITERAL

#define YI_ENSURE_STRING_LITERAL (   x)    "" x ""

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

Example:

YI_ENSURE_STRING_LITERAL("hello world."); // ok
const char *msg = "hello world.";
YI_ENSURE_STRING_LITERAL(msg); // compile error

◆ YI_ENV_32

#define YI_ENV_32   1

◆ YI_ERROR

#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:

#define A_REALLY_OLD_MACRO YI_ERROR("The macro A_REALLY_OLD_MACRO is no longer available. Please use A_NEWER_MACRO instead.")

◆ YI_EXTERNINLINE

#define YI_EXTERNINLINE   extern inline

◆ YI_FGETC

#define YI_FGETC   fgetc

◆ YI_FILE

#define YI_FILE   FILE

◆ YI_FLOAT_EQUAL

#define YI_FLOAT_EQUAL (   a,
 
)    ((a) >= ((b)-FLT_EPSILON) && (a) <= ((b) + FLT_EPSILON))

◆ YI_FORCE_INLINE

#define YI_FORCE_INLINE   __attribute__((always_inline)) inline

◆ YI_FPUTC

#define YI_FPUTC   fputc

◆ YI_FREAD

#define YI_FREAD   (size_t) fread

◆ YI_FULLY_SUPPORTS_CPP14_CONSTEXPR

#define YI_FULLY_SUPPORTS_CPP14_CONSTEXPR   1

◆ YI_FUNCTION_SPECIALIZATION_FULLY_SUPPORTED

#define YI_FUNCTION_SPECIALIZATION_FULLY_SUPPORTED

◆ YI_FWRITE

#define YI_FWRITE   fwrite

◆ YI_INLINE

#define YI_INLINE   inline

◆ YI_IS_LITTLE_ENDIAN

#define YI_IS_LITTLE_ENDIAN   1

◆ YI_LITTLE_ENDIAN_16

#define YI_LITTLE_ENDIAN_16 (   a)    (((a & 0xff) << 8) | ((a & 0xff00) >> 8))

◆ YI_LITTLE_ENDIAN_24

#define YI_LITTLE_ENDIAN_24 (   a)    (((a >> 16) & 0xff) | (a & 0xff00) | ((a & 0xff) << 16))

◆ YI_LITTLE_ENDIAN_32

#define YI_LITTLE_ENDIAN_32 (   a)    (((a >> 24) & 0xff) | ((a >> 8) & 0xff00) | ((a & 0xff00) << 8) | ((a & 0xff) << 24))

◆ YI_LITTLE_ENDIAN_64

#define YI_LITTLE_ENDIAN_64 (   a)
Value:
(((a >> 56) & 0xff) | ((a >> 40) & 0xff00) | ((a >> 24) & 0xff0000) | ((a >> 8) & 0xff000000) | \
((a << 8) & 0xff00000000LLU) | ((a << 24) & 0xff0000000000LLU) | \
((a << 40) & 0xff000000000000LLU) | ((a << 56) & 0xff00000000000000LLU))

◆ YI_MAKE_VARIADIC_MACRO

#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:

#define MY_FUNCTION(...) YI_MAKE_VARIADIC_MACRO(MY_FUNCTION_, ##__VA_ARGS__)
#define MY_FUNCTION_1(A) do_stuff(A);
#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.

◆ YI_MAKE_VARIADIC_MACRO_2

#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:

#define MY_FUNCTION(...) YI_MAKE_VARIADIC_MACRO_2(MY_FUNCTION_, ##__VA_ARGS__)
#define MY_FUNCTION_0() do_stuff();
#define MY_FUNCTION_1(A) do_stuff(A);
#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.

◆ YI_MAX

#define YI_MAX (   a,
 
)    (((a) < (b)) ? (b) : (a))

◆ YI_MAX_BUFFER

#define YI_MAX_BUFFER   1024

◆ YI_MAX_PATH

#define YI_MAX_PATH   260

The maximum length of a portable file path.

◆ YI_MEMCMP

#define YI_MEMCMP (   a,
  b,
 
)    memcmp(a, b, c)

◆ YI_MEMCOPY

#define YI_MEMCOPY (   a,
  b,
 
)    memcpy(a, b, c)

◆ YI_MEMMOVE

#define YI_MEMMOVE (   a,
  b,
 
)    memmove(a, b, c)

◆ YI_MEMSET

#define YI_MEMSET (   a,
  b,
 
)    memset(a, b, c)

◆ YI_MIN

#define YI_MIN (   a,
 
)    (((a) < (b)) ? (a) : (b))

◆ YI_NO_INLINE

#define YI_NO_INLINE   __attribute__((noinline))

◆ YI_SEEK_CUR

#define YI_SEEK_CUR   2

A seek mode that indicates that the seek distance is relative to the current position in the file.

See also
YI_FSEEK

◆ YI_SEEK_END

#define YI_SEEK_END   1

A seek mode that indicates that the seek distance is relative to the end of the file.

See also
YI_FSEEK

◆ YI_SEEK_SET

#define YI_SEEK_SET   0

A seek mode that indicates that the seek distance is relative to the start of the file.

See also
YI_FSEEK

◆ YI_SNPRINTF

#define YI_SNPRINTF   snprintf

◆ YI_STATIC_ASSERT

#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:

YI_STATIC_ASSERT(SOME_CONSTANT < 3, some_constant_must_be_smaller_than_3);

◆ YI_STRCMP

#define YI_STRCMP (   a,
 
)    strcmp(a, b)

◆ YI_STRINGIFY

#define YI_STRINGIFY (   x)

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

Example:

std::cout << "Line number = " << YI_STRINGIFY(__LINE__) << std::endl;
Warning
This macro does not support being called with no arguments (e.g. YI_STRINGIFY() ).

◆ YI_STRLEN

#define YI_STRLEN (   a)    strlen(a)

◆ YI_SYNCHRONIZATION_OBJECT_INIT_VALUE

#define YI_SYNCHRONIZATION_OBJECT_INIT_VALUE

◆ YI_SYSTEM_FREE [1/2]

#define YI_SYSTEM_FREE (   a)    free(a)

◆ YI_SYSTEM_FREE [2/2]

#define YI_SYSTEM_FREE (   a)    free(a)

◆ YI_SYSTEM_MALLOC [1/2]

#define YI_SYSTEM_MALLOC (   a)    malloc(a)

◆ YI_SYSTEM_MALLOC [2/2]

#define YI_SYSTEM_MALLOC (   a)    malloc(a)

◆ YI_SYSTEM_REALLOC [1/2]

#define YI_SYSTEM_REALLOC (   a,
 
)    realloc(a, b)

◆ YI_SYSTEM_REALLOC [2/2]

#define YI_SYSTEM_REALLOC (   a,
 
)    realloc(a, b)

◆ YI_TEXT

#define YI_TEXT (   quote)    (const char *)quote

◆ YI_TEXT16

#define YI_TEXT16 (   quote)    (const char16_t *)L##quote

◆ YI_TEXT32

#define YI_TEXT32 (   quote)    (const char32_t *)L##quote

◆ YI_TYPE_BASES

#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:

class MyView : public CYISceneView
{
void Foo();
};
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_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:

void MyView::Foo()
{
// foo function implementation
}
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(...)

◆ YI_TYPE_DEF_INST

#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:

void MyView::Foo()
{
// foo function implementation
}
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(...)

◆ 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:

YI_TYPE_DEF_INST_WITH_NAME(MyView, "MyNamespace::MyView", CYISceneView)
void MyView::Foo()
{
// foo function implementation
}
See also
YI_TYPE_DEF_WITH_NAME(...)
YI_TYPE_BASES(...)
YI_TYPE_DEF_INST(...)

◆ YI_TYPE_DEF_WITH_NAME

#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:

YI_TYPE_DEF_WITH_NAME(MyView, "MyNamespace::MyView", CYISceneView)
void MyView::Foo()
{
// foo function implementation
}
See also
YI_TYPE_BASES(...)
YI_TYPE_DEF(...)

◆ YI_UNUSED

#define YI_UNUSED (   param)    (void)(param)

◆ YI_UNUSED_ATTRIBUTE

#define YI_UNUSED_ATTRIBUTE   __attribute__((unused))

◆ YI_WARNING

#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:

#define AN_OLD_MACRO YI_WARNING("The macro AN_OLD_MACRO has been deprecated. Please use A_NEWER_MACRO instead.")

◆ YI_WTEXT

#define YI_WTEXT (   quote)    (const wchar_t *)L##quote

Typedef Documentation

◆ HANDLE

typedef void* yi::deprecated::HANDLE

◆ size_t

typedef unsigned long yi::deprecated::size_t

◆ YiFalseType

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.

◆ YiTrueType

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

◆ Any()

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

◆ AnyCast() [1/4]

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()

◆ AnyCast() [2/4]

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()

◆ AnyCast() [3/4]

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()

◆ AnyCast() [4/4]

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()

◆ GetParsingErrorCode()

CYIParsingError::ErrorType CYIParsingError::GetParsingErrorCode ( ) const
inlinevirtual

Returns the current parsing error status.

◆ GetParsingErrorMessage()

CYIString CYIParsingError::GetParsingErrorMessage ( ) const
inlinevirtual

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

◆ HasError()

bool CYIParsingError::HasError ( ) const
inlinevirtual

Returns true if a parsing error has occurred.

◆ IsRequiredField()

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

Returns true if the specified field is a required field.

◆ None()

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

◆ operator &()

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

◆ operator &=()

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

◆ operator!=() [1/7]

template<typename T1 , typename T2 >
constexpr bool operator!= ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)

◆ operator!=() [2/7]

template<typename T , typename U >
constexpr bool operator!= ( const CYIOptional< T > &  first,
const U &  second 
)

◆ operator!=() [3/7]

template<typename T , typename U >
constexpr bool operator!= ( const U &  first,
const CYIOptional< T > &  second 
)

◆ operator!=() [4/7]

YI_CONSTEXPR bool operator!= ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept

◆ operator!=() [5/7]

bool operator!= ( const CYIColor lhs,
const CYIColor rhs 
)

◆ operator!=() [6/7]

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.

◆ operator!=() [7/7]

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.

◆ operator+() [1/2]

CYIDateTime operator+ ( CYIDateTime  lhs,
CYIDateTime::TimeDelta  delta 
)

◆ operator+() [2/2]

CYIString operator+ ( CYIStringView  lhs,
CYIStringView  rhs 
)

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

◆ operator-() [1/2]

CYIDateTime operator- ( CYIDateTime  lhs,
CYIDateTime::TimeDelta  delta 
)

◆ operator-() [2/2]

CYIDateTime::TimeDelta operator- ( const CYIDateTime a,
const CYIDateTime b 
)

◆ operator<() [1/7]

template<typename T1 , typename T2 >
constexpr bool operator< ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)

◆ operator<() [2/7]

template<typename T , typename U >
constexpr bool operator< ( const CYIOptional< T > &  first,
const U &  second 
)

◆ operator<() [3/7]

template<typename T , typename U >
constexpr bool operator< ( const U &  first,
const CYIOptional< T > &  second 
)

◆ operator<() [4/7]

template<typename T >
constexpr bool operator< ( const CYIOptional< T > &  first,
const CYIEmptyOptionalType  
)

◆ operator<() [5/7]

template<typename T >
constexpr bool operator< ( const CYIEmptyOptionalType ,
const CYIOptional< T > &  second 
)

◆ operator<() [6/7]

bool operator< ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept

◆ operator<() [7/7]

bool operator< ( const CYIColor lhs,
const CYIColor rhs 
)

◆ operator<<() [1/3]

std::ostream& operator<< ( std::ostream &  rStream,
const CYIDateTime rVal 
)

◆ operator<<() [2/3]

std::ostream& operator<< ( std::ostream &  stream,
const CYIStringView val 
)

◆ operator<<() [3/3]

std::ostream& operator<< ( std::ostream &  stream,
const CYIString val 
)

◆ operator<=() [1/4]

template<typename T1 , typename T2 >
constexpr bool operator<= ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)

◆ operator<=() [2/4]

template<typename T , typename U >
constexpr bool operator<= ( const CYIOptional< T > &  first,
const U &  second 
)

◆ operator<=() [3/4]

template<typename T , typename U >
constexpr bool operator<= ( const U &  first,
const CYIOptional< T > &  second 
)

◆ operator<=() [4/4]

bool operator<= ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept

◆ operator==() [1/9]

template<typename T1 , typename T2 >
constexpr bool operator== ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)

◆ operator==() [2/9]

template<typename T , typename U >
constexpr bool operator== ( const CYIOptional< T > &  first,
const U &  second 
)

◆ operator==() [3/9]

template<typename T , typename U >
constexpr bool operator== ( const U &  first,
const CYIOptional< T > &  second 
)

◆ operator==() [4/9]

template<typename T >
constexpr bool operator== ( const CYIOptional< T > &  first,
const CYIEmptyOptionalType  
)

◆ operator==() [5/9]

template<typename T >
constexpr bool operator== ( const CYIEmptyOptionalType ,
const CYIOptional< T > &  second 
)

◆ operator==() [6/9]

YI_CONSTEXPR bool operator== ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept

◆ operator==() [7/9]

bool operator== ( const CYIColor lhs,
const CYIColor rhs 
)

◆ operator==() [8/9]

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.

◆ operator==() [9/9]

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.

◆ operator>() [1/6]

template<typename T1 , typename T2 >
constexpr bool operator> ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)

◆ operator>() [2/6]

template<typename T , typename U >
constexpr bool operator> ( const CYIOptional< T > &  first,
const U &  second 
)

◆ operator>() [3/6]

template<typename T , typename U >
constexpr bool operator> ( const U &  first,
const CYIOptional< T > &  second 
)

◆ operator>() [4/6]

template<typename T >
constexpr bool operator> ( const CYIOptional< T > &  first,
const CYIEmptyOptionalType  
)

◆ operator>() [5/6]

template<typename T >
constexpr bool operator> ( const CYIEmptyOptionalType ,
const CYIOptional< T > &  second 
)

◆ operator>() [6/6]

bool operator> ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept

◆ operator>=() [1/4]

template<typename T1 , typename T2 >
constexpr bool operator>= ( const CYIOptional< T1 > &  first,
const CYIOptional< T2 > &  second 
)

◆ operator>=() [2/4]

template<typename T , typename U >
constexpr bool operator>= ( const CYIOptional< T > &  first,
const U &  second 
)

◆ operator>=() [3/4]

template<typename T , typename U >
constexpr bool operator>= ( const U &  first,
const CYIOptional< T > &  second 
)

◆ operator>=() [4/4]

bool operator>= ( CYIStringView  lhs,
CYIStringView  rhs 
)
noexcept

◆ operator>>()

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.

◆ operator^()

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

◆ operator^=()

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

◆ operator|()

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

◆ operator|=()

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

◆ operator~()

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

◆ ProjectVector()

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.

◆ SetParsingErrorCode()

void CYIParsingError::SetParsingErrorCode ( ErrorType  errorCode)
inlinevirtual

Sets the current parsing error status.

◆ SetParsingErrorMessage()

void CYIParsingError::SetParsingErrorMessage ( CYIString  errorMessage)
inlinevirtual

Sets the current parsing error message.

◆ sprintf() [1/2]

template<typename T , typename... Args>
int sprintf ( T &&  ,
Args &&  ... 
)
inline

◆ sprintf() [2/2]

template<typename T , typename... Args>
int yi::deprecated::sprintf ( T &&  ,
Args &&  ... 
)
inline

◆ ToInteger()

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

◆ TransformVector()

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.

◆ YI_CALLOC()

void* YI_CALLOC ( size_t  size)

Allocates and zero-initializes size bytes of memory. Must be freed with YI_FREE.

◆ YI_FCLOSE()

void YI_FCLOSE ( YI_FILE pFile)

Closes a previously-open file. This is a wrapper around fclose.

◆ YI_FOPEN()

YI_FILE* YI_FOPEN ( const char *  pPath,
const char *  pMode 
)

Opens a file for reading or writing. This is a wrapper around fopen. On Android, read request to the assets folder will transparently read from the .apk package.

◆ YI_FREE()

void YI_FREE ( void *  pBuffer)

Frees memory previously allocatd with YI_MALLOC, YI_CALLOC or YI_REALLOC.

◆ YI_FSEEK()

ssize_t YI_FSEEK ( YI_FILE pFile,
size_t  pos,
int32_t  mode 
)

Seeks in an open file. This is a wrapper around fseek.

See also
YI_SEEK_SET
YI_SEEK_END
YI_SEEK_CUR

◆ YI_FTELL()

size_t YI_FTELL ( YI_FILE pFile)

Returns the current position in an open file. This is a wrapper around ftell.

◆ YI_MALLOC()

void* YI_MALLOC ( size_t  size)

Allocates size bytes of memory. Must be freed with YI_FREE.

◆ YI_REALLOC()

void* YI_REALLOC ( void *  pOldBuffer,
size_t  size 
)

Resizes a previously-allocated memory region pOldBuffer to size bytes. The returned pointer may be different from pOldBuffer. Must be freed with YI_FREE.

◆ YI_SLEEP()

void YI_SLEEP ( long  timeMs)

Suspends execution of the current thread for at least timeMs milliseconds.

Note
On some platforms, the sleep duration may be significantly longer than the requested duration when small sleep durations are requested.

◆ YI_TRUNCATE()

int32_t YI_TRUNCATE ( YI_FILE pFile,
int32_t  length 
)

Truncates an open file to length bytes. This is a wrapper around ftruncate.

◆ YI_USLEEP()

void YI_USLEEP ( long  timeUs)

Suspends execution of the current thread for at least timeUs microseconds.

Note
On some platforms, the sleep duration may be significantly longer than the requested duration when small sleep durations are requested.

◆ YI_WFOPEN()

YI_FILE* YI_WFOPEN ( const wchar_t *  pPath,
const wchar_t *  pMode 
)

Opens a file for reading or writing using a 'wide' path. This is a wrapper around fopen. On Android, read request to the assets folder will transparently read from the .apk package.

◆ YiBase16Decode() [1/2]

std::vector<char> YiBase16Decode ( CYIStringView  str)

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

◆ YiBase16Decode() [2/2]

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

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

◆ YiBase16Encode() [1/2]

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

This function will encode a given CYIStringView into Base16 (Hexadecimal).

See also
CYIStringView::ToHexadecimal

◆ YiBase16Encode() [2/2]

std::vector<char> YiBase16Encode ( const char *  pData,
size_t  inputLength 
)

Helper wrapper function that will encode a given byte array pointer with a given size into Base16 (Hexadecimal).

◆ YiBase64Decode() [1/2]

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

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

◆ YiBase64Decode() [2/2]

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

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

◆ YiBase64Encode() [1/2]

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

This function will encode a given CYIStringView into Base64.

◆ YiBase64Encode() [2/2]

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

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

◆ YiDynamicCast() [1/2]

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:

CYISceneNode *pNode = pParent->GetChild(0);
CYIPushButtonView *pButton = YiDynamicCast<CIYPushButtonView>(pNode);
if (pButton)
{
// Perform actions on pButton
}
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.

◆ YiDynamicCast() [2/2]

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.

◆ YiDynamicPointerCast()

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.

◆ YiFromBigEndian()

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).

◆ YiGetLocalDirectory()

CYIString YiGetLocalDirectory ( )

Returns the local directory of the application. On most platforms, this represents the root directory of the application into which assets are found.

◆ YiGetTimeuS()

uint64_t YiGetTimeuS ( )

Returns the amount of microseconds that have ellapsed from an arbitrary reference point. This arbitrary reference point remains fixed for the duration of the app's execution.

◆ YiGetTypeInfo() [1/3]

const CYIRuntimeTypeInfo* YiGetTypeInfo ( const char *  pTypeName)

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

◆ YiGetTypeInfo() [2/3]

const CYIRuntimeTypeInfo* YiGetTypeInfo ( CYIStringView  typeName)

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

◆ YiGetTypeInfo() [3/3]

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

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

◆ YiIsBigEndian()

constexpr bool YiIsBigEndian ( )

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

◆ YiIsLittleEndian()

constexpr bool YiIsLittleEndian ( )

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

◆ YiMakeOptional()

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.

◆ YiRTTINew()

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.

◆ YiTimestampToUs()

uint64_t YiTimestampToUs ( uint64_t  timestampInTicks,
uint64_t  scale 
)

Converts a timestamp in ticks into a 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 2 seconds in microseconds.

The formula is as follow: timestampUs = timestampInTicks * 1000000 / scale;

◆ YiTranslate()

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.

To aid translators in translating the texts in code, a more detailed context or examples can be provided
by means of comments prefixed with "TRANSLATORS" just before the YiTranslate calls.

For instance:

TRANSLATORS: This phrase is meant for ... Example: blah-blah. DoSomething(YiTranslate("An untranslated string that would be helped by an additional explanation."));

◆ YiTranslateMarker()

CYIString YiTranslateMarker ( const CYIString text)

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

To aid translators in translating the texts in code, a more detailed context or examples can be provided
by means of comments prefixed with "TRANSLATORS" just before the YiTranslateMarker calls.

For instance:

TRANSLATORS: This phrase is meant for ... Example: blah-blah. DoSomething(YiTranslateMarker("An untranslated string that would be helped by an additional explanation."));

Variable Documentation

◆ YiEmptyOptional

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