Typedefs | |
using | OverloadRank0 = PrivateOverloadRank0 * |
using | OverloadRank1 = PrivateOverloadRank1 * |
using | OverloadRank2 = PrivateOverloadRank2 * |
using | OverloadRank3 = PrivateOverloadRank3 * |
using | OverloadRank4 = PrivateOverloadRank4 * |
using | OverloadRank5 = PrivateOverloadRank5 * |
using | OverloadRankMax = OverloadRank5 |
template<typename T , Int N> | |
using | AddArrayT = T[N] |
template<typename T > | |
using | AddArrayOfUnknownBoundT = T[] |
template<typename TO , typename FROM , Bool SAFE> | |
using | GenericCastReturnType = std::enable_if< GenericCastTrait< TO, typename maxon::details::MakeLValueConst< FROM >::type, SAFE >::value, typename GenericCastTrait< TO, typename maxon::details::MakeLValueConst< FROM >::type, SAFE >::ReturnType > |
template<typename EXECUTION > | |
using | ExecutionInterface = JobInterfaceTemplate< EXECUTION > |
template<typename T , Bool HAS_ERROR> | |
using | AddResult = typename maxon::details::AddResultHelper< T, HAS_ERROR >::type |
template<typename TO , typename FROM > | |
using | Out = std::is_constructible< TO, FROM > |
using | ClassTransformer = Delegate< Result< void >(ClassInterface *)> |
template<typename C , typename... INTERFACES> | |
using | Component = ComponentWithBase< C, ComponentRoot, INTERFACES... > |
template<typename FROM , typename C , typename... INTERFACES> | |
using | AdapterComponent = ComponentWithBase< C, AdapterRoot, FROM, INTERFACES... > |
template<typename... INTERFACES> | |
using | SelfPtr = typename ComponentHelper< ComponentRoot, INTERFACES... >::type::SelfPtr |
using | Utf16CharBuffer = BufferedBaseArray< Utf16Char, 512 > |
using | Utf32CharBuffer = BufferedBaseArray< Utf32Char, 256 > |
using | FROMSTR = void(*)(void *p, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
template<typename... BASES> | |
using | NonEmptyBases = typename maxon::details::NonEmptyBasesHelper< typename std::conditional< STD_IS_REPLACEMENT(empty, BASES), EmptyClass, BASES >::type... >::type |
using | TOSTR = void(*)(String &result, const void *ptr, const FormatStatement *formatStatement) |
Functions | |
template<typename TO , typename FROM > | |
GenericCastReturnType< TO, FROM, false >::type | GenericReinterpretCast (FROM &&value) |
template<typename TO , typename FROM > | |
GenericCastReturnType< TO, FROM, true >::type | GenericUpCast (FROM &&value) |
template<typename T , Bool ALLOW_NONCONST = false> | |
T | DefaultValue () |
enum maxon::SUBSYSTEM | MAXON_ENUM_LIST (SUBSYSTEM, "net.maxon.datatype.enum.subsystem") |
enum maxon::APPLICATION_URLTYPE | MAXON_ENUM_LIST (APPLICATION_URLTYPE, "net.maxon.datatype.enum.application_urltype") |
enum maxon::APPLICATIONMODE | MAXON_ENUM_LIST (APPLICATIONMODE, "net.maxon.datatype.enum.applicationmode") |
enum maxon::APPLICATIONFEATURE | MAXON_ENUM_FLAGS (APPLICATIONFEATURE) |
MAXON_DECLARATION (Class< Error >, ErrorObjectClass, "net.maxon.class.errorobject", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
MAXON_DECLARATION (AggregatedError, AggregatedErrorObject, "net.maxon.object.aggregatederror", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
MAXON_ATTRIBUTE_FORCE_INLINE void | operator% (ErrorPtr &rv, ThreadReferencedError &err) |
template<typename R > | |
R | Cast (ErrorPtr &ref) |
template<typename ERRORTYPE > | |
Bool | IsErrorOfType (const Error &err) |
MAXON_REGISTRY (JobRef, ExecutionJobs, "net.maxon.registry.executionjobs") | |
template<typename C > | |
DefaultValueDetector< C *, &C::DefaultValue >::type | ImplementationCreateDefaultValue (OverloadRank3) |
template<typename C > | |
std::enable_if< MAXON_IS_COW_KIND(C::PrivateInterface::Hxx1::ReferenceClass::Handler::KIND), C * >::type | ImplementationCreateDefaultValue (OverloadRank2) |
template<typename C > | |
SFINAEHelper< C *, typename C::PrivateInterface::Hxx1::ReferenceClass::Handler >::type | ImplementationCreateDefaultValue (OverloadRank1) |
template<typename C > | |
C * | ImplementationCreateDefaultValue (OverloadRank0) |
template<typename C > | |
DefaultValueDetector< C *, &C::DefaultValue >::type | ImplementationDestroyDefaultValue (const C *, OverloadRank3) |
template<typename C > | |
std::enable_if< MAXON_IS_COW_KIND(C::PrivateInterface::Hxx1::ReferenceClass::Handler::KIND), C * >::type | ImplementationDestroyDefaultValue (const C *o, OverloadRank2) |
template<typename C > | |
void | ImplementationDestroyDefaultValue (const C *, OverloadRank0) |
MAXON_DECLARATION (Class< LoggerTypeRef >, LoggerTypeBaseClass, "net.maxon.class.loggertypebase", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
MAXON_REGISTRY (Class< LoggerTypeRef >, LoggerTypes, "net.maxon.core.registry.loggertypes") | |
MAXON_REGISTRY (LoggerRef, Loggers, "net.maxon.core.registry.loggers") | |
template<typename R , typename SRC , typename RESULT = typename maxon::details::CastHelper<R, SRC>::AssertCastType> | |
RESULT | AssertCast (SRC &&ref) |
template<typename R , typename SRC , typename RESULT = typename maxon::details::CastHelper<R, SRC>::type> | |
RESULT | Cast (SRC &&ref) |
template<typename R , typename SRC , typename RESULT = typename maxon::details::CastHelper<R, SRC>::type> | |
Result< RESULT > | Cast (Result< SRC > &&src) |
template<typename R , typename SRC , typename RESULT = typename maxon::details::CastHelper<R, SRC>::type> | |
Result< RESULT > | AssertCast (Result< SRC > &&src) |
MAXON_REGISTRY (Class<>, Classes, "net.maxon.registry.classes") | |
MAXON_REGISTRY (ClassTransformer, ClassTransformers, "net.maxon.registry.classtransformers") | |
MAXON_DECLARATION (Class< ObjectRef >, ObjectBaseClass, "net.maxon.class.object", MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel")) | |
class ComponentRoot | MAXON_IF_TARGET_DEBUG (:public EmptyVirtualClass,) |
constexpr const Char * | GetFunctionName (const Char *funcName) |
const StringDecodingRef & | GetUtf8DefaultDecoder () |
const StringEncodingRef & | GetUtf8DefaultEncoder () |
enum maxon::STRINGCONVERSION | MAXON_ENUM_FLAGS (STRINGCONVERSION) |
enum maxon::STRINGCOMPARISON | MAXON_ENUM_LIST (STRINGCOMPARISON) |
MAXON_ATTRIBUTE_FORCE_INLINE const String & | operator""_s (const char *str, std::size_t cnt) |
MAXON_ATTRIBUTE_FORCE_INLINE const String & | operator""_s (const wchar_t *str, std::size_t cnt) |
MAXON_ATTRIBUTE_FORCE_INLINE const CString & | operator""_cs (const char *str, std::size_t cnt) |
Result< void > | DescribeIO (const CStringInterface &s, const DataSerializeInterface &dsi) |
Result< void > | DescribeIO (const StringInterface &s, const DataSerializeInterface &dsi) |
String | operator+ (const String &a, const String &b) |
String && | operator+ (String &&a, const String &b) |
String && | operator+ (String &&a, String &&b) |
String && | operator+ (const String &a, String &&b) |
CString | operator+ (const CString &a, const CString &b) |
CString && | operator+ (CString &&a, const CString &b) |
CString && | operator+ (CString &&a, CString &&b) |
CString && | operator+ (const CString &a, CString &&b) |
String & | operator+= (String &s, const CString &b) |
String | operator+ (const String &a, const CString &b) |
String && | operator+ (String &&a, const CString &b) |
String | operator+ (const String &a, const Char *b) |
String && | operator+ (String &&a, const Char *b) |
CString | operator+ (const CString &a, const Char *b) |
CString && | operator+ (CString &&a, const Char *b) |
String | ToString (const String &str, const FormatStatement *formatStatement, Bool=false) |
String | ToString (const CString &str, const FormatStatement *formatStatement, Bool=false) |
template<typename T > | |
decltype(std::declval< T >().ToString()) | ToStringHelper (const T *object, const FormatStatement *formatStatement, Int *) |
template<typename T > | |
String | ToStringHelper (const T *object, const FormatStatement *formatStatement, const Int *checkDataType) |
template<typename T > | |
std::enable_if<!STD_IS_REPLACEMENT(enum, T), String >::type | ToString (const T &object, const FormatStatement *formatStatement, Bool checkDataType=true) |
template<typename T > | |
std::enable_if<!STD_IS_REPLACEMENT(function, T), String >::type | ToString (const T *object, const FormatStatement *formatStatement) |
const String & | ToString (Bool val, const FormatStatement *formatStatement, Bool=false) |
String | ToString (Char val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (UChar val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Int16 val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Int32 val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Int64 val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (UInt16 val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (UInt32 val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (UInt64 val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Float64 val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Float32 val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Utf16Char val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Utf32Char val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Char *val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (const Char *val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (const void *val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (void *val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (const Generic *val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ToString (Generic *val, const FormatStatement *formatStatement, Bool checkDataType=false) |
String | ExtractString (StringProxy *proxy) |
const String & | ExtractString (const String &str) |
const Char * | ExtractString (const Char *str) |
void | ScanParameter (Float64 &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (Float32 &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (Int64 &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (Int32 &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (Int16 &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (Char &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (UInt64 &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (UInt32 &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (UInt16 &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
void | ScanParameter (UChar &result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
template<typename T > | |
void | ScanParameter (T *&result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
template<typename T > | |
void | FromStrHlp (T *result, const Block< const Utf32Char > &str, Int &processed, const String &formatStatement, Bool &error) |
template<typename T > | |
FROMSTR | GetFromStrHlp () |
Bool | ScanStringTemplate (const String &str, const String &format, Int *parsedCharacters, Int argsCnt, void **args, FROMSTR *argFuncs) |
CString | ExtractCString (StringProxy *proxy) |
template<Bool ISOKAY, typename T > | |
MAXON_ATTRIBUTE_FORCE_INLINE T | ForwardString (T &&str) |
template<typename STR , typename STR2 , typename... ARGS> | |
Bool | ScanString (STR inputStr, STR2 formatStr, ARGS &... args) |
template<typename STR , typename STR2 , typename... ARGS> | |
Bool | ScanString (STR inputStr, Int &parsedInputCharacters, STR2 formatStr, ARGS &... args) |
String | _LoadResourceString (const Id &scope, const InternedId &keyValue) |
template<typename STRID , typename... ARGUMENTS> | |
String | LoadResourceString (const STRID &identifier, const ARGUMENTS &... args) |
static Int | StrLen (const SysChar *chr) |
static Int | StrLen (const Utf32Char *chr) |
static Int | StrLen (const Utf16Char *chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsSpace (TYPE chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsTab (TYPE chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsSpaceOrTab (TYPE chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsLineEnd (TYPE chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsNumeric (TYPE chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsAlphabetic (TYPE chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsAlphanumeric (TYPE chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsHexadecimal (TYPE chr) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Int | GetHexadecimalValue (TYPE chr) |
template<typename ITERATABLETYPE , typename REFTYPE > | |
static MAXON_WARN_UNUSED REFTYPE | JoinElements (ITERATABLETYPE &&iterable, const REFTYPE &delimiter, const FormatStatement *formatStr=nullptr) |
template<typename STRINGTYPE > | |
void | AppendStringWithSeparator (STRINGTYPE &base, const STRINGTYPE &add, const STRINGTYPE &delimiter) |
template<typename STRINGTYPE > | |
STRINGTYPE | AddStringWithSeparator (const STRINGTYPE &base, const STRINGTYPE &add, const STRINGTYPE &delimiter) |
MAXON_MEMBERFUNCTION_DETECTOR (GetReferenceCounter) | |
enum maxon::NORMALIZATION | MAXON_ENUM_LIST (NORMALIZATION) |
enum maxon::CHARACTERTYPE UChar | MAXON_ENUM_LIST (CHARACTERTYPE) |
template<typename TYPE > | |
MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsUnicodeLetter (TYPE chr) |
enum maxon::TARGETAUDIENCE | MAXON_ENUM_FLAGS (TARGETAUDIENCE, "net.maxon.datatype.enum.targetaudience", EARLY) |
enum maxon::WRITEMETA | MAXON_ENUM_FLAGS (WRITEMETA, "net.maxon.datatype.enum.writemeta", EARLY) |
enum maxon::OUTPUT | MAXON_ENUM_FLAGS (OUTPUT, "net.maxon.datatype.enum.output", EARLY) |
void | _ConsoleOutput (OUTPUT flags, const Char *str, Int line, const Char *file) |
void | _ConsoleOutput (OUTPUT flags, const String &str, Int line, const Char *file) |
void | _ConsoleOutput (OUTPUT flags, StringProxy *str, Int line, const Char *file) |
void | _ApplicationOutput (maxon::TARGETAUDIENCE t, maxon::WRITEMETA lvl, const maxon::String &str, Int line, const Char *file) |
void | _ApplicationOutput (maxon::TARGETAUDIENCE t, maxon::WRITEMETA lvl, const Char *str, Int line, const Char *file) |
void | _ApplicationOutput (maxon::TARGETAUDIENCE t, maxon::WRITEMETA lvl, const maxon::StringProxy *proxy, Int line, const Char *file) |
template<typename T > | |
void | ToStrHlp (String &result, const T *x, const FormatStatement *formatStatement) |
template<typename T > | |
TOSTR | GetToStrHlp () |
StringProxy * | Format (const String &formatString, Int argsCnt, const void **args, const TOSTR *argFuncs) |
StringProxy * | Format (const Char *formatString, Int argsCnt, const void **args, const TOSTR *argFuncs) |
template<Int ARGCNT, typename FORMATSTR , typename... ARGS> | |
StringProxy * | FormatTemplateX (FORMATSTR formatString, const ARGS &... args) |
template<Int ARGCNT, typename FORMATSTR > | |
FORMATSTR | FormatTemplateX (FORMATSTR formatString) |
constexpr Int | GetArgCnt (const Char *const formatStr) |
constexpr bool | StrStrConstExpr (const char *str, const char *search) |
template<typename T > | |
static MAXON_ATTRIBUTE_FORCE_INLINE const Char * | PrivateGetClassName () |
enum maxon::REGPARSEMODE | MAXON_ENUM_LIST (REGPARSEMODE) |
MAXON_REGISTRY (Class< UnitTestRef >, UnitTestClasses, "net.maxon.registry.unittestclasses") | |
MAXON_REGISTRY (Class< UnitTestRef >, UnitTestWithC4DPluginClasses, "net.maxon.registry.unittestwithc4dpluginclasses") | |
MAXON_REGISTRY (Class< UnitTestRef >, SpeedTestClasses, "net.maxon.registry.speedtestclasses") | |
MAXON_REGISTRY (Class< UnitTestRef >, LongRunTestClasses, "net.maxon.registry.longruntestclasses") | |
MAXON_DECLARATION (Class< UnitTestRef >, UnitTestBaseClass, "net.maxon.class.unittestbase", MAXON_IMPLEMENTATION_MODULE("net.maxon.misc")) | |
ErrorPtr & | PrivateGetRefMember () |
const ErrorPtr & | PrivateGetRefMember () const |
String | ToString (const FormatStatement *formatStatement=nullptr) const |
String | ToString (const FormatStatement *formatStatement=nullptr) const |
String | ToString (const FormatStatement *formatStatement=nullptr) |
template<typename SCR > | |
Result< String > | ConvertString (const SCR &converter) const |
static UniqueHash | GetUniqueHashCode (const Byte *ptr, Int count) |
static UniqueHash | GetUniqueHashCode (const Block< const Byte > &bytes) |
UniqueHasher () | |
void | Combine (const Byte *ptr, Int count) |
void | Combine (const Block< const Byte > &bytes) |
void | Combine (const UniqueHash &value) |
UniqueHash | Finalize () const |
operator UniqueHash () const | |
Variables | |
struct maxon::AssetSortData | MAXON_ENUM_LIST |
Int | alignment |
maxon::CommandAssetInterface | MAXON_ENUM_FLAGS |
template<TranslationUnit & UNIT, UInt64 UNIT_HASH, Bool WEAK, typename NAME > | |
const maxon::EntityUse | g_PrivateDependencyOnModule |
static const Int | STACKTRACE_SKIP |
static const Int | STRING_MAXIMUM_PRECISION |
static const Int | STRING_DYNAMIC_DIGITS |
System::SPECIALBEHAVIOR | g_systemBehavior |
maxon::Bool | g_isDebuggerPresent |
maxon::Bool | g_enableDebugBreak |
static const Int | REGPARSE_CONCAT |
static const Int | REGPARSE_ANYCHAR |
static const Int | REGPARSE_ANYDIGIT |
static const Int | REGPARSE_OPERATOR_OR |
static const Int | REGPARSE_OPERATOR_STAR |
static const Int | REGPARSE_OPERATOR_PARENTHESIS_LEFT |
static const Int | REGPARSE_OPERATOR_PARENTHESIS_RIGHT |
static const T | value [sizeof...(VALUES)] |
static const InterfaceReference *const | value [sizeof...(INTERFACES)] |
#define MAXON_CACHE_LINE_SIZE |
Assume 64 byte cache line size.
#define MAXON_FALSE_SHARING_SIZE |
Assume 64 byte alignment to avoid false sharing for x86 and unknown architectures.
#define MAXON_HAS_TRUE_TYPE | ( | E | ) |
#define OVERLOAD_MAX_RANK |
Use this as argument for the overload selection parameter of a set of overloaded functions, see OverloadRank0.
#define MAXON_MEMBERFUNCTION_DETECTOR | ( | Name | ) |
#define MAXON_MEMBERTYPE_DETECTOR | ( | Name, | |
Member, | |||
Default | |||
) |
This macro defines a type trait class with the given Name having a single template type parameter. It checks if the type argument T (after removing a possible reference suffix) has a member type named Member. If so, Name<T> will contain a type alias member named type for T::Member, otherwise the type alias will point to Default. Also a static member constant value of type Bool is defined which is true if T::Member exists and it doesn't point to std::false_type. Example:
With those two usages of the macro, GetReferencedType<T>::value
will be true if T contains a member type ReferencedType (unless that is std::false_type), and GetValueType<T>::type
will be the type T::ValueType if that exists, void otherwise.
You may override the default type by specifying a second template argument: GetValueType<T, X>::type
will be X instead of the default void
if T::ValueType doesn't exist.
#define PRIVATE_MAXON_DEFAULT_REFERENCE_CONSTRUCTORS | ( | Cls, | |
... | |||
) |
#define MAXON_DEFAULT_REFERENCE_CONSTRUCTORS | ( | Cls, | |
... | |||
) |
#define MAXON_UNIQUE_REFERENCE_CONSTRUCTORS | ( | Cls, | |
... | |||
) |
#define MAXON_DEPENDENCY_WEAK | ( | headerOrEntity | ) |
This macro can be used to reduce a dependency on a header file or entity to a weak dependency.
By default, all entities included from a header file are strong dependencies for the current translation unit (cpp file). This means that they have to be available in order for the current translation unit to work. With MAXON_DEPENDENCY_WEAK you can weaken this so that the current translation unit can be initialized even if the weakly referenced entities could not be resolved or initialized.
You have to check in your own code if the weakly referenced entities are actually available when you need them.
This example shows how to set up a weak dependency for an interface:
This example shows how to set up a weak dependency for a MAXON_DECLARATION:
[in] | headerOrEntity | This can be either the name of a header file whose declared entities shall be weak dependencies for the current translation unit (use the file name, prefixed by its namespace directories such as "maxon/llvm.h" ) or it can be a single entity such as LlvmModuleInterface::_interface or MediaStreamExifDataClass. |
#define MAXON_DEPENDENCY_ON_MODULE | ( | module | ) |
MAXON_DEPENDENCY_ON_MODULE adds a dependency of the current module on the specified module. Use this if you want to make sure that the specified module has been initialized before this module is initialized. Normally a proper module initialization order is already ensured by the automatic dependencies, so you need this only in rare cases of dependencies that go beyond what automatic dependencies can detect.
[in] | module | Module on which the current module shall depend (remember not to append ".module" as it is not part of the Id). |
#define PRIVATE_MAXON_DEPENDENCY_ON_MODULE_A | ( | module, | |
id | |||
) |
#define PRIVATE_MAXON_DEPENDENCY_ON_MODULE_B | ( | module, | |
id | |||
) |
#define PRIVATE_MAXON_DEPENDENCY_ON_MODULE_C | ( | module, | |
id | |||
) |
#define MAXON_IMPLEMENTATION_MODULE | ( | module | ) |
This macro can be added to an interface or object declaration to tell in which module the corresponding definition is made. This is an optional information and helps to reduce the size of binaries:
The usage of the macro for a non-virtual interface looks as follows:
The corresponding implementation (MAXON_IMPLEMENTATION) has to be in the module "net.maxon.kernel".
For a virtual interface the usage is similar:
However, this doesn't restrict implementations of the interface – a virtual interface can have an arbitrary number of implementations, spread over several modules. It only tells that the bare interface is registered as part of the "net.maxon.kernel" module, namely via the FrameworkRegistration setting in projectdefinition.txt. If a virtual interface has static methods, their implementation (MAXON_STATIC_REGISTER) has to be in the specified module.
For a declaration, write
and place the corresponding definition (MAXON_DECLARATION_REGISTER) in the specified module. You can also apply the macro to a datatype declaration:
[in] | module | Identifier of the module which defines the entity. |
#define PRIVATE_MAXON_iferr_ | ( | ErrType, | |
BUILTINLIKELY, | |||
LINE, | |||
... | |||
) |
#define PRIVATE_MAXON_iferr | ( | ... | ) |
#define PRIVATE_MAXON_ifnoerr | ( | ... | ) |
#define iferr | ( | ... | ) |
The iferr
macro can be used to simplify error handling. It is a special if
which declares an error variable named err
for the if/else scope. This variable is set to the error (if any) of the iferr
-expression, and the if
-branch is executed if there is an error. Expressions of several types are supported:
Result<T>
expressions hold a result value and an error. You can use iferr
just to check their error value, but you can also assign the result value to a variable and even declare the variable in the expression (it will be declared in the outer scope, not just in the if
scope): err
variable to an OutOfMemoryError if the expression evaluates to nullptr
. Other than that, you can use iferr
as in the previous case. E.g., you can write err
variable is set to an OutOfMemoryError if the ResultMem is false
. This only works for the simple case (with no additional result assignment): For nested iferr
statements, you have to use iferr
etc., otherwise you will get a conflict because two variables of the same name err
are declared.
[in] | ... | Expression which shall be checked for an error condition. |
#define ifnoerr | ( | ... | ) |
The opposite of iferr
.
#define MAXON_ERROR_IMPLEMENT_AND_REGISTER | ( | error, | |
baseclass | |||
) |
This macro simplifies the implementation and registration of an error interface and its published error object. You can use this for error interfaces which don't introduce additional methods, and if the implementation shall not override any of the inherited implementations.
Example:
[in] | error | Name of the error reference class such as OutOfMemoryError. |
[in] | baseclass | An expression returning the base object class (e.g., ErrorObjectClass ). This should be an implementation of the base interfaces of the error interface. |
#define MAXON_ERROR_PREALLOCATE | ( | errorName, | |
init | |||
) |
This macro preallocates an error for speed critical cases. The error is returned as a ThreadReferencedError which can be directly returned without any further function calls or overhead (which would happen internally when you'd return an Error object).
The following example preallocates g_myIllegalArgumentError which is assigned an IllegalArgumentError:
[in] | errorName | The name of a globally visible ThreadReferencedError variable which is to be preallocated. |
[in] | init | A lambda or function which returns a preallocated Error. |
#define PRIVATE_MAXON_CHECKERROR_A | ( | type, | |
condition, | |||
msgPopulated, | |||
... | |||
) |
#define CheckArgument | ( | condition, | |
... | |||
) |
This macro checks the specified condition, and if this evaluates to false, an IllegalArgumentError is returned from the current function. The condition will be part of the error message (taken over verbatim). The macro can only be used in a function which returns a Result<T>.
Optionally, you can specify a message which will be used instead of the verbatim condition. The message may use formatting like FormatString.
Examples:
[in] | condition | The condition to evaluate. If it evaluates to false, an IllegalArgumentError will be returned. |
[in] | ... | Optional message and parameters, will be formatted by FormatString. |
#define CheckArgumentDebugStop | ( | condition, | |
... | |||
) |
Like CheckArgument, but an additional DebugStop is executed on error.
#define CheckState | ( | condition, | |
... | |||
) |
This macro checks the specified condition, and if this evaluates to false, an IllegalStateError is returned from the current function. The condition will be part of the error message (taken over verbatim). The macro can only be used in a function which returns a Result<T>.
Optionally, you can specify a message which will be used instead of the verbatim condition. The message may use formatting like FormatString.
For examples, see CheckArgument.
[in] | condition | The condition to evaluate. If it evaluates to false, an IllegalStateError will be returned. |
[in] | ... | Optional message and parameters, will be formatted by FormatString. |
#define CheckStateDebugStop | ( | condition, | |
... | |||
) |
Like CheckState, but an additional DebugStop is executed on error.
#define CheckAssert | ( | condition, | |
... | |||
) |
This macro checks the specified condition, and if this evaluates to false, an UnexpectedError is returned from the current function. The condition will be part of the error message (taken over verbatim). The macro can only be used in a function which returns a Result<T>.
Optionally, you can specify a message which will be used instead of the verbatim condition. The message may use formatting like FormatString.
For examples, see CheckArgument.
[in] | condition | The condition to evaluate. If it evaluates to false, an UnexpectedError will be returned. |
[in] | ... | Optional message and parameters, will be formatted by FormatString. |
#define MAXON_FORWARD | ( | header | ) |
This macro can be used to mark class/struct forward declarations and type aliases which make use of such declarations for the source processor. When a declaration is marked by MAXON_FORWARD the source processor generates slightly different code for interface methods/functions whose return type uses that declaration in order to avoid compilation errors about incomplete types.
You have to inform the source processor about the header file in which the definition of the forward declaration can be found. This is used for the auto-generated registration files which need the complete definition.
Example:
[in] | header | The name of the header file (in quotes) where the type is defined. |
#define MAXON_CHECK_CLASS | ( | Name | ) |
This macro can be used within non-static member functions to statically assert that the given parameter Name matches the surrounding class.
[in] | Name | Unqualified name of the class. |
#define MAXON_METHOD |
Use this macro to mark a member function of an interface as an interface method. For simple virtual interfaces, only non-static member functions can be used as interface methods. Example:
#define MAXON_FUNCTION |
Use this macro to mark a member function of an interface as a function which shall be added to the reference classes. Unlike MAXON_METHOD, the function invocation will not be routed through the interface; you have to provide a normal C++ function definition. All kinds of interfaces allow both static and non-static functions.
MAXON_FUNCTION is very useful if you need a function pair of which one function is const and the other non-const, but besides constness they do the same so that a single method suffices:
#define MAXON_METHOD_RESERVE |
Use this macro to reserve a slot for a method in the method table of a simple virtual interface. You can later replace MAXON_METHOD_RESERVE by MAXON_METHOD without breaking binary compatibility of the interface.
#define MAXON_USING | ( | ... | ) |
MAXON_USING can be used within an interface definition (as an equivalent to the regular C++ using) whenever a non-const method inherited from a base interface is hidden in the interface's reference class because the interface declares a method of the same name, and you want to make the inherited method visible again.
For const methods you have to use MAXON_USING_CONST.
[in] | ... | The qualified name of an inherited non-const interface method. |
#define MAXON_USING_CONST | ( | ... | ) |
MAXON_USING_CONST can be used within an interface definition (as an equivalent to the regular C++ using) whenever a const method inherited from a base interface is hidden in the interface's reference class because the interface declares a method of the same name, and you want to make the inherited method visible again.
For non-const methods you have to use MAXON_USING. See there for an example.
[in] | ... | The qualified name of an inherited const interface method. |
#define PRIVATE_MAXON_REMOVE_REFERENCE |
#define MAXON_REFERENCE_NONE | ( | FREEIMPL | ) |
Use this as argument to MAXON_INTERFACE_NONVIRTUAL to indicate that the interface should not have automatic reference counting, and that no reference class shall be created for the interface. This can be used for interfaces which shall be accessed through custom-coded wrapper classes which are then also responsible for the proper release of the objects. MAXON_REFERENCE_NONE cannot be used for virtual interfaces.
#define PRIVATE_MAXON_REFERENCE_NONE_FLAGS |
#define PRIVATE_MAXON_REFERENCE_NONE_COPY | ( | Name | ) |
#define MAXON_REFERENCE_STATIC | ( | FREEIMPL | ) |
Use this as argument to MAXON_INTERFACE_NONVIRTUAL to indicate that the interface has only static methods. MAXON_REFERENCE_STATIC can only be used for non-virtual interfaces.
#define PRIVATE_MAXON_REFERENCE_STATIC_FLAGS |
#define PRIVATE_MAXON_REFERENCE_STATIC_COPY | ( | Name | ) |
#define MAXON_REFERENCE_POINTER | ( | FREEIMPL | ) |
Use this as argument to MAXON_INTERFACE_NONVIRTUAL to indicate that the interface should not have automatic reference counting, but that a reference class shall be created for the interface. The reference class will behave like an ordinary pointer. For the interface design and its usage, one has to take care of the proper release of the objects. MAXON_REFERENCE_POINTER cannot be used for virtual interfaces.
#define PRIVATE_MAXON_REFERENCE_POINTER_FLAGS |
#define PRIVATE_MAXON_REFERENCE_POINTER_COPY | ( | Name | ) |
#define MAXON_REFERENCE_CONST_POINTER | ( | FREEIMPL | ) |
Use this as argument to MAXON_INTERFACE_NONVIRTUAL to indicate that the interface should not have automatic reference counting, but that a reference class shall be created for the interface. The reference class will behave like an ordinary pointer to a const object. For the interface design and its usage, one has to take care of the proper release of the objects. MAXON_REFERENCE_CONST_POINTER cannot be used for virtual interfaces.
#define PRIVATE_MAXON_REFERENCE_CONST_POINTER_FLAGS |
#define PRIVATE_MAXON_REFERENCE_CONST_POINTER_COPY | ( | Name | ) |
#define MAXON_REFERENCE_NORMAL | ( | FREEIMPL | ) |
Use this as argument to MAXON_INTERFACE_NONVIRTUAL or MAXON_INTERFACE if the interface shall use automatic reference counting, and if non-const methods shall operate on the original object instead of making a copy. This is usually used for first-class objects which have an identity rather than just a value. The corresponding reference class is assumed to be the name of the interface with the Interface postfix replaced by Ref (e.g., InputStreamRef for the interface InputStreamInterface).
#define PRIVATE_MAXON_REFERENCE_NORMAL_FLAGS |
#define PRIVATE_MAXON_REFERENCE_NORMAL_COPY | ( | Name | ) |
#define MAXON_REFERENCE_CONST | ( | FREEIMPL | ) |
Use this as argument to MAXON_INTERFACE_NONVIRTUAL or MAXON_INTERFACE if the interface shall use automatic reference counting, and if only const methods of the interface shall be carried over to the reference class. This is usually used for stateless objects which, once initialized, provide their relevant functionality through const methods (e.g., IoHandlerInterface). The corresponding reference class is assumed to be the name of the interface with the Interface postfix removed (e.g., IoHandler for the interface IoHandlerInterface).
#define PRIVATE_MAXON_REFERENCE_CONST_FLAGS |
#define PRIVATE_MAXON_REFERENCE_CONST_COPY | ( | Name | ) |
#define MAXON_REFERENCE_COPY_ON_WRITE | ( | FREEIMPL | ) |
Use this as argument to MAXON_INTERFACE_NONVIRTUAL or MAXON_INTERFACE if the interface shall use automatic reference counting, and if the reference class shall have copy-on-write semantics. This means that when a non-const method is invoked through a reference and there are further references, a copy of the original object is made, and the non-const method is invoked on the copy. Thus, the further references aren't affected by potential modifications of the non-const method. This is usually used for value types (second-class objects) where only the value is important such as String. The corresponding reference class is assumed to be the name of the interface without the Interface postfix (e.g., String for the interface StringInterface).
#define PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_FLAGS |
#define PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_COPY | ( | Name | ) |
#define MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE | ( | FREEIMPL | ) |
Use this as argument to MAXON_INTERFACE_NONVIRTUAL or MAXON_INTERFACE if the interface shall use automatic reference counting, and if the reference class shall have always-copy-on-write semantics. In contrast to MAXON_REFERENCE_COPY_ON_WRITE, this also makes a copy of the object if there is no other reference to the object, so that non-const methods, invoked through the reference class, will never modify an existing object. In other words: If the refcount == 1 then a call to a set function will always duplicate the object. The corresponding reference class is assumed to be the name of the interface without the Interface postfix (e.g., String for the interface StringInterface).
#define PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_FLAGS |
#define PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_COPY | ( | Name | ) |
#define MAXON_ADD_TO_REFERENCE_CLASS | ( | ... | ) |
Use MAXON_ADD_TO_REFERENCE_CLASS if you want to add further code to the automatically generated non-const reference class of an interface. The source processor adds the arguments of the macro to the public part of the generated reference class. The added function will not be part of the generated const reference class or of the generated copy-on-write reference class. Example:
[in] | ... | Code which shall be added to the generated reference class. |
#define MAXON_ADD_TO_COPY_ON_WRITE_REFERENCE_CLASS | ( | ... | ) |
Use MAXON_ADD_TO_COPY_ON_WRITE_REFERENCE_CLASS if you want to add further code to the automatically generated copy-on-write reference class of an interface. The source processor adds the arguments of the macro to the public part of the generated reference class. The added function will not be part of the generated const reference class or of the generated non-const reference class. For an example see MAXON_ADD_TO_REFERENCE_CLASS.
[in] | ... | Code which shall be added to the generated reference class. |
#define MAXON_ADD_TO_CONST_REFERENCE_CLASS | ( | ... | ) |
Use MAXON_ADD_TO_CONST_REFERENCE_CLASS if you want to add further code to the automatically generated const reference class of an interface. The source processor adds the arguments of the macro to the public part of the generated reference class. The added function will also be part of the generated non-const reference class and the generated copy-on-write reference class. For an example see MAXON_ADD_TO_REFERENCE_CLASS.
[in] | ... | Code which shall be added to the generated reference class. |
#define MAXON_ADD_TO_INTERFACE_TEMPLATE_CLASS | ( | ... | ) |
#define MAXON_INTERFACE_NONVIRTUAL | ( | Name, | |
REFKIND, | |||
ID, | |||
... | |||
) |
MAXON_INTERFACE_NONVIRTUAL marks a class declaration as a non-virtual interface declaration. Non-virtual interfaces are used to separate code into a published interface and its internal implementation. The implementation may reside in a different module as code which makes use of the interface, and the whole mechanism is compatible among different compilers.
nvinterfaces describes the declaration and implementation of non-virtual interfaces in detail. An example is the declaration of StringInterface:
Non-virtual interfaces must not specify a base class unless you use MAXON_INTERFACE_NONVIRTUAL_DERIVED instead of MAXON_INTERFACE_NONVIRTUAL. Non-virtual interfaces have to be implemented by another class using MAXON_IMPLEMENTATION.
[in] | Name | Name of the interface (has to be the same as the surrounding class name). |
[in] | REFKIND | One of MAXON_REFERENCE_NONE, MAXON_REFERENCE_STATIC, MAXON_REFERENCE_POINTER, MAXON_REFERENCE_CONST_POINTER, MAXON_REFERENCE_NORMAL, MAXON_REFERENCE_CONST, MAXON_REFERENCE_COPY_ON_WRITE, MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE. |
[in] | ID | The unique identifier of the interface. |
[in] | ... | Optional information about the interface, for now only MAXON_IMPLEMENTATION_MODULE can be used here. |
#define MAXON_INTERFACE_NONVIRTUAL_DERIVED | ( | Name, | |
REFKIND, | |||
ID, | |||
... | |||
) |
MAXON_INTERFACE_NONVIRTUAL_DERIVED marks a class declaration as a non-virtual interface declaration which is derived from another such declaration (i.e., either MAXON_INTERFACE_NONVIRTUAL or MAXON_INTERFACE_NONVIRTUAL_DERIVED). You have to use the base interface as base class in the class declaration. The derived interface inherits all methods from its base interface. You cannot use more than one direct base interface. Example:
Derived non-virtual interfaces have to be implemented by another class using MAXON_IMPLEMENTATION_DERIVED.
[in] | Name | Name of the interface (has to be the same as the surrounding class name). |
[in] | REFKIND | One of MAXON_REFERENCE_NONE, MAXON_REFERENCE_POINTER, MAXON_REFERENCE_CONST_POINTER, MAXON_REFERENCE_NORMAL, MAXON_REFERENCE_CONST, MAXON_REFERENCE_COPY_ON_WRITE, MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE. |
[in] | ID | The unique identifier of the interface. |
[in] | ... | Optional information about the interface, for now only MAXON_IMPLEMENTATION_MODULE can be used here. |
#define _MAXON_IMPLEMENTATION_BASICS | ( | C | ) |
#define MAXON_IMPLEMENTATION_BASICS | ( | C, | |
I | |||
) |
#define MAXON_IMPLEMENTATION_NO_ALLOC | ( | C, | |
cast | |||
) |
#define _MAXON_IMPLEMENTATION | ( | C, | |
cast | |||
) |
#define MAXON_IMPLEMENTATION | ( | C | ) |
MAXON_IMPLEMENTATION has to be used within an implementation class for a non-virtual interface (declared with MAXON_INTERFACE_NONVIRTUAL). For more details, see nvinterfaces. An example is the implementation of StringInterface by a class XStringImpl:
Don't forget to add MAXON_IMPLEMENTATION_REGISTER below the implementation class.
[in] | C | Name of the implementation class (has to be the same as the surrounding class name). |
#define MAXON_IMPLEMENTATION_DERIVED | ( | C, | |
I | |||
) |
MAXON_IMPLEMENTATION_DERIVED has to be used within an implementation class for a derived non-virtual interface (declared with MAXON_INTERFACE_NONVIRTUAL_DERIVED). The implementation class should derive from the implementation class of the base interface. For more details, see nvinterfaces. An example is the implementation of MacroPortInterface by a class Port (AttributedObject implements the base interface AttributedObjectInterface):
Don't forget to add MAXON_IMPLEMENTATION_REGISTER below the implementation class.
[in] | C | Name of the implementation class (has to be the same as the surrounding class name). |
[in] | I | Name of the derived interface which C implements. |
#define COW_KIND_SFINAE |
#define MAXON_IMPLEMENTATION_REGISTER | ( | C, | |
... | |||
) |
MAXON_IMPLEMENTATION_REGISTER completes the implementation of a non-virtual interface. It has to be used below the declaration of the implementation class (see MAXON_IMPLEMENTATION).
[in] | C | Name of the implementation class. |
[in] | ... | Additional flags for the NonvirtualInterfaceImplementation such as EntityBase::FLAGS::EXPLICIT. |
#define MAXON_IMPLEMENTATION_REGISTER_TEMPLATE | ( | C, | |
... | |||
) |
#define MAXON_INTERFACE_SIMPLE_VIRTUAL | ( | Name, | |
REFKIND | |||
) |
MAXON_INTERFACE_SIMPLE_VIRTUAL marks a class declaration as a simple virtual interface declaration. Unlike true virtual interfaces (MAXON_INTERFACE), simple virtual interfaces only support tree-like inheritance (no multiple inheritance), and they don't support adapters between different versions. They have less overhead for method invocations, so you should use simple virtual interfaces for performance-critical low-level purposes, where the interface is unlikely to change often.
svinterfaces describes the declaration and implementation of simple virtual interfaces in detail. As an example, consider:
You can derive from simple virtual interfaces using MAXON_INTERFACE_SIMPLE_VIRTUAL_DERIVED.
Simple virtual interfaces can be implemented by several classes. An implementation class has to derive from the interface and to contain MAXON_IMPLEMENTATION_SIMPLE, and in its constructors it has to pass the static _clsMTable
member declared by MAXON_IMPLEMENTATION_SIMPLE to the constructor of the base interface. Finally you have to use MAXON_IMPLEMENTATION_SIMPLE_REGISTER behind the class declaration to construct the vtable:
Simple virtual interfaces can be class templates (all other kinds of interfaces can't). In this case you have to prefix the registration as in
Simple virtual interfaces can't have static methods, but they may have static functions (marked with MAXON_FUNCTION).
[in] | Name | Name of the interface (has to be the same as the surrounding class name). |
[in] | REFKIND | One of MAXON_REFERENCE_NONE, MAXON_REFERENCE_POINTER, MAXON_REFERENCE_CONST_POINTER, MAXON_REFERENCE_NORMAL, MAXON_REFERENCE_CONST, MAXON_REFERENCE_COPY_ON_WRITE, MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE. |
#define PRIVATE_MAXON_INTERFACE_SIMPLE_VIRTUAL_VTABLE_ACCESS |
#define MAXON_INTERFACE_SIMPLE_VIRTUAL_DERIVED | ( | Name, | |
REFKIND | |||
) |
MAXON_INTERFACE_SIMPLE_VIRTUAL_DERIVED marks a class declaration as a simple virtual interface declaration which is derived from another such declaration (i.e., declared with MAXON_INTERFACE_SIMPLE_VIRTUAL or MAXON_INTERFACE_SIMPLE_VIRTUAL_DERIVED). You have to use the base interface as base class in the class declaration. The derived interface inherits all methods from its base interface. You cannot use more than one direct base interface. Example:
The implementation of a derived simple virtual interface is the same as for a non-derived simple virtual interface.
[in] | Name | Name of the interface (has to be the same as the surrounding class name). |
[in] | REFKIND | One of MAXON_REFERENCE_NONE, MAXON_REFERENCE_POINTER, MAXON_REFERENCE_CONST_POINTER, MAXON_REFERENCE_NORMAL, MAXON_REFERENCE_CONST, MAXON_REFERENCE_COPY_ON_WRITE, MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE. |
#define MAXON_IMPLEMENTATION_SIMPLE | ( | C | ) |
MAXON_IMPLEMENTATION_SIMPLE has to be used in the implementation of a simple virtual interface. It defines the necessary members for such an implementation. For an example, see MAXON_INTERFACE_SIMPLE_VIRTUAL.
Don't forget to add MAXON_IMPLEMENTATION_SIMPLE_REGISTER below the implementation class.
[in] | C | Name of the implementation class (has to be the same as the surrounding class name). |
#define MAXON_IMPLEMENTATION_SIMPLE_DERIVABLE | ( | C, | |
BASE | |||
) |
MAXON_IMPLEMENTATION_SIMPLE_DERIVABLE has to be used in the implementation of a simple virtual interface. It defines the necessary members for such an implementation. For an example, see MAXON_INTERFACE_SIMPLE_VIRTUAL.
This wrapper macro enables the class to also be derived by other simple interface implementations.
Don't forget to add MAXON_IMPLEMENTATION_SIMPLE_REGISTER below the implementation class.
[in] | C | Name of the implementation class (has to be the same as the surrounding class name). |
[in] | BASE | Name of the class that is being derived from. |
#define MAXON_IMPLEMENTATION_SIMPLE_FINAL | ( | C, | |
BASE | |||
) |
MAXON_IMPLEMENTATION_SIMPLE_FINAL can be used in the implementation of a simple virtual interface that will not be able to be derived from. It defines the necessary members and the default constructor for such an implementation. For an example, see MAXON_INTERFACE_SIMPLE_VIRTUAL.
Don't forget to add MAXON_IMPLEMENTATION_SIMPLE_REGISTER below the implementation class.
[in] | C | Name of the implementation class (has to be the same as the surrounding class name). |
[in] | BASE | Name of the base class. |
#define MAXON_IMPLEMENTATION_SIMPLE_REGISTER | ( | C | ) |
MAXON_IMPLEMENTATION_SIMPLE_REGISTER completes the implementation of a simple virtual interface. It has to be used below the declaration of the implementation class (see MAXON_INTERFACE_SIMPLE_VIRTUAL).
[in] | C | Name of the implementation class. |
#define MAXON_GENERIC | ( | ... | ) |
#define MAXON_GENERIC_BASE | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_REMOVE_VARIANCE | ( | ... | ) |
#define PRIVATE_PRIVATE_MAXON_GENERIC_REMOVE_VARIANCE |
#define PRIVATE_MAXON_GENERIC_A | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_B | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_C | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_D | ( | SWITCH, | |
... | |||
) |
#define PRIVATE_MAXON_GENERIC_SWITCH_A | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_SWITCH_B | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_SWITCH_C | ( | X, | |
... | |||
) |
#define PRIVATE_MAXON_GENERIC_SWITCH_D | ( | N | ) |
#define PRIVATE_MAXON_GENERIC_SWITCH_E | ( | N | ) |
#define PRIVATE_MAXON_GENERIC_SWITCH_F | ( | N | ) |
#define PRIVATE_MAXON_GENERIC_SWITCH_0 | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_SWITCH_1 | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_SWITCH_TYPENAME | ( | ... | ) |
#define PRIVATE_MAXON_GENERIC_TYPENAME_TEST_typename |
#define PRIVATE_MAXON_GENERIC_USING_typename |
#define MAXON_INTERNED_ID | ( | IID, | |
NAME | |||
) |
MAXON_INTERNED_ID is used in a header file to define a global interned id as in
xyz
then refers to an InternedId with value "net.maxon.xyz"
. You can use this, e.g., for id-based maps where you need fast id comparisons: With interned ids, it suffices to just compare the Id pointers.
[in] | IID | C-string to use for the id. |
[in] | NAME | Name of the global InternedId object to declare. |
#define MAXON_INTERNED_ID_LOCAL | ( | IID, | |
NAME | |||
) |
MAXON_INTERNED_ID_LOCAL is used in a cpp file to define an InternedId as in
xyz
then refers to an InternedId with value "net.maxon.xyz"
. You can use this, e.g., for id-based maps where you need fast id comparisons: With interned ids, it suffices to just compare the Id pointers.
[in] | IID | C-string to use for the id. |
[in] | NAME | Name of the InternedId object to declare. |
#define MAXON_INITIALIZATION | ( | ... | ) |
#define MAXON_DECLARATION | ( | T, | |
Name, | |||
id, | |||
... | |||
) |
MAXON_DECLARATION declares a published object with a unique identifier. You can use this macro in a header file, then the object can be used by including the header file. Also a dependency of the including source file on the definition of the object is set up, but only when the declarations is actually used within the source file (see Declaration::operator()). See published_objects for more details.
The object itself has to be defined in another source file. There are several kinds of published objects, each is defined in a different way:
The macro creates a global C++ object with the given Name. It has Declaration as base class, and the referenced object of the given Type is obtained by writing Name(). Name.GetId() returns the unique identifier.
[in] | Type | Type of the object. This can be any type which is supported by Data, or ComponentDescriptor for published components. |
[in] | Name | Name of the object within the current namespace. |
[in] | id | Unique identifier of the object. |
[in] | ... | Optional code to put into the declaration's helper class, e.g. MAXON_IMPLEMENTATION_MODULE. |
#define PRIVATE_MAXON_DECLARATION_END |
#define PRIVATE_MAXON_DECLARATION | ( | T, | |
Name, | |||
id, | |||
storage, | |||
... | |||
) |
#define PRIVATE_MAXON_DECLARATION_REGISTER_1 | ( | cnt, | |
Name | |||
) |
#define PRIVATE_MAXON_DECLARATION_REGISTER_2 | ( | cnt, | |
REGISTRY, | |||
Name | |||
) |
#define PRIVATE_MAXON_DECLARATION_REGISTER_A | ( | N, | |
CNT, | |||
... | |||
) |
#define PRIVATE_MAXON_DECLARATION_REGISTER_B | ( | N, | |
CNT, | |||
... | |||
) |
#define PRIVATE_MAXON_DECLARATION_REGISTER_C | ( | N, | |
CNT, | |||
... | |||
) |
#define MAXON_DECLARATION_REGISTER | ( | ... | ) |
MAXON_DECLARATION_REGISTER defines a published object which has been declared in a header file by MAXON_DECLARATION. This macro has to be in a source file of a single module. The macro has to be followed by a code block which initializes the object. To be able to do so, the block receives a parameter named objectId
which contains the public Id of the object (this is the same as Name.GetId()
), and it has to return the initialized object or an error (the return type of the code block is a Result
).
The identifier is given in the ... argument. There are two possibilities:
MAXON_DECLARATION_REGISTER(Dimensions::Length)
MAXON_DECLARATION_REGISTER(ExecutionJobs, "net.maxon.execution.unittests")
Example:
See MAXON_DECLARATION for a complete example showing also the header file part.
[in] | ... | Here you have to specify either one or two arguments:
|
#define PRIVATE_MAXON_DECLARATION_REGISTER_DECLARATION | ( | Name, | |
prefix, | |||
id | |||
) |
#define MAXON_DEPENDENCY | ( | Name | ) |
MAXON_DEPENDENCY is used in conjunction with MAXON_DEPENDENCY_REGISTER. It has to be in the same namespace as the corresponding MAXON_DEPENDENCY_REGISTER.
[in] | Name | Name of the dependency. |
#define MAXON_INTERFACE_BASES | ( | ... | ) |
This macro has to be used for the declaration of a virtual interface to specify the base interfaces. If no specific base interface shall be used, ObjectInterface has to be used.
#define MAXON_INTERFACE_SINGLE_IMPLEMENTATION |
MAXON_INTERFACE_SINGLE_IMPLEMENTATION indicates for a virtual interface that there will be exactly one implementation of the interface which allows for more efficient method calls. The method calls will be as efficient as for a non-virtual interface, so in general there is no need to use non-virtual interfaces at all.
At runtime it is an error if there is not exactly one registered component which implements the interface.
#define MAXON_INTERFACE_INSTANTIATION | ( | INSTANTIATION, | |
ID, | |||
... | |||
) |
#define MAXON_INTERFACE | ( | Name, | |
REFKIND, | |||
ID, | |||
... | |||
) |
MAXON_INTERFACE marks a class declaration as a virtual interface declaration. Virtual interfaces specify a set of methods (tagged by MAXON_METHOD), and they can have several base interfaces (specified by MAXON_INTERFACE_BASES).
Each interface can be implemented by several components (see MAXON_COMPONENT). A set of components make a class (see ClassInterface), and the interface's methods can then be invoked on an object of a class which has a suitable component.
vinterfaces describes the declaration and implementation of virtual interfaces in detail. An example is the declaration of InputStreamInterface:
There are also non-virtual interfaces (see MAXON_INTERFACE_NONVIRTUAL). Those only allow a single implementation of the interface for the whole application, while virtual interfaces allow several implementations with the right one being selected by the class of the object on which a method is invoked. In general one should prefer virtual interfaces, if needed you can use MAXON_INTERFACE_SINGLE_IMPLEMENTATION to improve the performance of a method call.
[in] | Name | Name of the interface (has to be the same as the surrounding class name). |
[in] | REFKIND | One of MAXON_REFERENCE_NORMAL, MAXON_REFERENCE_CONST, MAXON_REFERENCE_COPY_ON_WRITE, MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE. |
[in] | ID | The unique identifier of the interface. |
[in] | ... | Optional information about the interface, for now only MAXON_IMPLEMENTATION_MODULE can be used here. |
#define MAXON_COMPONENT | ( | KIND, | |
... | |||
) |
MAXON_COMPONENT marks a C++ class declaration as a component implementation. Component implementations implement a set of virtual interfaces (see MAXON_INTERFACE), and a set of components in turn defines a class (see ClassInterface). vinterfaces describes the component implementation in detail.
The basic usage is illustrated by the following example:
The component implementation class has to be publicly derived from the Component class template. The argument to the first template parameter of Component has to repeat the class, the further arguments list the implemented interfaces.
Optionally you can specify arguments to MAXON_COMPONENT. The KIND argument has to be one of
After the KIND argument you can list base components or base classes. This only makes sense if the component is registered with MAXON_COMPONENT_CLASS_REGISTER or MAXON_COMPONENT_OBJECT_REGISTER: Those macros also define an object class which will contain the component. If you specify base components or base classes, they will be added automatically to the object class before the component itself is added.
Don't forget to add MAXON_COMPONENT_ONLY_REGISTER, MAXON_COMPONENT_CLASS_REGISTER or MAXON_COMPONENT_OBJECT_REGISTER below the implementation class.
[in] | KIND | Either leave empty, or use one of NORMAL, ABSTRACT, SINGLETON, FINAL, FINAL_SINGLETON. |
[in] | ... | Optionally you can specify base components or base classes for the object class which is defined by MAXON_COMPONENT_CLASS_REGISTER or MAXON_COMPONENT_OBJECT_REGISTER. |
#define PRIVATE_MAXON_COMPONENT_KIND |
#define PRIVATE_MAXON_COMPONENT_KINDNORMAL |
#define PRIVATE_MAXON_COMPONENT_KINDABSTRACT |
#define PRIVATE_MAXON_COMPONENT_KINDSINGLETON |
#define PRIVATE_MAXON_COMPONENT_KINDFINAL |
#define PRIVATE_MAXON_COMPONENT_KINDFINAL_SINGLETON |
#define PRIVATE_MAXON_COMPONENT_BASES_A | ( | POPULATED, | |
... | |||
) |
#define PRIVATE_MAXON_COMPONENT_BASES_B | ( | POPULATED, | |
... | |||
) |
#define PRIVATE_MAXON_COMPONENT_BASES_C | ( | POPULATED, | |
... | |||
) |
#define PRIVATE_MAXON_COMPONENT_BASES_0 | ( | ... | ) |
#define PRIVATE_MAXON_COMPONENT_BASES_1 | ( | ... | ) |
#define PRIVATE_MAXON_COMPONENT_ID | ( | ... | ) |
#define PRIVATE_MAXON_COMPONENT_REGISTRY | ( | ... | ) |
#define PRIVATE_MAXON_COMPONENT_TYPE | ( | DEF, | |
... | |||
) |
#define PRIVATE_MAXON_COMPONENT_EXTRA_FLAGS |
#define PRIVATE_MAXON_COMPONENT_REGISTER | ( | C, | |
TEMPLATE, | |||
TYPENAME, | |||
FLAGS, | |||
UNIT, | |||
REGISTRY, | |||
... | |||
) |
#define MAXON_COMPONENT_SIMPLE | ( | I | ) |
#define PRIVATE_MAXON_CLASS_REGISTER | ( | C, | |
TEMPLATE, | |||
REGISTRY, | |||
TYPE, | |||
... | |||
) |
#define MAXON_COMPONENT_ONLY_REGISTER | ( | C, | |
... | |||
) |
MAXON_COMPONENT_ONLY_REGISTER registers a component. Usually you also want to register an object class using the component, then you have to use the macros MAXON_COMPONENT_CLASS_REGISTER or MAXON_COMPONENT_OBJECT_REGISTER instead.
For the identifier there are three possibilities:
MAXON_COMPONENT_ONLY_REGISTER(WrappedStreamImpl, WrappedStreamComponent);
MAXON_COMPONENT_ONLY_REGISTER(OutdatedTestAdapter21, "net.maxon.component.outdatedtestadapter21");
MAXON_COMPONENT_ONLY_REGISTER(SomeComponentImpl, MyComponents, "net.maxon.test.somecomponent");
[in] | C | Name of the implementation class. |
[in] | ... | Here you have to specify either one or two arguments (similar to MAXON_DECLARATION_REGISTER):
|
#define MAXON_COMPONENT_ONLY_REGISTER_TEMPLATE | ( | C, | |
... | |||
) |
MAXON_COMPONENT_ONLY_REGISTER_TEMPLATE has to be used instead of MAXON_COMPONENT_ONLY_REGISTER if the component class is a template specialization.
#define MAXON_COMPONENT_CLASS_REGISTER | ( | C, | |
... | |||
) |
MAXON_COMPONENT_CLASS_REGISTER registers a component and also creates an object class which uses the component. This is the usual way to register a component because in most cases you also want to have an object class.
The object class consists of the base components and base classes (if any) which you have specified in the MAXON_COMPONENT macro, and then the component itself. You can obtain the object class by the GetClass() function of the component implementation class. The object class will also be registered using the identifier given as argument to the macro.
The identifier is given in the ... argument. There are three possibilities:
MAXON_COMPONENT_CLASS_REGISTER(IoFileOutputStream, "net.maxon.class.iofileoutputstream");
MAXON_COMPONENT_CLASS_REGISTER(IoFileHandler, IoHandlerObjectFileClass);
MAXON_COMPONENT_CLASS_REGISTER(NodesLoopTest, UnitTestClasses, "net.maxon.node.unittest.loop");
The component will be registered using the same identifier as the object class. A complete example for the first variant is
[in] | C | Name of the implementation class. |
[in] | ... | Here you have to specify either one or two arguments (similar to MAXON_DECLARATION_REGISTER):
|
#define MAXON_COMPONENT_CLASS_REGISTER_TEMPLATE | ( | C, | |
... | |||
) |
MAXON_COMPONENT_CLASS_REGISTER_TEMPLATE has to be used instead of MAXON_COMPONENT_CLASS_REGISTER if the component class is a template specialization. Example:
#define MAXON_COMPONENT_OBJECT_REGISTER | ( | C, | |
... | |||
) |
MAXON_COMPONENT_OBJECT_REGISTER registers a component, creates an object class which uses the component and finally creates an instance of the object class. The instance is registered under the given identifier.
As for MAXON_COMPONENT_CLASS_REGISTER, the object class consists of the base components and base classes (if any) which you have specified in the MAXON_COMPONENT macro, and then the component itself. You can obtain the object class by the GetClass() function of the component implementation class. In addition to MAXON_COMPONENT_CLASS_REGISTER this macro also creates an instance of the object class (using Create() on the class). This instance will be registered using the identifier given as argument to the macro. So you use this macro e.g. for registries like IoHandlers with entries of type IoHandler, while you use MAXON_COMPONENT_CLASS_REGISTER for registries like UnitTestClasses with entries of type Class<UnitTestRef>.
The identifier is given in the ... argument. There are three possibilities:
MAXON_COMPONENT_OBJECT_REGISTER(FileFormatHandlerGenericFileImpl, FileFormatHandlers::GenericFile);
MAXON_COMPONENT_OBJECT_REGISTER(IoStdinHandler, IoHandlers, "net.maxon.iohandler.stdin");
MAXON_COMPONENT_OBJECT_REGISTER(MyComponentClass, "com.foo.myobject");
The component and object class will be registered using the same identifier as the created object itself. A complete example is
[in] | C | Name of the implementation class. |
[in] | ... | Here you have to specify either one or two arguments (similar to MAXON_DECLARATION_REGISTER):
|
#define MAXON_COMPONENT_OBJECT_REGISTER_TEMPLATE | ( | C, | |
... | |||
) |
MAXON_COMPONENT_OBJECT_REGISTER_TEMPLATE has to be used instead of MAXON_COMPONENT_OBJECT_REGISTER if the component class is a template specialization.
#define MAXON_STATIC_REGISTER | ( | C, | |
... | |||
) |
#define PRIVATE_MAXON_STATIC_REGISTER_A | ( | C, | |
ID, | |||
... | |||
) |
#define PRIVATE_MAXON_STATIC_REGISTER_B | ( | C, | |
ID, | |||
... | |||
) |
#define PRIVATE_MAXON_STATIC_REGISTER_C | ( | C, | |
ID, | |||
... | |||
) |
#define PRIVATE_MAXON_INITIALIZED_TRANSLATION_UNIT | ( | ... | ) |
#define PRIVATE_MAXON_INTERFACE_REGISTER_VIRTUAL | ( | I, | |
POSTFIX, | |||
TARGS, | |||
TEMPL, | |||
IID, | |||
... | |||
) |
#define PRIVATE_MAXON_INTERFACE_REGISTER_VIRTUAL_SINGLE_IMPL | ( | I, | |
POSTFIX, | |||
TARGS, | |||
TEMPL, | |||
IID, | |||
... | |||
) |
#define PRIVATE_MAXON_INTERFACE_REGISTER_VIRTUAL_SINGLE_BASE | ( | I, | |
TEMPL, | |||
IID, | |||
BASE | |||
) |
#define PRIVATE_MAXON_INTERFACE_REGISTER_VIRTUAL_SINGLE_BASE_SINGLE_IMPL | ( | I, | |
TEMPL, | |||
IID, | |||
BASE | |||
) |
#define PRIVATE_MAXON_INTERFACE_REGISTER_STATIC | ( | I, | |
TEMPL, | |||
IID | |||
) |
#define MAXON_FUNCTIONNAME |
This macro returns the function name of the current member or global function.
#define MAXON_REGISTRY | ( | T, | |
Name, | |||
id | |||
) |
Declares a registry for entries of the given type. Registries serve as a registry of entries, i.e., values of a common registry-specific type. E.g., all classes are registered at registry Classes, while all data types are registered at DataTypes. More information about registries is given in extensions.
The macro defines a namespace of the given Name within the current namespace. This allows to add MAXON_DECLARATIONs to the namespace for registry entries which shall be made public in header files, however it is not mandatory to publish registry entries in header files:
The naming convention for registries is to use the plural of the kind of objects which will be registered at the registry (for example DataTypes
, IoHandlers
) or, if classes are registered at the registry, the kind of objects of those classes with a "Classes" suffix (for example DataCompressionClasses
, UnitTestClasses
).
The following example declares a registry IoHandlers at which entries of type IoHandler can be registered.
[in] | T | Type of the values which are stored at the registry. Has to be supported by Data. |
[in] | Name | Name of the registry within the current namespace. |
[in] | id | Unique identifier of the registry. |
#define CONSTSTRING | ( | x | ) |
#define CONSTCSTRING | ( | x | ) |
#define FormatString | ( | ... | ) |
Format a string with additional parameters. The Output Syntax is documented here. The processed String is returned, e.g. String str = FormatString("@ cubes are @", 5, "green"_s);
#define FormatCString | ( | ... | ) |
Format a string with additional parameters. The Output Syntax is documented here. The processed CString is returned, e.g. CString str = FormatString("@ cubes are @", 5, "green"_s);
#define MAXON_SWITCH_FALLTHROUGH |
This statement needs to be used for any case in a switch the contains code, but does not call break. An example:
#define MAXON_DISALLOW_COPY_AND_ASSIGN | ( | TypeName | ) |
This statement needs to be used at the beginning of any class that cannot be copied An example:
#define MAXON_OPERATOR_MOVE_ASSIGNMENT | ( | TypeName | ) |
This statement automatically creates a move assignment operator from an existing move constructor. The access control (private, protected or public) of the operator is inherited from the context, so you have to put the macro in the public section if you want to make the assignment operator public. An example:
#define MAXON_OPERATOR_COPY_ASSIGNMENT | ( | TypeName | ) |
This statement automatically creates a copy assignment operator from an existing copy constructor. The access control (private, protected or public) of the operator is inherited from the context, so you have to put the macro in the public section if you want to make the assignment operator public. An example:
#define MAXON_OPERATOR_INEQUALITY | ( | TypeName | ) |
This macro defines member operators >, <= and >= based on the member operator <. An example:
#define MAXON_OPERATOR_COMPARISON | ( | TypeName | ) |
This macro defines member operators !=, >, <= and >= based on the member operators == and <. An example:
#define MAXON_MOVE_MEMBERS | ( | ... | ) |
MAXON_MOVE_MEMBERS simplifies the definition of a move constructor. Add all members which shall be moved from the source object to the new object to the argument list of MAXON_MOVE_MEMBERS as in
You have to use src as name of the constructor parameter.
#define MAXON_COPY_MEMBERS | ( | ... | ) |
MAXON_COPY_MEMBERS simplifies the definition of a copy constructor. Add all members which shall be copied from the source object to the new object to the argument list of MAXON_COPY_MEMBERS as in
You have to use src as name of the constructor parameter.
#define MAXON_COPYFROM_MEMBERS | ( | ... | ) |
#define MAXON_OPERATOR_COPYFROM | ( | T, | |
... | |||
) |
#define MAXON_HASHCODE | ( | ... | ) |
MAXON_HASHCODE computes the hash code of the arguments based on DefaultCompare::GetCombinedHashCode.
#define MAXON_OPERATOR_EQUALITY | ( | T, | |
... | |||
) |
MAXON_OPERATOR_EQUALITY defines operator == and operator != for a class based on the equality operators for the class members. You have to list all members as in
This will define the equality of two quaternions a, b by (a._w == b._w) && (a._v == b._v)
.
[in] | T | The enclosing class type for which the equality operators shall be defined. |
[in] | ... | List of class members. Equality operators must be available for the types of all members. |
#define PRIVATE_MAXON_SIZEOF | ( | X, | |
I, | |||
A | |||
) |
#define PRIVATE_MAXON_IS_TRIVIALLY_HASHABLE | ( | X, | |
I, | |||
A | |||
) |
#define MAXON_OPERATOR_HASH | ( | T, | |
... | |||
) |
MAXON_OPERATOR_HASH defines the GetHashCode/GetUniqueHashCode functions using DefaultCompare::GetHashCode/GetUniqueHashCode for the class members. You have to list all members as in
This will define the hash code by DefaultCompare::GetCombinedHashCode(_w, _v)
.
[in] | T | The enclosing class type for which the hash code and hash value functions shall be defined. |
[in] | ... | List of class members. DefaultCompare::GetHashCode and DefaultCompare::GetUniqueHashCode must be available for the types of all members. |
#define MAXON_OPERATOR_EQUALITY_HASHCODE | ( | T, | |
... | |||
) |
MAXON_OPERATOR_EQUALITY_HASHCODE defines operator == and operator != for a class based on the equality operators for the class members, and it defines the GetHashCode/GetUniqueHashCode functions using DefaultCompare::GetHashCode/GetUniqueHashCode for the class members. You have to list all members as in
This will define the equality of two quaternions a, b by (a._w == b._w) && (a._v == b._v)
, and the hash code by DefaultCompare::GetCombinedHashCode(_w, _v)
.
[in] | T | The enclosing class type for which the equality operators and the hash code and hash value shall be defined. |
[in] | ... | List of class members. Equality operators must be available for the types of all members, likewise DefaultCompare::GetHashCode and DefaultCompare::GetUniqueHashCode. |
#define MAXON_OPERATOR_STRUCT | ( | T, | |
... | |||
) |
#define MAXON_STRUCT_TUPLE | ( | T, | |
... | |||
) |
#define MAXON_NONCONST_COUNTERPART | ( | ... | ) |
MAXON_NONCONST_COUNTERPART simplifies the implementation of a non-const counterpart of a const member function where the non-const function shall do exactly the same as the const function, but return a non-const value:
If the implementation code is a simple one-liner, you may find it easier to just copy the code from the const function to the non-const function, but for more complex functions this code duplication should be avoided by just calling the const function in the non-const function (and adding the necessary casts). This is exactly what MAXON_NONCONST_COUNTERPART does.
The return type of the called const function has to be either a pointer or a reference to a const value, and the non-const function needs to have the corresponding non-const return type.
[in] | ... | The call to the const function, see example. You have to forward all function parameters. |
#define MAXON_MEMBER_ACCESSORS | ( | T, | |
M, | |||
... | |||
) |
MAXON_MEMBER_ACCESSORS simplifies the implementation of all four variants of member accessor functions which return the member by reference. You only have to implement the const l-value variant, and the macro adds the remaining three (non-const l-value, const r-value, non-const r-value). In general one should have all four variants like in this example:
This is to prevent code which returns references to temporaries, for example the following code compiles but crashes at run-time if Test
didn't have ref-qualified accessor functions:
With ref-qualified accessor functions the code doesn't compile. To simplify the implementation the macro defines the latter three functions in terms of the const l-value accessor function:
[in] | T | The return type of the accessor functions (without any qualifier). |
[in] | M | The name of the accessor function. |
[in] | ... | List of parameter types of the accessor function (empty if the function has no parameters). |
#define MAXON_DECLARE_CONDITIONAL_COPY_CONSTRUCTOR | ( | cls, | |
cond | |||
) |
This macro exists to improve the readability of defining a conditionally enabled copy constructor. The regular approach of using std::enable_if as a template argument should be used, because if templated versions exist, the compiler may default-generate an implicit the copy constructor and prefer that. The alternative approach is to conditionally define the type of the argument: If the given condition is matched, the substituted type is that of an actual copy/move constructor. Otherwise, DummyParamType is used, so the function is not a copy constructor. Analogous variants exist for move constructor and copy/move assignment operators.
[in] | T | Type of the enclosing class. |
[in] | cond | The condition under which the copy constructor is enabled. Must be dependent on T. |
#define MAXON_DECLARE_CONDITIONAL_MOVE_CONSTRUCTOR | ( | cls, | |
cond | |||
) |
#define MAXON_DECLARE_CONDITIONAL_COPY_ASSIGNMENT | ( | cls, | |
cond | |||
) |
#define MAXON_DECLARE_CONDITIONAL_MOVE_ASSIGNMENT | ( | cls, | |
cond | |||
) |
#define MAXON_TARGET_RELEASE |
#define STD_IS_REPLACEMENT | ( | name, | |
... | |||
) |
#define MAXON_WARN_UNUSED |
This macro is used to create a compile error under XCode and GCC if a function's return value is not examined. It should always be used in combination with the Result<> error handling, but is not limited to it. Write this macro at the beginning of your function declaration - before 'static' and the Result<T> return value. MAXON_WARN_UNUSED does not need to be written in declarations of virtual or non-virtual interfaces when the keyword MAXON_METHOD was used. Here an example:
#define MAXON_WARN_UNUSED_CLASS |
#define MAXON_WARN_MUTE_UNUSED |
The MAXON_WARN_MUTE_UNUSED macro is deprecated. Please use iferr_ignore or iferr_cannot_fail and specify the reason why error handling isn't necessary.
#define MAXON_OFFSETOF_NON_STANDARD_LAYOUT |
#define MAXON_ASSERT_STANDARD_LAYOUT | ( | T | ) |
#define MAXON_ASSERT_LEGAL_LAYOUT | ( | T | ) |
#define MAXON_SWITCH_CHECKALLENUMS_BEGIN |
This macro enables a error or warning if a switch statement wont implement an enumeration. usage:
The compiler will print "error C4062: enumerator 'maxon::X::B' in switch of enum 'maxon::X' is not handled"
#define MAXON_SWITCH_CHECKALLENUMS_END |
#define MAXON_ASSUME_ALIGNED | ( | val, | |
alignment | |||
) |
#define MAXON_LIKELY | ( | ... | ) |
#define MAXON_UNLIKELY | ( | ... | ) |
#define MAXON_SAFE_PLACEMENT_NEW | ( | PTR | ) |
Clang 3.7 introduced a new optimization where a placement new wont check the given ptr for nullptr. for places where the pointer is already checked outside this is a great optimization. but places that allocate memory and pass this without a check to the placement new would crash the app. example:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1748 http://llvm.org/viewvc/llvm-project?view=revision&revision=229213
#define MAXON_FILE |
#define FORMATTEMPLATECHECK0 | ( | formatString, | |
... | |||
) |
#define FORMATTEMPLATECHECK1 | ( | formatString, | |
... | |||
) |
#define FORMATTEMPLATECHECK_C | ( | count, | |
formatString, | |||
... | |||
) |
#define FORMATTEMPLATECHECK_B | ( | count, | |
formatString, | |||
... | |||
) |
#define FORMATTEMPLATECHECK_A | ( | count, | |
formatString, | |||
... | |||
) |
#define FORMATTEMPLATECHECK | ( | formatString, | |
... | |||
) |
#define OutputWithFlags | ( | flags, | |
formatString, | |||
... | |||
) |
OutputWithFlags outputs text into the console. The output is visible in debug builds or in a release build when the debug console with diagnostic output is activated. The full Output Syntax can be used for the format string. Note that if you do not specify any additional parameters after the formatting string no formatting takes place - the raw string will stay unchanged. THREADSAFE.
#define DebugOutput | ( | flags, | |
formatString, | |||
... | |||
) |
DebugOutput outputs text into the console. It only has any effect in debug builds and does not cost any time in release builds. It should be used for temporary output that must not be visible to a customer or external developer. The full Output Syntax can be used for the format string. Note that if you do not specify any additional parameters after the formatting string no formatting takes place - the raw string will stay unchanged. The flags are of type OUTPUT. THREADSAFE.
#define DiagnosticOutput | ( | formatString, | |
... | |||
) |
DiagnosticOutput outputs text into the console. The output is visible in debug builds or in a release build when the debug console with diagnostic output is activated. The full Output Syntax can be used for the format string. Note that if you do not specify any additional parameters after the formatting string no formatting takes place - the raw string will stay unchanged. THREADSAFE.
#define DiagnosticVarOutput | ( | ... | ) |
DiagnosticVarOutput outputs the values of variables into the console. It shows the variable names as well as their values. E.g. write {DiagnosticVarOutput(x, _y, v.z);} to get an output like
{"x: 42, _y: 99, v.z: 0"}. The output is visible in debug builds or in a release build when the debug console with diagnostic output is activated. THREADSAFE.
#define WarningOutput | ( | formatString, | |
... | |||
) |
WarningOutput outputs text into the console. The output is visible in debug builds or in a release build when the debug console with warning output is activated. It should only be used to output unexpected, non-critical conditions. It automatically shows header information and adds a line break. The full Output Syntax can be used for the format string. Note that if you do not specify any additional parameters after the formatting string no formatting takes place - the raw string will stay unchanged. THREADSAFE.
#define CriticalOutput | ( | formatString, | |
... | |||
) |
CriticalOutput outputs text into the console. The output is visible in debug builds or in a release build when the debug console with critical output is activated. It should only be used to output unexpected, critical conditions that would most likely result in instability, e.g. an illegal array access or corrupt object structure. It can also be used for unexpected events, e.g. if a necessary module cannot be initialized. It automatically shows header information and adds a line break. It automatically stops the debugger if present. The full Output Syntax can be used for the format string. Note that if you do not specify any additional parameters after the formatting string no formatting takes place - the raw string will stay unchanged. THREADSAFE.
#define ApplicationOutput | ( | formatString, | |
... | |||
) |
ApplicationOutput outputs text to the application console. The output is visible in the GUI version of the application. The full Output Syntax can be used for the format string. Note that if you do not specify any additional parameters after the formatting string no formatting takes place - the raw string will stay unchanged. THREADSAFE.
#define OUTPUTCHECK0 | ( | A, | |
B | |||
) |
#define OUTPUTCHECK1 | ( | A, | |
B | |||
) |
#define OUTPUTCHECK_C | ( | count, | |
A, | |||
B | |||
) |
#define OUTPUTCHECK_B | ( | count, | |
A, | |||
B | |||
) |
#define OUTPUTCHECK_A | ( | count, | |
A, | |||
B | |||
) |
#define OUTPUTCHECK | ( | A, | |
B, | |||
... | |||
) |
#define DebugStop | ( | ... | ) |
DebugStop stops the execution of the application if it is a debug build and a debugger is present. In case of a debug build the file and line number are output (critical output category). A C string can be passed as argument that will be output as well. THREADSAFE.
#define CriticalStop | ( | ... | ) |
CriticalStop stops the execution of the application if a debugger is present. The file and line number are output (critical output category). A C string can be passed as argument that will be output as well. THREADSAFE.
#define DebugAssert | ( | condition, | |
... | |||
) |
DebugAssert is a conditional DebugStop. It does the same as DebugStop() if 'condition' is false. A C string can be passed as optional argument for output. THREADSAFE.
#define CriticalAssert | ( | condition, | |
... | |||
) |
CriticalAssert is a conditional CriticalStop. It does the same as CriticalStop() if 'condition' is false. A C string can be passed as optional argument for output. THREADSAFE.
SizeAssert is a static assert verified at compile-time. It checks if the passed type is of size 's'. On failure an exception of negative STATICASSERT_CONDITION_FALSE is raised. THREADSAFE.
#define MAXON_SOURCE_LOCATION |
MAXON_SOURCE_LOCATION creates a SourceLocation object for the current file location that can be passed to a memory allocation function (or something similar). This will later be used to track the origin of memory leaks. You could as well write SourceLocation(MAXON_FILE, LINE) in your code, but the purpose of this macro is to be able to easily modify the inner workings of the memory leak detector without having to modify all callers.
#define MAXON_SOURCE_LOCATION_DECLARATION |
MAXON_SOURCE_LOCATION_DECLARATION is a helper macro for function declarations that expect information about the origin of a memory allocation. Again the purpose of the macro is to be able to easily modify the inner workings of memory the leak detector without having to modify all callers.
#define MAXON_SOURCE_LOCATION_FORWARD |
MAXON_SOURCE_LOCATION_FORWARD is used to forward information about the origin of a memory allocation to other functions with a MAXON_SOURCE_LOCATION_DECLARATION. The purpose of the macro is to be able to easily modify the inner workings of memory the leak detector without having to modify all callers.
#define MAXON_SOURCE_LOCATION_NAME | ( | x | ) |
MAXON_SOURCE_LOCATION_NAME adds the allocated object name to the SourceLocation object.
#define MAXON_FUNCTION_SIGNATURE |
MAXON_FUNCTION_SIGNATURE return the name of the function the code is located in.
Internal helper to include original error's message in the UnitTestError.
#define PRIVATE_MAXON_UNITTESTERROR_A | ( | type, | |
condition, | |||
msgPopulated, | |||
... | |||
) |
#define CheckUnitTestState | ( | condition, | |
... | |||
) |
This macro checks the specified condition, and if this evaluates to false, a UnitTestError is returned from the current function. The condition will be part of the error message (taken over verbatim). The macro can only be used in a function which returns a Result<T>.
Optionally, you can specify a message which will be used instead of the verbatim condition. The message may use formatting like FormatString.
For examples, see CheckArgument.
[in] | condition | The condition to evaluate. If it evaluates to false, an UnitTestError will be returned. |
[in] | ... | Optional message and parameters, will be formatted by FormatString. |
#define CheckUnitTestResultOk | ( | functioncall, | |
... | |||
) |
This macro checks if the result of the given function call returns no error. Any non error result is accepted, content of the Result will not be tested. If the function call returns an error of any type, the unit test fails, returning a UnitTestError. The function call string will be part of the error message (taken over verbatim). The macro can only be used in a function which returns a Result<T>.
#define CheckUnitTestResultError | ( | functioncall, | |
... | |||
) |
Opposite of CheckUnitTestResultOk. Use in a unit test to validate that a given function call results in any kind of error. If no error is detected from the function call, the unit test fails, returning a UnitTestError.
using OverloadRank0 = PrivateOverloadRank0* |
Use OverloadRank0 .. OverloadRank5 as parameter types for a set of overloaded functions which have to be selected by means of SFINAE. OverloadRank0 has to be used for the least specific function (the fallback), higher ranks for the more specific functions in the correct order. E.g:
The set of overloaded functions has to be invoked with OVERLOAD_MAX_RANK as argument for the overload selection parameter:
using OverloadRank1 = PrivateOverloadRank1* |
See OverloadRank0.
using OverloadRank2 = PrivateOverloadRank2* |
See OverloadRank0.
using OverloadRank3 = PrivateOverloadRank3* |
See OverloadRank0.
using OverloadRank4 = PrivateOverloadRank4* |
See OverloadRank0.
using OverloadRank5 = PrivateOverloadRank5* |
See OverloadRank0.
using OverloadRankMax = OverloadRank5 |
using AddArrayT = T[N] |
This type alias stands for the type {T[N]}.
T | A type. |
N | The bound of the array. |
using AddArrayOfUnknownBoundT = T[] |
This type alias stands for the type {T[]}.
T | A type. |
using GenericCastReturnType = std::enable_if<GenericCastTrait<TO, typename maxon::details::MakeLValueConst<FROM>::type, SAFE>::value, typename GenericCastTrait<TO, typename maxon::details::MakeLValueConst<FROM>::type, SAFE>::ReturnType> |
using ExecutionInterface = JobInterfaceTemplate<EXECUTION> |
Class for code that needs to be executed once the whole system including modules is up and running. To register code write:
using AddResult = typename maxon::details::AddResultHelper<T, HAS_ERROR>::type |
using Out = std::is_constructible<TO, FROM> |
using ClassTransformer = Delegate<Result<void>(ClassInterface*)> |
using Component = ComponentWithBase<C, ComponentRoot, INTERFACES...> |
using AdapterComponent = ComponentWithBase<C, AdapterRoot, FROM, INTERFACES...> |
using SelfPtr = typename ComponentHelper<ComponentRoot, INTERFACES...>::type::SelfPtr |
using Utf16CharBuffer = BufferedBaseArray<Utf16Char, 512> |
using Utf32CharBuffer = BufferedBaseArray<Utf32Char, 256> |
using FROMSTR = void (*)(void* p, const Block<const Utf32Char>& str, Int& processed, const String& formatStatement, Bool& error) |
using NonEmptyBases = typename maxon::details::NonEmptyBasesHelper<typename std::conditional<STD_IS_REPLACEMENT(empty, BASES), EmptyClass, BASES>::type...>::type |
NonEmptyBases is a type which has all of the classes given in BASES as (possibly indirect) base classes, except those which are empty. It can be used to avoid padding bytes which some compilers add for empty base classes. If all classes in BASES are empty, then NonEmptyBases is just a type alias for EmptyClass.
BASES | List of base classes. |
using TOSTR = void (*)(String& result, const void* ptr, const FormatStatement* formatStatement) |
|
strong |
Available subsystems (Windows only)
Enumerator | |
---|---|
UNDEFINED | Undefined SUBSYSTEM. |
CONSOLE | (\/SUBSYSTEM:CONSOLE) |
WINDOWS | (\/SUBSYSTEM:WINDOWS) |
|
strong |
Possible values for GetUrl() function.
Enumerator | |
---|---|
STARTUP_DIR | The directory where the executable/bundle is placed in. The executable name is not part of the Url. |
APPLICATION | The Url of the executable (Windows / Linux) or bundle (OS X / iOS). |
APP_EXECUTABLE | The Url of the inner executable. Under Windows / Linux this is identical to APPLICATION. Under OS X / iOS this is the Url inside the bundle. |
CORELIBS_DIR | The directory where the core modules are placed in. |
RESOURCE_DIR | The directory where the resource is placed in. |
TEMP_DIR | Temporary directory where data can be read or written. The temporary directory is placed in various locations depending on the operating system. |
PREFS_DIR | Preferences directory. The preferences directory is based on the startup Url of the application. If the parent directory location is changed, the preferences Url will change as well. The preferences directory is placed in various locations depending on the operating system. |
GLOBALPREFS_DIR | Global preferences directory. The global preferences Url is always in the same place for all applications on the same operating system. |
DESKTOP_DIR | Users desktop directory. |
USER_HOME_DIR | Users Home directory. |
USER_DOCUMENTS_DIR | Users documents directory. |
SYSTEM_PROGRAMS_DIR | System application directory. This is where apps are installed by default (e.g. "C:\Program Files") |
CURRENT_WORKING_DIR | Current working directory. |
CURRENT_MODULE_DIR | Directory of the module that invoked this call. |
CURRENT_MODULE_RESOURCE_DIR | Resource directory of the module that invoked this call. |
LIBRARY_DIR | Library directory. |
PREFS_DIR_STATIC | Same as PREFS_DIR but without being able to set the path in the config. Cineware AE plug-in generates a lite.cert file at this location. Used for placing and reading the Lite certification file. |
TESTDATA_DIR | Path to the test data file within g_testDataDir. |
|
strong |
Enumerator | |
---|---|
DONTWAIT | Stops the execution as soon as all initializations are done, used for command line mode. |
KEEPRUNNING | Keeps the program running after all initializations. |
SHUTDOWN | Quits the application and leave the main loop. Only working when APPLICATIONMODE::KEEPRUNNING was set before. |
|
strong |
Enumerator | |
---|---|
NONE | Default case. |
COMMANDLINE | Application runs as headless command line version. |
LIBRARY | Frameworks are used by plugins or another host (Cineware, Redshift, ...) |
UI | UI is enabled (if this is LIBRARY or COMMANDLINE) |
|
strong |
|
strong |
String Comparison Mode.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
Output flags for OutputWithFlags and DebugOutput.
|
strong |
GenericCastReturnType<TO, FROM, false>::type maxon::GenericReinterpretCast | ( | FROM && | value | ) |
GenericCastReturnType<TO, FROM, true>::type maxon::GenericUpCast | ( | FROM && | value | ) |
T maxon::DefaultValue | ( | ) |
Returns a default value of type T.
The default value is defined as follows:
T | Type of the default value. The cases T, T& and const T& are handled differently. |
ALLOW_NONCONST | With the default value of false, a compilation error occurs for non-const reference types. With true, a non-const reference to write-protected memory will be returned, so any write access to the returned reference will crash. |
enum maxon::SUBSYSTEM maxon::MAXON_ENUM_LIST | ( | SUBSYSTEM | , |
"net.maxon.datatype.enum.subsystem" | |||
) |
enum maxon::APPLICATION_URLTYPE maxon::MAXON_ENUM_LIST | ( | APPLICATION_URLTYPE | , |
"net.maxon.datatype.enum.application_urltype" | |||
) |
enum maxon::APPLICATIONMODE maxon::MAXON_ENUM_LIST | ( | APPLICATIONMODE | , |
"net.maxon.datatype.enum.applicationmode" | |||
) |
enum maxon::APPLICATIONFEATURE maxon::MAXON_ENUM_FLAGS | ( | APPLICATIONFEATURE | ) |
maxon::MAXON_DECLARATION | ( | Class< Error > | , |
ErrorObjectClass | , | ||
"net.maxon.class.errorobject" | , | ||
MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel") | |||
) |
Base Error class to inherit from.
maxon::MAXON_DECLARATION | ( | AggregatedError | , |
AggregatedErrorObject | , | ||
"net.maxon.object.aggregatederror" | , | ||
MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel") | |||
) |
MAXON_ATTRIBUTE_FORCE_INLINE void maxon::operator% | ( | ErrorPtr & | rv, |
ThreadReferencedError & | err | ||
) |
R maxon::Cast | ( | ErrorPtr & | ref | ) |
Casts an err object to an object reference of another error interface type. If the cast would be invalid because the err object isn't an instance of the other error interface, a null reference is returned.
[in] | ref | Error object to cast. |
R | Reference class to cast to. This must be a reference class of a virtual interface. |
Bool maxon::IsErrorOfType | ( | const Error & | err | ) |
Checks if an error is of type ERRORTYPE. If multiple errors have been returned (AggregatedError) this method will return true if one of them is of type ERRORTYPE.
ERRORTYPE | The type of error the caller is interested in. |
[in] | err | The returned error to check. |
maxon::MAXON_REGISTRY | ( | JobRef | , |
ExecutionJobs | , | ||
"net.maxon.registry.executionjobs" | |||
) |
DefaultValueDetector<C*, &C::DefaultValue>::type maxon::ImplementationCreateDefaultValue | ( | OverloadRank3 | ) |
std::enable_if<MAXON_IS_COW_KIND(C::PrivateInterface::Hxx1::ReferenceClass::Handler::KIND), C*>::type maxon::ImplementationCreateDefaultValue | ( | OverloadRank2 | ) |
SFINAEHelper<C*, typename C::PrivateInterface::Hxx1::ReferenceClass::Handler>::type maxon::ImplementationCreateDefaultValue | ( | OverloadRank1 | ) |
C* maxon::ImplementationCreateDefaultValue | ( | OverloadRank0 | ) |
DefaultValueDetector<C*, &C::DefaultValue>::type maxon::ImplementationDestroyDefaultValue | ( | const C * | , |
OverloadRank3 | |||
) |
std::enable_if<MAXON_IS_COW_KIND(C::PrivateInterface::Hxx1::ReferenceClass::Handler::KIND), C*>::type maxon::ImplementationDestroyDefaultValue | ( | const C * | o, |
OverloadRank2 | |||
) |
void maxon::ImplementationDestroyDefaultValue | ( | const C * | , |
OverloadRank0 | |||
) |
maxon::MAXON_DECLARATION | ( | Class< LoggerTypeRef > | , |
LoggerTypeBaseClass | , | ||
"net.maxon.class.loggertypebase" | , | ||
MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel") | |||
) |
maxon::MAXON_REGISTRY | ( | Class< LoggerTypeRef > | , |
LoggerTypes | , | ||
"net.maxon.core.registry.loggertypes" | |||
) |
maxon::MAXON_REGISTRY | ( | LoggerRef | , |
Loggers | , | ||
"net.maxon.core.registry.loggers" | |||
) |
RESULT maxon::AssertCast | ( | SRC && | ref | ) |
Casts an object reference to an object reference of another interface type. In a debug configuration, it is checked if the referenced object is really an instance of the interface, while there is no check in a release configuration. No new reference is created, so the reference counter won't change.
[in] | ref | Object reference to cast. |
R | Reference class to cast to. This must be a reference class of a virtual interface. |
RESULT maxon::Cast | ( | SRC && | ref | ) |
Casts an object reference to an object reference of another interface type. If the cast would be invalid because the referenced object isn't an instance of the interface, a null reference is returned. No new reference is created, so the reference counter won't change.
[in] | ref | Object reference to cast. |
R | Reference class to cast to. This must be a reference class of a virtual interface. |
Casts a Result containing an object reference to a Result containing the same object reference, but having another reference class. If the cast would be invalid because the referenced object isn't an instance of the interface of the desired reference class, the reference within the returned Result will be set to nullptr.
[in] | src | Result to cast. |
R | Reference class to cast to. This must be a reference class of a virtual interface. |
Casts a Result containing an object reference to a Result containing the same object reference, but having another reference class. In a debug configuration, it is checked if the referenced object is really an instance of the interface, while there is no check in a release configuration. No new reference is created, so the reference counter won't change.
[in] | src | Result to cast. |
R | Reference class to cast to. This must be a reference class of a virtual interface. |
maxon::MAXON_REGISTRY | ( | Class<> | , |
Classes | , | ||
"net.maxon.registry.classes" | |||
) |
maxon::MAXON_REGISTRY | ( | ClassTransformer | , |
ClassTransformers | , | ||
"net.maxon.registry.classtransformers" | |||
) |
maxon::MAXON_DECLARATION | ( | Class< ObjectRef > | , |
ObjectBaseClass | , | ||
"net.maxon.class.object" | , | ||
MAXON_IMPLEMENTATION_MODULE("net.maxon.kernel") | |||
) |
class ComponentRoot maxon::MAXON_IF_TARGET_DEBUG | ( | :public | EmptyVirtualClass | ) |
ComponentRoot is the base class of all components (see MAXON_COMPONENT). Usually you don't have to take care of this because the Component template automatically sets ComponentRoot as base class. But if you use ComponentWithBase instead, you have to make sure that the base class you use for that template derives from ComponentRoot.
const StringDecodingRef& maxon::GetUtf8DefaultDecoder | ( | ) |
Returns the default decoder for UTF-8 encodings. Note that you cannot check for equality to detect if an encoding is UTF-8 - as the reference is different in every module or instantiation. Use decoder.HasSameClass(GetUtf8DefaultDecoder())
instead.
const StringEncodingRef& maxon::GetUtf8DefaultEncoder | ( | ) |
Returns the default encoder for UTF-8 encodings. Note that you cannot check for equality to detect if an encoding is UTF-8 - as the reference is different in every module or instantiation. Use encoder.HasSameClass(GetUtf8DefaultEncoder())
instead.
enum maxon::STRINGCONVERSION maxon::MAXON_ENUM_FLAGS | ( | STRINGCONVERSION | ) |
enum maxon::STRINGCOMPARISON maxon::MAXON_ENUM_LIST | ( | STRINGCOMPARISON | ) |
MAXON_ATTRIBUTE_FORCE_INLINE const String& maxon::operator""_s | ( | const char * | str, |
std::size_t | cnt | ||
) |
Returns a String object of the characters passed in quotation marks. If the same characters are used in another place the String will still only be created once in memory. In the following example the second loop is far more efficient because the String is created only once whereas in the first loop the characters are converted to unicode and a new String object is created (and deleted) on each iteration.
As MSVC does not properly resolve "\u" sequences for char* you need to use the wchar_t version below for any characters >=0x80.
MAXON_ATTRIBUTE_FORCE_INLINE const String& maxon::operator""_s | ( | const wchar_t * | str, |
std::size_t | cnt | ||
) |
Returns a String object of the characters passed in quotation marks. This version can be used for unicode characters, e.g. L"t\u00e8st"_s.
MAXON_ATTRIBUTE_FORCE_INLINE const CString& maxon::operator""_cs | ( | const char * | str, |
std::size_t | cnt | ||
) |
Creates a (constant) C-string.
Result<void> maxon::DescribeIO | ( | const CStringInterface & | s, |
const DataSerializeInterface & | dsi | ||
) |
Result<void> maxon::DescribeIO | ( | const StringInterface & | s, |
const DataSerializeInterface & | dsi | ||
) |
Concatenates two strings, please don't use a = a + b since this is several times slower than a += b.
Concatenates two strings, please don't use a = a + b since this is several times slower than a += b.
String maxon::ToString | ( | const String & | str, |
const FormatStatement * | formatStatement, | ||
Bool | = false |
||
) |
String maxon::ToString | ( | const CString & | str, |
const FormatStatement * | formatStatement, | ||
Bool | = false |
||
) |
decltype(std::declval<T>().ToString()) maxon::ToStringHelper | ( | const T * | object, |
const FormatStatement * | formatStatement, | ||
Int * | |||
) |
String maxon::ToStringHelper | ( | const T * | object, |
const FormatStatement * | formatStatement, | ||
const Int * | checkDataType | ||
) |
std::enable_if<!STD_IS_REPLACEMENT(enum, T), String>::type maxon::ToString | ( | const T & | object, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = true |
||
) |
std::enable_if<!STD_IS_REPLACEMENT(function, T), String>::type maxon::ToString | ( | const T * | object, |
const FormatStatement * | formatStatement | ||
) |
const String& maxon::ToString | ( | Bool | val, |
const FormatStatement * | formatStatement, | ||
Bool | = false |
||
) |
String maxon::ToString | ( | Char | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | UChar | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Int16 | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Int32 | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Int64 | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | UInt16 | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | UInt32 | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | UInt64 | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Float64 | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Floating point values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Float32 | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Floating point values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Utf16Char | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Utf32Char | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a variable into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Integer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Char * | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a C-string into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. No formatting instructions are currently supported. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | const Char * | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a C-string into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. No formatting instructions are currently supported. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | const void * | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a pointer into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Pointer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | void * | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a pointer into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Pointer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | const Generic * | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a pointer into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Pointer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ToString | ( | Generic * | val, |
const FormatStatement * | formatStatement, | ||
Bool | checkDataType = false |
||
) |
Converts a pointer into a readable string.
[in] | val | The value that will be converted. |
[in] | formatStatement | Nullptr or additional formatting instruction. See also Formatting Pointer values. |
[in] | checkDataType | Must be set to false, only for internal use. |
String maxon::ExtractString | ( | StringProxy * | proxy | ) |
void maxon::ScanParameter | ( | Float64 & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | Float32 & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | Int64 & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | Int32 & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | Int16 & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | Char & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | UInt64 & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | UInt32 & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | UInt16 & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | UChar & | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::ScanParameter | ( | T *& | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
void maxon::FromStrHlp | ( | T * | result, |
const Block< const Utf32Char > & | str, | ||
Int & | processed, | ||
const String & | formatStatement, | ||
Bool & | error | ||
) |
FROMSTR maxon::GetFromStrHlp | ( | ) |
Bool maxon::ScanStringTemplate | ( | const String & | str, |
const String & | format, | ||
Int * | parsedCharacters, | ||
Int | argsCnt, | ||
void ** | args, | ||
FROMSTR * | argFuncs | ||
) |
CString maxon::ExtractCString | ( | StringProxy * | proxy | ) |
MAXON_ATTRIBUTE_FORCE_INLINE T maxon::ForwardString | ( | T && | str | ) |
Scans a string 'inputStr' for parameters and stores them according to parameter format 'formatStr' into the locations given by the additional arguments. The basic syntax is the same as for DiagnosticOutput Output Syntax.
However only {x} and {c} are supported as formatting statements. It is not necessary to set {x} if you pass a pointer as parameter, only for regular Int/UInt's.
Here an example:
The operation succeeds with 7.345 for val1, 0xaef5 for val2, 56 for val3 and 0xab for val4.
[in] | inputStr | The input string containing the data that will be extracted. |
[in] | formatStr | The string containing the parameter format. |
[out] | args | Values that will be extracted. |
Bool maxon::ScanString | ( | STR | inputStr, |
Int & | parsedInputCharacters, | ||
STR2 | formatStr, | ||
ARGS &... | args | ||
) |
Scans a string 'inputStr' for parameters and stores them according to parameter format 'formatStr' into the locations given by the additional arguments. The basic syntax is the same as for DiagnosticOutput Output Syntax.
However only {x} and {c} are supported as formatting statements. It is not necessary to set {x} if you pass a pointer as parameter, only for regular Int/UInt's.
Here an example:
The operation succeeds with 7.345 for val1, 0xaef5 for val2, 56 for val3 and 0xab for val4.
[in] | inputStr | The input string containing the data that will be extracted. |
[out] | parsedInputCharacters | The number of characters that were parsed to match formatStr. |
[in] | formatStr | The string containing the parameter format. |
[out] | args | Values that will be extracted. |
String maxon::_LoadResourceString | ( | const Id & | scope, |
const InternedId & | keyValue | ||
) |
String maxon::LoadResourceString | ( | const STRID & | identifier, |
const ARGUMENTS &... | args | ||
) |
Loads the string 'identifier' from the resource and format with the passed parameters.
Calculates the length of a null-terminated string of type SysChar.
Calculates the length of a null-terminated string of type Utf32Char.
Calculates the length of a null-terminated string of type Utf16Char.
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsSpace | ( | TYPE | chr | ) |
Checks if the passed character is a space.
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsTab | ( | TYPE | chr | ) |
Checks if the passed character is a tab.
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsSpaceOrTab | ( | TYPE | chr | ) |
Checks if the passed character is a space or tab.
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsLineEnd | ( | TYPE | chr | ) |
Checks if the passed character is a line end.
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsNumeric | ( | TYPE | chr | ) |
Checks if the passed character is a digit.
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsAlphabetic | ( | TYPE | chr | ) |
Checks if the passed character is a latin character ('A' to 'Z' and 'a' to 'z').
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsAlphanumeric | ( | TYPE | chr | ) |
Checks if the passed character is alphabetic or numeric.
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsHexadecimal | ( | TYPE | chr | ) |
Checks if the passed character is alphabetic or numeric.
MAXON_ATTRIBUTE_FORCE_INLINE Int maxon::GetHexadecimalValue | ( | TYPE | chr | ) |
Calculates the value from a hexadecimal character. For a valid return value IsHexadecimal must fulfilled.
|
static |
Concatenates multiple elements to create a string. Here an example:
The result will be "a, b"
[in] | iterable | The elements to concatenate, can be any iterable data type. The elements must have a valid implementation of ToString. |
[in] | delimiter | The delimiter that will be placed inbetween two elements. Must be a String or CString. It can be empty. |
[in] | formatStr | The string containing the parameter format. |
void maxon::AppendStringWithSeparator | ( | STRINGTYPE & | base, |
const STRINGTYPE & | add, | ||
const STRINGTYPE & | delimiter | ||
) |
STRINGTYPE maxon::AddStringWithSeparator | ( | const STRINGTYPE & | base, |
const STRINGTYPE & | add, | ||
const STRINGTYPE & | delimiter | ||
) |
maxon::MAXON_MEMBERFUNCTION_DETECTOR | ( | GetReferenceCounter | ) |
enum maxon::NORMALIZATION maxon::MAXON_ENUM_LIST | ( | NORMALIZATION | ) |
enum maxon::CHARACTERTYPE UChar maxon::MAXON_ENUM_LIST | ( | CHARACTERTYPE | ) |
MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsUnicodeLetter | ( | TYPE | chr | ) |
Checks if the passed character is a unicode letter.
enum maxon::TARGETAUDIENCE maxon::MAXON_ENUM_FLAGS | ( | TARGETAUDIENCE | , |
"net.maxon.datatype.enum.targetaudience" | , | ||
EARLY | |||
) |
enum maxon::WRITEMETA maxon::MAXON_ENUM_FLAGS | ( | WRITEMETA | , |
"net.maxon.datatype.enum.writemeta" | , | ||
EARLY | |||
) |
enum maxon::OUTPUT maxon::MAXON_ENUM_FLAGS | ( | OUTPUT | , |
"net.maxon.datatype.enum.output" | , | ||
EARLY | |||
) |
void maxon::_ConsoleOutput | ( | OUTPUT | flags, |
StringProxy * | str, | ||
Int | line, | ||
const Char * | file | ||
) |
void maxon::_ApplicationOutput | ( | maxon::TARGETAUDIENCE | t, |
maxon::WRITEMETA | lvl, | ||
const maxon::String & | str, | ||
Int | line, | ||
const Char * | file | ||
) |
void maxon::_ApplicationOutput | ( | maxon::TARGETAUDIENCE | t, |
maxon::WRITEMETA | lvl, | ||
const Char * | str, | ||
Int | line, | ||
const Char * | file | ||
) |
void maxon::_ApplicationOutput | ( | maxon::TARGETAUDIENCE | t, |
maxon::WRITEMETA | lvl, | ||
const maxon::StringProxy * | proxy, | ||
Int | line, | ||
const Char * | file | ||
) |
void maxon::ToStrHlp | ( | String & | result, |
const T * | x, | ||
const FormatStatement * | formatStatement | ||
) |
TOSTR maxon::GetToStrHlp | ( | ) |
StringProxy* maxon::Format | ( | const String & | formatString, |
Int | argsCnt, | ||
const void ** | args, | ||
const TOSTR * | argFuncs | ||
) |
StringProxy* maxon::Format | ( | const Char * | formatString, |
Int | argsCnt, | ||
const void ** | args, | ||
const TOSTR * | argFuncs | ||
) |
StringProxy* maxon::FormatTemplateX | ( | FORMATSTR | formatString, |
const ARGS &... | args | ||
) |
FORMATSTR maxon::FormatTemplateX | ( | FORMATSTR | formatString | ) |
cosntexpr which returns the number of '@' parameters in a Format string.
|
constexpr |
|
static |
enum maxon::REGPARSEMODE maxon::MAXON_ENUM_LIST | ( | REGPARSEMODE | ) |
maxon::MAXON_REGISTRY | ( | Class< UnitTestRef > | , |
UnitTestClasses | , | ||
"net.maxon.registry.unittestclasses" | |||
) |
maxon::MAXON_REGISTRY | ( | Class< UnitTestRef > | , |
UnitTestWithC4DPluginClasses | , | ||
"net.maxon.registry.unittestwithc4dpluginclasses" | |||
) |
maxon::MAXON_REGISTRY | ( | Class< UnitTestRef > | , |
SpeedTestClasses | , | ||
"net.maxon.registry.speedtestclasses" | |||
) |
maxon::MAXON_REGISTRY | ( | Class< UnitTestRef > | , |
LongRunTestClasses | , | ||
"net.maxon.registry.longruntestclasses" | |||
) |
maxon::MAXON_DECLARATION | ( | Class< UnitTestRef > | , |
UnitTestBaseClass | , | ||
"net.maxon.class.unittestbase" | , | ||
MAXON_IMPLEMENTATION_MODULE("net.maxon.misc") | |||
) |
ErrorPtr & PrivateGetRefMember | ( | ) |
const ErrorPtr & PrivateGetRefMember | ( | ) | const |
String ToString | ( | const FormatStatement * | formatStatement = nullptr | ) | const |
Returns a readable string of the content.
[in] | formatStatement | Nullptr or additional formatting instruction. Currently no additional formatting instructions are supported. |
String ToString | ( | const FormatStatement * | formatStatement = nullptr | ) | const |
Returns a string representation of this collection as a list of all contained elements.
[in] | formatStatement | Nullptr or additional formatting instruction. |
String ToString | ( | const FormatStatement * | formatStatement = nullptr | ) |
Iterates over this foreach iterator and returns a string with a list of all visited iteration values.
[in] | formatStatement | Nullptr or additional formatting instruction. |
|
static |
Returns a 128-bit hash value of the given block of bytes.
[in] | ptr | Pointer to the first byte. |
[in] | count | Number of bytes. |
|
static |
Returns a 128-bit hash value of the given block of bytes.
[in] | bytes | Byte block. |
UniqueHasher | ( | ) |
Mixes the contents of the given byte block into the hasher state.
[in] | ptr | Pointer to the first byte. |
[in] | count | Number of bytes. |
Mixes the contents of the given byte block into the hasher state.
[in] | bytes | A hash value. |
void Combine | ( | const UniqueHash & | value | ) |
Mixes the given UniqueHash into the hasher state.
[in] | value | A hash value. |
UniqueHash Finalize | ( | ) | const |
Computes a UniqueHash from the current state of this hasher. The hasher can still be used to hash further bytes afterwards, and Finalize() can be called multiple times.
operator UniqueHash | ( | ) | const |
struct maxon::SDFFilterSettings MAXON_ENUM_LIST |
Int alignment |
struct maxon::FieldSampleData MAXON_ENUM_FLAGS |
const maxon::EntityUse g_PrivateDependencyOnModule |
|
static |
|
static |
Constant for FloatToString. If passed to FloatToString the returned string will have as many digits as it is necessary to store the exact value (that later can be converted back to the exactly same floating point value).
|
static |
Constant for FloatToString. If passed to FloatToString the digits in front of the comma will be dynamically adjusted.
|
extern |
Defines mostly legacy behaviour.
|
extern |
determines, whether a debugging environment is present. Note that this value will be false if the debugger was attached to a process
|
extern |
determines, whether debug breaks will be executed. Note that g_isDebuggerPresent needs to be true, too in order to have an effect.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |