System

Detailed Description

Namespaces

 maxon::details
 
 maxon::LOGGERTYPEFLAGS
 
 maxon::LoggerTypes
 
 maxon::Loggers
 
 maxon::reflection
 
 maxon::Classes
 
 std
 

Classes

class  PrivateOverloadRank0
 
class  PrivateOverloadRank1
 
class  PrivateOverloadRank2
 
class  PrivateOverloadRank3
 
class  PrivateOverloadRank4
 
class  PrivateOverloadRank5
 
struct  AlwaysFalse< T >
 
struct  And<... >
 
struct  And< true, REST... >
 
struct  And< false, REST... >
 
struct  And<>
 
class  Protected< SUPER >
 
class  ConstIf< T, MAKECONST >
 
class  ConstIf< T, true >
 
class  InheritConst< T, INHERIT_FROM >
 
class  InheritConst< T, const INHERIT_FROM >
 
class  Substitute< T, R >
 
class  Substitute< T &, R >
 
class  Substitute< T &&, R >
 
struct  ParameterPack< T >
 
struct  ParameterPack< T, REST... >
 
class  CommonLValue< T, A, B >
 
class  CommonType< A, B >
 
struct  MemberDetectorHelper< U, U >
 
class  EnableIfFlag< T, FLAGS, A, B >
 
class  IsCompleteBase< T, Int, value >
 
class  IsComplete< T, COUNTER >
 
struct  GetReferencedType< T, DEF, typename >
 
struct  GetReferencedType< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::ReferencedType >::type >
 
struct  GetConstReferencedType< T, DEF, typename >
 
struct  GetConstReferencedType< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::ConstReferencedType >::type >
 
struct  GetDirectlyReferencedType< T, DEF, typename >
 
struct  GetDirectlyReferencedType< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::DirectlyReferencedType >::type >
 
struct  GetDirectlyReferencedTypeCheckConstAndPtr< REF >
 
struct  IsAllocType< T, DEF, typename >
 
struct  IsAllocType< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::IsAllocType >::type >
 
struct  IsNonvirtualInterfaceType< T, DEF, typename >
 
struct  IsNonvirtualInterfaceType< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::IsNonvirtualInterfaceType >::type >
 
struct  IsVirtualInterfaceType< T, DEF, typename >
 
struct  IsVirtualInterfaceType< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::ProxyComponent >::type >
 
struct  IsInterfaceType< T, DEF, typename >
 
struct  IsInterfaceType< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::MTable >::type >
 
struct  GetValueType< T, DEF, typename >
 
struct  GetValueType< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::ValueType >::type >
 
struct  CheckHasBase< T, DEF, typename >
 
struct  CheckHasBase< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::HasBase >::type >
 
struct  GetNonConst< T, DEF, typename >
 
struct  GetNonConst< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::NonConst >::type >
 
struct  GetHandler< T, DEF, typename >
 
struct  GetHandler< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::Handler >::type >
 
class  IsReferenceClass< T >
 
class  IsObjectReferenceClass< T >
 
struct  IsPartiallyOrdered< T, DEF, typename >
 
struct  IsPartiallyOrdered< T, DEF, typename maxon::SFINAEHelper< void, typename std::decay< T >::type::PartiallyOrdered >::type >
 
struct  IsTriviallyEquatable< T >
 
struct  IsZeroInitialized< T >
 
struct  IsZeroInitialized< Generic >
 
class  UnitType
 
class  GenericArithmetic
 
class  HasBase< D, B >
 
struct  IsDerived< BASE >
 
class  ByValueParam< T >
 
class  MultiplicativePromotion< T1, T2, Bool >
 
class  MultiplicativePromotion< T1, T2, false >
 
class  MultiplicativePromotion< GenericArithmetic, T, true >
 
class  MultiplicativePromotion< T, GenericArithmetic, true >
 
class  MultiplicativePromotion< GenericArithmetic, GenericArithmetic, true >
 
class  Dereference< T, ALSO_REFS >
 
class  BaseRef< T, HANDLER >
 
class  Dereference< BaseRef< T, HANDLER >, false >
 
class  Application
 
class  OutOfMemoryErrorInterface
 
class  FunctionNotImplementedErrorInterface
 
class  UnresolvedErrorInterface
 
class  UnsupportedOperationErrorInterface
 
class  ThreadCancelledErrorInterface
 
class  IllegalArgumentErrorInterface
 
class  UnsupportedArgumentErrorInterface
 
class  NullptrErrorInterface
 
class  IllegalStateErrorInterface
 
class  UnknownErrorInterface
 
class  ShutdownErrorInterface
 
class  UnexpectedErrorInterface
 
class  ErrnoErrorInterface
 
class  UnregisteredDataTypeErrorInterface
 
class  AggregatedErrorInterface
 
class  AggregatedError
 
class  ErrorIndirectRef
 
class  ErrorPtr
 
class  NoErrorPtr
 
class  PrivateDummyFree
 
struct  LoggerLine
 
class  LoggerTypeInterface
 
class  FileLoggerTypeInterface
 
class  UserLoggerTypeInterface
 
class  LoggerInterface
 
class  InternedId
 
struct  IsTriviallyEquatable< InternedId >
 
struct  IsZeroInitialized< InternedId >
 
class  InternedIdInitializer
 
class  InitializationFunctions
 
class  ComponentDescriptor
 
class  IsComplete< Class< T >, COUNTER >
 
class  ClassInterface
 
class  Object
 
class  BaseInterfaces< BASES >
 
struct  CastHelper< R, SRC, Bool >
 
struct  CastHelper< R, SRC, true >
 
class  ErrorInterface
 
class  Class< R >
 
class  ComponentRoot
 
class  AdapterRoot
 
class  ComponentHelper< BASE, INTERFACES >
 
struct  PrivateSelfHelperBase
 
struct  PrivateSelfHelper< BASE, typename >
 
class  ComponentHelper< BASE >
 
class  ComponentHelper< BASE, I, REST... >
 
struct  InterfacesBlock< INTERFACES >
 
class  ComponentWithBase< C, BASE, INTERFACE, INTERFACES >
 
class  Registry< T, R >
 
class  NonConstArray< TYPE >
 
class  StringPosition
 
class  StringEnd
 
class  StringCount
 
class  StringTemplate< INTERFACETYPE, REFTYPE, CHARTYPE >
 
class  SysCharArray
 
class  StringInterface
 
class  CStringInterface
 
class  String
 
class  CString
 
class  ToStringHelper2< T, INTERFACETYPE >
 
class  ToStringHelper2< T, false >
 
class  ToStringHelper2< T, true >
 
class  StringProxy
 
class  FormatStatement
 
class  Delegate< T >
 
class  System
 
class  SystemErrorInterface
 
class  NSSystemErrorInterface
 
class  UnicodeUtils
 
class  FormatTemplateHelper< ARGCNT, FORMATSTR >
 
class  FormatTemplateHelper< ARGCNT, const Char(&)[N]>
 
class  SourceLocation
 
class  RegularExpressionInterface
 
class  UnitTestErrorInterface
 
class  UnitTestInterface
 
class  UnitTestComponent< C, INTERFACES >
 

Macros

#define MAXON_CACHE_LINE_SIZE
 
#define MAXON_HAS_TRUE_TYPE(E)
 
#define OVERLOAD_MAX_RANK
 
#define MAXON_MEMBERFUNCTION_DETECTOR(Name)
 
#define MAXON_MEMBERTYPE_DETECTOR(Name, Member, Default)
 
#define PRIVATE_MAXON_DEFAULT_REFERENCE_CONSTRUCTORS(Cls, ...)
 
#define MAXON_DEFAULT_REFERENCE_CONSTRUCTORS(Cls, ...)
 
#define MAXON_UNIQUE_REFERENCE_CONSTRUCTORS(Cls, ...)
 
#define MAXON_DEPENDENCY_WEAK(header)
 
#define PRIVATE_MAXON_iferr_(ErrType, LINE, ...)
 
#define PRIVATE_MAXON_iferr(...)
 
#define PRIVATE_MAXON_ifnoerr(...)
 
#define iferr(...)
 
#define ifnoerr(...)
 
#define MAXON_ERROR_REGISTERX(error, baseclass, id)
 
#define MAXON_ERROR_IMPLEMENT_AND_REGISTER(error, baseclass)
 
#define MAXON_ERROR_PREALLOCATE(errorName, init)
 
#define CheckArgument(condition, ...)
 
#define CheckState(condition, ...)
 
#define CheckAssert(condition, ...)
 
#define MAXON_CHECK_CLASS(Name)
 
#define MAXON_METHOD
 
#define MAXON_FUNCTION
 
#define MAXON_REFERENCE_NONE(DUMMY)
 
#define PRIVATE_MAXON_REFERENCE_NONE_FLAGS
 
#define PRIVATE_MAXON_REFERENCE_NONE_COPY
 
#define PRIVATE_MAXON_REFERENCE_NONE_NONCONST
 
#define MAXON_REFERENCE_POINTER(DUMMY)
 
#define PRIVATE_MAXON_REFERENCE_POINTER_FLAGS
 
#define PRIVATE_MAXON_REFERENCE_POINTER_COPY
 
#define PRIVATE_MAXON_REFERENCE_POINTER_NONCONST
 
#define MAXON_REFERENCE_CONST_POINTER(DUMMY)
 
#define PRIVATE_MAXON_REFERENCE_CONST_POINTER_FLAGS
 
#define PRIVATE_MAXON_REFERENCE_CONST_POINTER_COPY
 
#define PRIVATE_MAXON_REFERENCE_CONST_POINTER_NONCONST
 
#define MAXON_REFERENCE_NORMAL(DUMMY)
 
#define PRIVATE_MAXON_REFERENCE_NORMAL_FLAGS
 
#define PRIVATE_MAXON_REFERENCE_NORMAL_COPY
 
#define PRIVATE_MAXON_REFERENCE_NORMAL_NONCONST
 
#define MAXON_REFERENCE_UNIQUE(DUMMY)
 
#define PRIVATE_MAXON_REFERENCE_UNIQUE_FLAGS
 
#define PRIVATE_MAXON_REFERENCE_UNIQUE_COPY
 
#define PRIVATE_MAXON_REFERENCE_UNIQUE_NONCONST
 
#define MAXON_REFERENCE_CONST(DUMMY)
 
#define PRIVATE_MAXON_REFERENCE_CONST_FLAGS
 
#define PRIVATE_MAXON_REFERENCE_CONST_COPY
 
#define PRIVATE_MAXON_REFERENCE_CONST_NONCONST
 
#define MAXON_REFERENCE_COPY_ON_WRITE(DUMMY)
 
#define PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_FLAGS
 
#define PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_COPY
 
#define PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_NONCONST
 
#define MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE(DUMMY)
 
#define PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_FLAGS
 
#define PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_COPY
 
#define PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_NONCONST
 
#define MAXON_ADD_TO_REFERENCE_CLASS(...)
 
#define MAXON_ADD_TO_COPY_ON_WRITE_REFERENCE_CLASS(...)
 
#define MAXON_ADD_TO_CONST_REFERENCE_CLASS(...)
 
#define MAXON_INTERFACE_NONVIRTUAL(Name, REFKIND, ID)
 
#define MAXON_INTERFACE_NONVIRTUAL_DERIVED(Name, REFKIND, ID)
 
#define _MAXON_IMPLEMENTATION_BASICS(C)
 
#define MAXON_IMPLEMENTATION_BASICS(C, I)
 
#define _MAXON_IMPLEMENTATION(C, cast)
 
#define MAXON_IMPLEMENTATION(C)
 
#define MAXON_IMPLEMENTATION_DERIVED(C, I)
 
#define COW_KIND_SFINAE
 
#define MAXON_IMPLEMENTATION_REGISTER(C, ...)
 
#define MAXON_INTERFACE_SIMPLE_VIRTUAL(Name, REFKIND)
 
#define MAXON_INTERFACE_SIMPLE_VIRTUAL_CONST_VTABLE_POINTER
 
#define MAXON_INTERFACE_DERIVED_SIMPLE_VIRTUAL(Name, REFKIND)
 
#define MAXON_IMPLEMENTATION_SIMPLE(C, ...)
 
#define MAXON_IMPLEMENTATION_REGISTER_SIMPLE(C, ...)
 
#define MAXON_INTERNED_ID(IID, NAME)
 
#define MAXON_LOCAL_INTERNED_ID(IID, NAME)
 
#define MAXON_DEPENDENCY_ON_MODULE(module)
 
#define MAXON_INITIALIZATION(...)
 
#define MAXON_DECLARATION(T, Name, id)
 
#define MAXON_DECLARATION_CLASS(T, Name, id)
 
#define PRIVATE_MAXON_DECLARATION(T, Name, id, getInstanceBody, 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(...)
 
#define PRIVATE_MAXON_DECLARATION_REGISTER_DECLARATION(Name, prefix, id)
 
#define MAXON_DEPENDENCY(Name)
 
#define MAXON_PREPROCESSOR_CONDITION(X)
 
#define MAXON_INTERFACE_BASES(...)
 
#define MAXON_INTERFACE_SINGLE_IMPLEMENTATION
 
#define MAXON_INTERFACE(Name, REFKIND, ID)
 
#define MAXON_COMPONENT(KIND, ...)
 
#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_HELPER(x, i, a)
 
#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, FLAGS, REGISTRY, ...)
 
#define PRIVATE_MAXON_CLASS_REGISTER(C, TEMPLATE, REGISTRY, TYPE, ...)
 
#define MAXON_COMPONENT_ONLY_REGISTER(C, ...)
 
#define MAXON_COMPONENT_ONLY_REGISTER_TEMPLATE(C, ...)
 
#define MAXON_COMPONENT_CLASS_REGISTER(C, ...)
 
#define MAXON_COMPONENT_CLASS_REGISTER_TEMPLATE(C, ...)
 
#define MAXON_COMPONENT_OBJECT_REGISTER(C, ...)
 
#define MAXON_COMPONENT_OBJECT_REGISTER_TEMPLATE(C, ...)
 
#define MAXON_STATIC_REGISTER(C, ...)
 
#define MAXON_FUNCTIONNAME
 
#define MAXON_REGISTRY(T, Name, id, ...)
 
#define PRIVATE_MAXON_REGISTRY_DEPENDENCY(x, i, a)
 
#define MAXON_REGISTRY_DEPENDENCIES(...)
 
#define CONSTSTRING(x)
 
#define CONSTCSTRING(x)
 
#define FormatString(...)
 
#define FormatCString(...)
 
#define MAXON_SWITCH_FALLTHROUGH
 
#define MAXON_DISALLOW_COPY_AND_ASSIGN(TypeName)
 
#define MAXON_OPERATOR_MOVE_ASSIGNMENT(TypeName)
 
#define MAXON_OPERATOR_COPY_ASSIGNMENT(TypeName)
 
#define MAXON_OPERATOR_INEQUALITY(TypeName)
 
#define MAXON_OPERATOR_COMPARISON(TypeName)
 
#define PRIVATE_MAXON_MOVE_MEMBERS(x, i, a)
 
#define MAXON_MOVE_MEMBERS(...)
 
#define PRIVATE_MAXON_COPY_MEMBERS(x, i, a)
 
#define MAXON_COPY_MEMBERS(...)
 
#define PRIVATE_MAXON_HASHCODE1(m1)
 
#define PRIVATE_MAXON_HASHCODE2(m1, m2)
 
#define PRIVATE_MAXON_HASHCODE3(m1, m2, m3)
 
#define PRIVATE_MAXON_HASHCODE4(m1, m2, m3, m4)
 
#define PRIVATE_MAXON_HASHCODE5(m1, m2, m3, m4, m5)
 
#define PRIVATE_MAXON_HASHCODE6(m1, m2, m3, m4, m5, m6)
 
#define PRIVATE_MAXON_HASHCODE7(m1, m2, m3, m4, m5, m6, m7)
 
#define PRIVATE_MAXON_HASHCODE8(m1, m2, m3, m4, m5, m6, m7, m8)
 
#define PRIVATE_MAXON_HASHCODE9(m1, m2, m3, m4, m5, m6, m7, m8, m9)
 
#define PRIVATE_MAXON_HASHCODE10(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10)
 
#define PRIVATE_MAXON_HASHCODE_C(count, ...)
 
#define PRIVATE_MAXON_HASHCODE_B(count, ...)
 
#define PRIVATE_MAXON_HASHCODE_A(count, ...)
 
#define MAXON_HASHCODE(...)
 
#define PRIVATE_MAXON_EQUALITY_OPERATORS(x, i, a)
 
#define MAXON_OPERATOR_EQUALITY(T, ...)
 
#define MAXON_OPERATOR_EQUALITY_HASHCODE(T, ...)
 
#define PRIVATE_MAXON_OPERATOR_STRUCT(x, i, a)
 
#define MAXON_OPERATOR_STRUCT(T, ...)
 
#define MAXON_NONCONST_COUNTERPART(...)
 
#define MAXON_DECLARE_CONDITIONAL_COPY_CONSTRUCTOR(cls, cond)
 
#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 MAXON_WARN_UNUSED
 
#define MAXON_WARN_UNUSED_CLASS
 
#define MAXON_WARN_MUTE_UNUSED
 
#define PRIVATE_MAXON_DEFAULT_CTOR
 
#define MAXON_OFFSETOF_NON_STANDARD_LAYOUT
 
#define PRIVATE_MAXON_ALLOC_TYPENAME
 
#define PRIVATE_MAXON_TEMPLATE_PREFIX
 
#define MAXON_WORKAROUND_CLANG_DELETED_FUNCTION(X)
 
#define PRIVATE_MAXON_PTR_COPY_CONSTRUCTOR
 
#define PRIVATE_MAXON_PTR_COPY_ASSIGNMENT
 
#define static_assert(cond, str)
 
#define noexcept
 
#define MAXON_ASSERT_STANDARD_LAYOUT(T)
 
#define MAXON_ASSERT_LEGAL_LAYOUT(T)
 
#define MAXON_ASSUME_ALIGNED(val, alignment)
 
#define MAXON_LIKELY(X)
 
#define MAXON_UNLIKELY(X)
 
#define MAXON_SAFE_PLACEMENT_NEW(PTR)
 
#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 DebugOutput(flags, formatString, ...)
 
#define DiagnosticOutput(formatString, ...)
 
#define OutputWithFlags(flags, formatString, ...)
 
#define WarningOutput(formatString, ...)
 
#define CriticalOutput(formatString, ...)
 
#define ApplicationOutput(formatString, ...)
 
#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(...)
 
#define CriticalStop(...)
 
#define DebugAssert(condition, ...)
 
#define CriticalAssert(condition, ...)
 
#define SizeAssert(type, s)
 
#define MAXON_SOURCE_LOCATION
 
#define MAXON_SOURCE_LOCATION_DECLARATION
 
#define MAXON_SOURCE_LOCATION_FORWARD
 
#define MAXON_SOURCE_LOCATION_NAME(x)
 

Typedefs

using OverloadRank0 = PrivateOverloadRank0 *
 
using OverloadRank1 = PrivateOverloadRank1 *
 
using OverloadRank2 = PrivateOverloadRank2 *
 
using OverloadRank3 = PrivateOverloadRank3 *
 
using OverloadRank4 = PrivateOverloadRank4 *
 
using OverloadRank5 = PrivateOverloadRank5 *
 
using OverloadRankMax = OverloadRank5
 
template<typename EXECUTION >
using ExecutionInterface = JobInterfaceTemplate< EXECUTION >
 
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)
 
using SystemFreeObject = void(*)(void *self)
 
using DestructorPointer = void(*)(void *)
 
template<typename... BASES>
using NonEmptyBases = typename maxon::details::NonEmptyBasesHelper< typename std::conditional< std::is_empty< BASES >::value, EmptyClass, BASES >::type... >::type
 
using TOSTR = void(*)(String &result, const void *ptr, const FormatStatement *formatStatement)
 

Enumerations

enum  SUBSYSTEM {
  UNDEFINED,
  CONSOLE,
  WINDOWS
}
 
enum  APPLICATION_URLTYPE {
  STARTUP_DIR,
  APPLICATION,
  APP_EXECUTABLE,
  CORELIBS_DIR,
  RESOURCE_DIR,
  TEMP_DIR,
  PREFS_DIR,
  GLOBALPREFS_DIR,
  DESKTOP_DIR,
  USER_HOME_DIR,
  USER_DOCUMENTS_DIR,
  SYSTEM_PROGRAMS_DIR,
  CURRENT_WORKING_DIR
}
 
enum  APPLICATIONTYPE {
  OTHER,
  CPYTHON,
  CPYTHON3
}
 
enum  APPLICATIONMODE {
  DONTWAIT,
  KEEPRUNNING,
  SHUTDOWN
}
 
enum  STRINGCONVERSION {
  NONE,
  ALLOW_MORE_CHARACTERS
}
 
enum  STRINGCOMPARISON {
  MEMORY,
  UNICODE_LETTERS,
  UNICODE_NUMBERS,
  CASEINSENSITIVE,
  CASEINSENSITIVE_NUMBERS
}
 
enum  NORMALIZATION {
  NFC,
  NFD,
  NKDC,
  NFKD,
  NFD_HFS
}
 
enum  TARGETAUDIENCE {
  DEBUGGER,
  DEVELOPERS,
  USERS,
  ALL
}
 
enum  WRITEMETA {
  DEFAULT,
  WARNING,
  CRITICAL,
  NONEWLINE,
  UI_SYNC_DRAW
}
 
enum  OUTPUT {
  DIAGNOSTIC,
  WARNING,
  CRITICAL,
  NOLINEBREAK,
  HEADER
}
 
enum  REGPARSEMODE {
  MATCH,
  CONTAINS,
  STARTS,
  ENDS
}
 

Functions

template<typename T >
std::enable_if<(sizeof(T) > 0), std::true_type >::type IsCompleteHelper (T *)
 
std::false_type IsCompleteHelper (...)
 
template<typename T >
const T & GetZeroRef ()
 
template<typename T >
const T & GetPtrSizedZeroRef ()
 
template<typename T >
NullValue ()
 
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::APPLICATIONTYPE MAXON_ENUM_LIST (APPLICATIONTYPE, "net.maxon.datatype.enum.applicationtype")
 
enum maxon::APPLICATIONMODE MAXON_ENUM_LIST (APPLICATIONMODE, "net.maxon.datatype.enum.applicationmode")
 
 MAXON_DECLARATION (Class< Error >, ErrorObjectClass, "net.maxon.class.errorobject")
 
 MAXON_DECLARATION (AggregatedError, AggregatedErrorObject, "net.maxon.object.aggregatederror")
 
MAXON_ATTRIBUTE_FORCE_INLINE void operator% (ErrorPtr &rv, ThreadReferencedError &err)
 
template<typename R >
Cast (ErrorPtr &ref)
 
template<typename ERRORTYPE >
Bool IsErrorOfType (const Error &err)
 
 MAXON_REGISTRY (JobRef, ExecutionJobs, "net.maxon.registry.executionjobs")
 
template<typename C >
NullValueDetector< C *, &C::NullValue >::type ImplementationCreateNullValue (OverloadRank3)
 
template<typename C >
std::enable_if< MAXON_IS_COW_KIND(C::PrivateInterface::Reference::Handler::KIND), C * >::type ImplementationCreateNullValue (OverloadRank2)
 
template<typename C >
SFINAEHelper< C *, typename C::PrivateInterface::Reference::Handler >::type ImplementationCreateNullValue (OverloadRank1)
 
template<typename C >
C * ImplementationCreateNullValue (OverloadRank0)
 
template<typename C >
NullValueDetector< C *, &C::NullValue >::type ImplementationDestroyNullValue (const C *, OverloadRank3)
 
template<typename C >
std::enable_if< MAXON_IS_COW_KIND(C::PrivateInterface::Reference::Handler::KIND), C * >::type ImplementationDestroyNullValue (const C *o, OverloadRank2)
 
template<typename C >
void ImplementationDestroyNullValue (const C *, OverloadRank0)
 
 MAXON_DECLARATION (Class< LoggerTypeRef >, LoggerTypeBaseClass, "net.maxon.class.loggertypebase")
 
 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 CastHelper<R, SRC>::AssertCastType>
RESULT AssertCast (SRC &&ref)
 
template<typename R , typename SRC , typename RESULT = typename CastHelper<R, SRC>::type>
RESULT Cast (SRC &&ref)
 
template<typename R , typename SRC >
SFINAEHelper< Result< R >, typename R::ReferencedType, typename SRC::ReferencedType >::type Cast (Result< SRC > &&src)
 
 MAXON_REGISTRY (GenericClass, Classes, "net.maxon.registry.classes")
 
 MAXON_REGISTRY (ClassTransformer, ClassTransformers, "net.maxon.registry.classtransformers")
 
Id GetFunctionName (const Char *funcName)
 
const StringDecodingRef & GetUtf8DefaultDecoder ()
 
const StringEncodingRef & GetUtf8DefaultEncoder ()
 
enum maxon::STRINGCONVERSION MAXON_ENUM_FLAGS (STRINGCONVERSION)
 
enum maxon::STRINGCOMPARISON MAXON_ENUM_LIST (STRINGCOMPARISON)
 
const CStringoperator"" _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)
 
Stringoperator+= (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(nullptr)) 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_enum< T >::value, String >::type ToString (const T &object, const FormatStatement *formatStatement, Bool checkDataType=true)
 
template<typename T >
std::enable_if<!std::is_function< T >::value, String >::type ToString (const T *object, const FormatStatement *formatStatement)
 
const StringToString (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 ToString (const DataType *type, const FormatStatement *formatStatement, Bool checkDataType=false)
 
String ExtractString (StringProxy *proxy)
 
const StringExtractString (const String &str)
 
const CharExtractString (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_INLINEForwardString (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)
 
 MAXON_MEMBERFUNCTION_DETECTOR (GetReferenceCounter)
 
enum maxon::NORMALIZATION MAXON_ENUM_LIST (NORMALIZATION)
 
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 ()
 
StringProxyFormat (const String &formatString, Int argsCnt, const void **args, TOSTR *argFuncs)
 
StringProxyFormat (const Char *formatString, Int argsCnt, const void **args, TOSTR *argFuncs)
 
template<Int ARGCNT, typename FORMATSTR , typename... ARGS>
StringProxyFormatTemplateX (FORMATSTR formatString, const ARGS &... args)
 
template<Int ARGCNT, typename FORMATSTR >
FORMATSTR FormatTemplateX (FORMATSTR formatString)
 
constexpr Int GetArgCnt (const Char *const formatStr)
 
template<typename T >
static MAXON_ATTRIBUTE_FORCE_INLINE const CharPrivateGetClassName ()
 
enum maxon::REGPARSEMODE MAXON_ENUM_LIST (REGPARSEMODE)
 
 MAXON_REGISTRY (Class< UnitTestRef >, UnitTestClasses, "net.maxon.registry.unittestclasses")
 
 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")
 
ErrorPtrPrivateGetRefMember ()
 
const ErrorPtrPrivateGetRefMember () const
 
template<typename REFCLASS >
Result< typename maxon::details::ClassCreateType< REFCLASS >::type > Create () const
 
String ToString (const FormatStatement *formatStatement) const
 
String ToString (const FormatStatement *formatStatement) const
 
String ToString (const FormatStatement *formatStatement)
 

Variables

struct maxon::ABIParamType MAXON_ENUM_LIST
 
Int alignment
 
const void * g_zeroMemory
 
static const void *const g_zeroPtr
 
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
 
maxon::UnitTestErrorInterface MAXON_ENUM_LIST_CLASS
 
static const InterfaceReference *const value [sizeof...(INTERFACES)]
 

Macro Definition Documentation

◆ MAXON_CACHE_LINE_SIZE

#define MAXON_CACHE_LINE_SIZE

◆ MAXON_HAS_TRUE_TYPE

#define MAXON_HAS_TRUE_TYPE (   E)

◆ OVERLOAD_MAX_RANK

#define OVERLOAD_MAX_RANK

Use this as argument for the overload selection parameter of a set of overloaded functions, see OverloadRank0.

◆ MAXON_MEMBERFUNCTION_DETECTOR

#define MAXON_MEMBERFUNCTION_DETECTOR (   Name)

◆ MAXON_MEMBERTYPE_DETECTOR

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

MAXON_MEMBERTYPE_DETECTOR(GetReferencedType, ReferencedType, std::false_type);
MAXON_MEMBERTYPE_DETECTOR(GetValueType, ValueType, void);

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.

◆ PRIVATE_MAXON_DEFAULT_REFERENCE_CONSTRUCTORS

#define PRIVATE_MAXON_DEFAULT_REFERENCE_CONSTRUCTORS (   Cls,
  ... 
)

◆ MAXON_DEFAULT_REFERENCE_CONSTRUCTORS

#define MAXON_DEFAULT_REFERENCE_CONSTRUCTORS (   Cls,
  ... 
)

◆ MAXON_UNIQUE_REFERENCE_CONSTRUCTORS

#define MAXON_UNIQUE_REFERENCE_CONSTRUCTORS (   Cls,
  ... 
)

◆ MAXON_DEPENDENCY_WEAK

#define MAXON_DEPENDENCY_WEAK (   header)

This macro specifies that the entities included from the given header file shall be considered as optional for the current translation unit. This means that they need not be available in order for the current translation unit to work, so that the current translation unit can be initialized even if some of the entities from the included header file could not be resolved or initialized. You have to make sure in your own code to check if the optional entities are actually available when you need them. Example:

#include "maxon/llvm.h"
MAXON_DEPENDENCY_WEAK("maxon/llvm.h");
...
if (LlvmModuleInterface::_interface.IsInitialized())
{
... LlvmModuleInterface can be used, do something with it ...
}
Parameters
[in]headerThe header file whose declared entities shall be considered as optional for the current translation unit. This has to be the file name, prefixed by its namespace directories such as "maxon/llvm.h".

◆ PRIVATE_MAXON_iferr_

#define PRIVATE_MAXON_iferr_ (   ErrType,
  LINE,
  ... 
)

◆ PRIVATE_MAXON_iferr

#define PRIVATE_MAXON_iferr (   ...)

◆ PRIVATE_MAXON_ifnoerr

#define PRIVATE_MAXON_ifnoerr (   ...)

◆ iferr

#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):
    Result<Int> Func();
    iferr (Func())
    return err;
    Int res;
    iferr (res = Func())
    return err;
    iferr (Int res = Func())
    return err;
    // res available here
  • Pointer-valued expressions set the 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
    iferr (AutoMem<Char> data = NewMem(Char, size))
    return err;
    // data available here
  • If the expression returns a reference class, it behaves in a similar way as for a pointer-valued expression.
  • Finally, if the expression returns a ResultMem, the err variable is set to an OutOfMemoryError if the ResultMem is false. This only works for the simple case (with no additional result assignment):
    iferr (array.Resize(size))
    return err;

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.

Parameters
[in]...Expression which shall be checked for an error condition.
See also
error_handling_iferr

◆ ifnoerr

#define ifnoerr (   ...)

The opposite of iferr.

◆ MAXON_ERROR_REGISTERX

#define MAXON_ERROR_REGISTERX (   error,
  baseclass,
  id 
)

This macro simplifies the registration of an error implementation together with its published error object. It assumes that, for an error XyzError, you have a component implementation class XyzErrorImpl.

Example:

class ErrnoErrorImpl : public Component<ErrnoErrorImpl, ErrnoErrorInterface>
{
...
};
MAXON_ERROR_REGISTER(ErrnoError, ErrorObjectClass, "net.maxon.error.ErrnoError");
Parameters
[in]errorName of the error reference class such as OutOfMemoryError. The component implementation class has to use this name with an Impl suffix.
[in]baseclassAn expression returning the base object class (e.g., ErrorObjectClass). This should be an implementation of the base interfaces of the error interface.
[in]idThe unique identifier for the error class and its component.

◆ MAXON_ERROR_IMPLEMENT_AND_REGISTER

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

MAXON_ERROR_IMPLEMENT_AND_REGISTER(OutOfMemoryError, ErrorObjectClass);
Parameters
[in]errorName of the error reference class such as OutOfMemoryError.
[in]baseclassAn expression returning the base object class (e.g., ErrorObjectClass). This should be an implementation of the base interfaces of the error interface.

◆ MAXON_ERROR_PREALLOCATE

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

MAXON_ERROR_PREALLOCATE(g_myIllegalArgumentError, []() { return IllegalArgumentError(MAXON_SOURCE_LOCATION); });
Parameters
[in]errorNameThe name of a globally visible ThreadReferencedError variable which is to be preallocated.
[in]initA lambda or function which returns a preallocated Error.

◆ CheckArgument

#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 in addition to the verbatim condition. The message may use formatting like FormatString.

Examples:

// on error, the message is "Illegal argument: Condition (UInt) index < (UInt) _count not fulfilled."
CheckArgument((UInt) index < (UInt) _count);
// on error, the message is "Illegal argument: Condition frameRate >= 1.0 not fulfilled. Framerate too low."
CheckArgument(frameRate >= 1.0, "Framerate too low.");
// on error, the message is "Illegal argument: Condition !name.FindLast('/', nullptr) not fulfilled. Name my/file.txt contains forward slash."
CheckArgument(!name.FindLast('/', nullptr), "Name @ contains forward slash.", name);
Parameters
[in]conditionThe condition to evaluate. If it evaluates to false, an IllegalArgumentError will be returned.
[in]...Additional message and parameters, will be formatted by FormatString.
See also
CheckState
CheckAssert

◆ CheckState

#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 in addition to the verbatim condition. The message may use formatting like FormatString.

For examples, see CheckArgument.

Parameters
[in]conditionThe condition to evaluate. If it evaluates to false, an IllegalStateError will be returned.
[in]...Additional message and parameters, will be formatted by FormatString.
See also
CheckArgument
CheckAssert

◆ CheckAssert

#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 in addition to the verbatim condition. The message may use formatting like FormatString.

For examples, see CheckArgument.

Parameters
[in]conditionThe condition to evaluate. If it evaluates to false, an UnexpectedError will be returned.
[in]...Additional message and parameters, will be formatted by FormatString.
See also
CheckArgument
CheckState

◆ MAXON_CHECK_CLASS

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

Parameters
[in]NameUnqualified name of the class.

◆ MAXON_METHOD

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

MAXON_METHOD Int GetLength() const;
See also
MAXON_INTERFACE_NONVIRTUAL
MAXON_INTERFACE_SIMPLE_VIRTUAL
MAXON_INTERFACE

◆ MAXON_FUNCTION

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

MAXON_METHOD const MyElement& GetElement() const;
MAXON_FUNCTION MyElement& GetElement() { return MAXON_NONCONST_COUNTERPART(GetElement()); }
See also
MAXON_INTERFACE_NONVIRTUAL
MAXON_INTERFACE_SIMPLE_VIRTUAL
MAXON_INTERFACE

◆ MAXON_REFERENCE_NONE

#define MAXON_REFERENCE_NONE (   DUMMY)

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 don't have any non-static methods, or 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.

See also
MAXON_INTERFACE_NONVIRTUAL

◆ PRIVATE_MAXON_REFERENCE_NONE_FLAGS

#define PRIVATE_MAXON_REFERENCE_NONE_FLAGS

◆ PRIVATE_MAXON_REFERENCE_NONE_COPY

#define PRIVATE_MAXON_REFERENCE_NONE_COPY

◆ PRIVATE_MAXON_REFERENCE_NONE_NONCONST

#define PRIVATE_MAXON_REFERENCE_NONE_NONCONST

◆ MAXON_REFERENCE_POINTER

#define MAXON_REFERENCE_POINTER (   DUMMY)

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.

See also
MAXON_INTERFACE_NONVIRTUAL

◆ PRIVATE_MAXON_REFERENCE_POINTER_FLAGS

#define PRIVATE_MAXON_REFERENCE_POINTER_FLAGS

◆ PRIVATE_MAXON_REFERENCE_POINTER_COPY

#define PRIVATE_MAXON_REFERENCE_POINTER_COPY

◆ PRIVATE_MAXON_REFERENCE_POINTER_NONCONST

#define PRIVATE_MAXON_REFERENCE_POINTER_NONCONST

◆ MAXON_REFERENCE_CONST_POINTER

#define MAXON_REFERENCE_CONST_POINTER (   DUMMY)

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.

See also
MAXON_INTERFACE_NONVIRTUAL

◆ PRIVATE_MAXON_REFERENCE_CONST_POINTER_FLAGS

#define PRIVATE_MAXON_REFERENCE_CONST_POINTER_FLAGS

◆ PRIVATE_MAXON_REFERENCE_CONST_POINTER_COPY

#define PRIVATE_MAXON_REFERENCE_CONST_POINTER_COPY

◆ PRIVATE_MAXON_REFERENCE_CONST_POINTER_NONCONST

#define PRIVATE_MAXON_REFERENCE_CONST_POINTER_NONCONST

◆ MAXON_REFERENCE_NORMAL

#define MAXON_REFERENCE_NORMAL (   DUMMY)

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

See also
MAXON_INTERFACE_NONVIRTUAL
MAXON_INTERFACE

◆ PRIVATE_MAXON_REFERENCE_NORMAL_FLAGS

#define PRIVATE_MAXON_REFERENCE_NORMAL_FLAGS

◆ PRIVATE_MAXON_REFERENCE_NORMAL_COPY

#define PRIVATE_MAXON_REFERENCE_NORMAL_COPY

◆ PRIVATE_MAXON_REFERENCE_NORMAL_NONCONST

#define PRIVATE_MAXON_REFERENCE_NORMAL_NONCONST

◆ MAXON_REFERENCE_UNIQUE

#define MAXON_REFERENCE_UNIQUE (   DUMMY)

This reference type is similar to MAXON_REFERENCE_NORMAL, with the difference that references can only be moved and not copied. Note that while semantically this is equivalent to a UniqueRef, internally the object still uses the reference-counted implementation, with copying disabled. Hence, conversions from/to UniqueRef are not possible.

See also
MAXON_INTERFACE_NONVIRTUAL
MAXON_INTERFACE

◆ PRIVATE_MAXON_REFERENCE_UNIQUE_FLAGS

#define PRIVATE_MAXON_REFERENCE_UNIQUE_FLAGS

◆ PRIVATE_MAXON_REFERENCE_UNIQUE_COPY

#define PRIVATE_MAXON_REFERENCE_UNIQUE_COPY

◆ PRIVATE_MAXON_REFERENCE_UNIQUE_NONCONST

#define PRIVATE_MAXON_REFERENCE_UNIQUE_NONCONST

◆ MAXON_REFERENCE_CONST

#define MAXON_REFERENCE_CONST (   DUMMY)

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

See also
MAXON_INTERFACE_NONVIRTUAL
MAXON_INTERFACE

◆ PRIVATE_MAXON_REFERENCE_CONST_FLAGS

#define PRIVATE_MAXON_REFERENCE_CONST_FLAGS

◆ PRIVATE_MAXON_REFERENCE_CONST_COPY

#define PRIVATE_MAXON_REFERENCE_CONST_COPY

◆ PRIVATE_MAXON_REFERENCE_CONST_NONCONST

#define PRIVATE_MAXON_REFERENCE_CONST_NONCONST

◆ MAXON_REFERENCE_COPY_ON_WRITE

#define MAXON_REFERENCE_COPY_ON_WRITE (   DUMMY)

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

See also
MAXON_INTERFACE_NONVIRTUAL
MAXON_INTERFACE

◆ PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_FLAGS

#define PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_FLAGS

◆ PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_COPY

#define PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_COPY

◆ PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_NONCONST

#define PRIVATE_MAXON_REFERENCE_COPY_ON_WRITE_NONCONST

◆ MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE

#define MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE (   DUMMY)

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

See also
MAXON_INTERFACE_NONVIRTUAL
MAXON_INTERFACE

◆ PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_FLAGS

#define PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_FLAGS

◆ PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_COPY

#define PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_COPY

◆ PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_NONCONST

#define PRIVATE_MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE_NONCONST

◆ MAXON_ADD_TO_REFERENCE_CLASS

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

class DataFormatBaseReaderInterface : MAXON_INTERFACE_BASES(DataDictionaryObjectInterface)
{
MAXON_INTERFACE(DataFormatBaseReaderInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.dataformatbasereader");
public:
MAXON_METHOD Result<void> CloseInput();
Result<void> ResetMaybeCloseInput()
{
Result<void> res = OK;
if (this->GetPointer())
{
if (System::GetReferenceCounter(this->GetPointer()) == 1)
res = this->GetPointer()->CloseInput();
this->ResetPointer();
}
return res;
}
);
...
};
Parameters
[in]...Code which shall be added to the generated reference class.
See also
MAXON_ADD_TO_CONST_REFERENCE_CLASS
MAXON_ADD_TO_COPY_ON_WRITE_REFERENCE_CLASS

◆ MAXON_ADD_TO_COPY_ON_WRITE_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.

Parameters
[in]...Code which shall be added to the generated reference class.
See also
MAXON_ADD_TO_REFERENCE_CLASS
MAXON_ADD_TO_CONST_REFERENCE_CLASS

◆ MAXON_ADD_TO_CONST_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.

Parameters
[in]...Code which shall be added to the generated reference class.
See also
MAXON_ADD_TO_REFERENCE_CLASS
MAXON_ADD_TO_COPY_ON_WRITE_REFERENCE_CLASS

◆ MAXON_INTERFACE_NONVIRTUAL

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

class Application
{
MAXON_INTERFACE_NONVIRTUAL(Application, MAXON_REFERENCE_NONE, "net.maxon.interface.application");
public:
static MAXON_METHOD Result<Url> GetUrl(APPLICATION_URLTYPE urlType);
...
};

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.

Parameters
[in]NameName of the interface (has to be the same as the surrounding class name).
[in]REFKINDOne 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]IDThe unique identifier of the interface.
See also
nvinterfaces
MAXON_METHOD
MAXON_FUNCTION
MAXON_INTERFACE_NONVIRTUAL_DERIVED
MAXON_INTERFACE
Note
It is recommended to use virtual interfaces (MAXON_INTERFACE) instead of non-virtual ones unless the interface consists only of static methods.
The macro itself leaves incomplete code which is completed by the source processor. So you have to place the macro in a header file, because the source processor only scans header files, and you have to include the generated hxx files in the header file. MAXON_INTERFACE_NONVIRTUAL must be placed somewhere before the #include of the first hxx file.

◆ MAXON_INTERFACE_NONVIRTUAL_DERIVED

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

class MacroPortInterface : public AttributedObjectInterface
{
MAXON_INTERFACE_NONVIRTUAL_DERIVED(MacroPortInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.macroport");
...
};

Derived non-virtual interfaces have to be implemented by another class using MAXON_IMPLEMENTATION_DERIVED.

Parameters
[in]NameName of the interface (has to be the same as the surrounding class name).
[in]REFKINDOne 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]IDThe unique identifier of the interface.
See also
nvinterfaces
MAXON_INTERFACE_NONVIRTUAL
Warning
As one can act (through an upcasted pointer to the base interface) on the implementation of the derived interface as if it was the implementation of the base interface, the implementation of the derived interface should derive from the implementation of the base interface (at least both have to be compatible).

◆ _MAXON_IMPLEMENTATION_BASICS

#define _MAXON_IMPLEMENTATION_BASICS (   C)

◆ MAXON_IMPLEMENTATION_BASICS

#define MAXON_IMPLEMENTATION_BASICS (   C,
 
)

◆ _MAXON_IMPLEMENTATION

#define _MAXON_IMPLEMENTATION (   C,
  cast 
)

◆ MAXON_IMPLEMENTATION

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

class XStringImpl : private StringInterface
{
MAXON_IMPLEMENTATION(XStringImpl);
public:
XStringImpl() { }
XStringImpl(const XStringImpl& str) { Insert(0, &str); }
Int GetLength() const { return _txt.GetCount(); }
...
};

Don't forget to add MAXON_IMPLEMENTATION_REGISTER below the implementation class.

Parameters
[in]CName of the implementation class (has to be the same as the surrounding class name).
See also
nvinterfaces

◆ MAXON_IMPLEMENTATION_DERIVED

#define MAXON_IMPLEMENTATION_DERIVED (   C,
 
)

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

class Port : public AttributedObject
{
MAXON_IMPLEMENTATION_DERIVED(Port, MacroPortInterface);
public:
...
};

Don't forget to add MAXON_IMPLEMENTATION_REGISTER below the implementation class.

Parameters
[in]CName of the implementation class (has to be the same as the surrounding class name).
[in]IName of the derived interface which C implements.
See also
nvinterfaces

◆ COW_KIND_SFINAE

#define COW_KIND_SFINAE

◆ MAXON_IMPLEMENTATION_REGISTER

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

Parameters
[in]CName of the implementation class.
[in]...Additional flags for the NonvirtualInterfaceImplementation such as EntityBase::FLAGS::EXPLICIT.
See also
nvinterfaces

◆ MAXON_INTERFACE_SIMPLE_VIRTUAL

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

class SimpleInterface
{
public:
MAXON_METHOD void DoSomething(Int index);
};

You can derive from simple virtual interfaces using MAXON_INTERFACE_DERIVED_SIMPLE_VIRTUAL.

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_REGISTER_SIMPLE behind the class declaration to construct the vtable:

class SimpleImpl : private SimpleInterface
{
public:
SimpleImpl() : SimpleInterface(_clsMTable) { }
void DoSomething(Int index) { }
};

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

template <typename ARRAY> MAXON_IMPLEMENTATION_REGISTER_SIMPLE(ArrayImpl<ARRAY>);

Simple virtual interfaces can't have static methods, but they may have static functions (marked with MAXON_FUNCTION).

Parameters
[in]NameName of the interface (has to be the same as the surrounding class name).
[in]REFKINDOne 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.
See also
svinterfaces
MAXON_METHOD
MAXON_FUNCTION
MAXON_INTERFACE_DERIVED_SIMPLE_VIRTUAL
MAXON_IMPLEMENTATION_SIMPLE
MAXON_IMPLEMENTATION_REGISTER_SIMPLE
MAXON_INTERFACE
Note
The macro itself leaves incomplete code which is completed by the source processor. So you have to place the macro in a header file, because the source processor only scans header files, and you have to include the generated hxx files in the header file. MAXON_INTERFACE_SIMPLE_VIRTUAL must be placed somewhere before the #include of the first hxx file.

◆ MAXON_INTERFACE_SIMPLE_VIRTUAL_CONST_VTABLE_POINTER

#define MAXON_INTERFACE_SIMPLE_VIRTUAL_CONST_VTABLE_POINTER

◆ MAXON_INTERFACE_DERIVED_SIMPLE_VIRTUAL

#define MAXON_INTERFACE_DERIVED_SIMPLE_VIRTUAL (   Name,
  REFKIND 
)

MAXON_INTERFACE_DERIVED_SIMPLE_VIRTUAL 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_DERIVED_SIMPLE_VIRTUAL). 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:

class DerivedSimpleInterface : private SimpleInterface
{
public:
MAXON_METHOD void DoSomethingElse();
};

The implementation of a derived simple virtual interface is the same as for a non-derived simple virtual interface.

Parameters
[in]NameName of the interface (has to be the same as the surrounding class name).
[in]REFKINDOne 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.
See also
svinterfaces
MAXON_INTERFACE_SIMPLE_VIRTUAL

◆ MAXON_IMPLEMENTATION_SIMPLE

#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_REGISTER_SIMPLE below the implementation class.

Parameters
[in]CName of the implementation class (has to be the same as the surrounding class name).
See also
svinterfaces
MAXON_INTERFACE_SIMPLE_VIRTUAL

◆ MAXON_IMPLEMENTATION_REGISTER_SIMPLE

#define MAXON_IMPLEMENTATION_REGISTER_SIMPLE (   C,
  ... 
)

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

Parameters
[in]CName of the implementation class.
See also
svinterfaces

◆ MAXON_INTERNED_ID

#define MAXON_INTERNED_ID (   IID,
  NAME 
)

MAXON_INTERNED_ID is used in a header file to define a global interned id as in

MAXON_INTERNED_ID("net.maxon.xyz", xyz);

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.

Parameters
[in]IIDC-string to use for the id.
[in]NAMEName of the global InternedId object to declare.
See also
MAXON_LOCAL_INTERNED_ID

◆ MAXON_LOCAL_INTERNED_ID

#define MAXON_LOCAL_INTERNED_ID (   IID,
  NAME 
)

MAXON_LOCAL_INTERNED_ID is used in a cpp file to define an InternedId as in

MAXON_LOCAL_INTERNED_ID("net.maxon.xyz", xyz);

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.

Parameters
[in]IIDC-string to use for the id.
[in]NAMEName of the InternedId object to declare.
See also
MAXON_INTERNED_ID
Note
The same NAME must not be used within more then one cpp file of a binary.

◆ MAXON_DEPENDENCY_ON_MODULE

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

Parameters
[in]moduleModule on which the current module unit shall depend.
See also
manual_dep

◆ MAXON_INITIALIZATION

#define MAXON_INITIALIZATION (   ...)

◆ MAXON_DECLARATION

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

  • General objects are defined by MAXON_DECLARATION_REGISTER.
    // header file
    MAXON_DECLARATION(Dimension, Length, "net.maxon.dimension.length");
    // source file defining the object
    {
    return g_baseDimensions[Int(BASE_DIMENSION::LENGTH)];
    }
    // source file using the component
    const Dimension& len = Dimensions::Length();
  • Classes can be defined as above, but typically they are defined by MAXON_COMPONENT_CLASS_REGISTER.
    // header file
    MAXON_DECLARATION(Class<InputStreamRef>, InputStreamBaseClass, "net.maxon.class.inputstreambase");
    // source file defining the class (it has to define the C++ class IoBaseInputStreamImpl)
    MAXON_COMPONENT_CLASS_REGISTER(IoBaseInputStreamImpl, InputStreamBaseClass);
    // source file using the class
    const Class<InputStreamRef>& cls = InputStreamBaseClass();
  • Component descriptors are defined by MAXON_COMPONENT_ONLY_REGISTER:
    // header file
    MAXON_DECLARATION(ComponentDescriptor, RPCComponent, "net.maxon.rpc.component.rpc");
    // source file defining the component
    MAXON_COMPONENT_ONLY_REGISTER(RPCComponentImpl, RPCComponent);
    // source file using the component
    const ComponentDescriptor& desc = RPCComponent();

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.

Parameters
[in]TypeType of the object. This can be any type which is supported by Data, or ComponentDescriptor for published components.
[in]NameName of the object within the current namespace.
[in]idUnique identifier of the object.
See also
object_declaration
Note
This macro can only be used at namespace scope. For a class scope, you have to use MAXON_DECLARATION_CLASS.

◆ MAXON_DECLARATION_CLASS

#define MAXON_DECLARATION_CLASS (   T,
  Name,
  id 
)

MAXON_DECLARATION_CLASS has to be used instead of MAXON_DECLARATION if the declaration shall happen at class scope instead of namespace scope. Other than that, both macros do the same.

◆ PRIVATE_MAXON_DECLARATION

#define PRIVATE_MAXON_DECLARATION (   T,
  Name,
  id,
  getInstanceBody,
  storage 
)

◆ PRIVATE_MAXON_DECLARATION_REGISTER_1

#define PRIVATE_MAXON_DECLARATION_REGISTER_1 (   cnt,
  Name 
)

◆ PRIVATE_MAXON_DECLARATION_REGISTER_2

#define PRIVATE_MAXON_DECLARATION_REGISTER_2 (   cnt,
  REGISTRY,
  Name 
)

◆ PRIVATE_MAXON_DECLARATION_REGISTER_A

#define PRIVATE_MAXON_DECLARATION_REGISTER_A (   N,
  CNT,
  ... 
)

◆ PRIVATE_MAXON_DECLARATION_REGISTER_B

#define PRIVATE_MAXON_DECLARATION_REGISTER_B (   N,
  CNT,
  ... 
)

◆ PRIVATE_MAXON_DECLARATION_REGISTER_C

#define PRIVATE_MAXON_DECLARATION_REGISTER_C (   N,
  CNT,
  ... 
)

◆ MAXON_DECLARATION_REGISTER

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

  • You can use the name of a MAXON_DECLARATION from a header file if you want to define its value:
    MAXON_DECLARATION_REGISTER(Dimensions::Length)
    If the MAXON_DECLARATION is within a registry namespace, the object will also be added to the corresponding registry.
  • You can specify the name of a registry and a unique identifier. In this case the object will be added to the registry:
    MAXON_DECLARATION_REGISTER(ExecutionJobs, "net.maxon.execution.unittests")
  • You can register the object using a unique identifier, but this is rarely used:
    MAXON_DECLARATION_REGISTER("com.foo.myobject") Example: See MAXON_DECLARATION for a complete example showing also the header file part.
    Parameters
    [in]...Here you have to specify either one or two arguments:
    • If you use a single argument, this has to be the name of the MAXON_DECLARATION which shall be defined, or a unique identifier to use for the registration,
    • If you use two arguments, the first has to name a registry and the second the identifier to use for the registration. The object will then be added to the registry.
    See also
    object_definition

◆ PRIVATE_MAXON_DECLARATION_REGISTER_DECLARATION

#define PRIVATE_MAXON_DECLARATION_REGISTER_DECLARATION (   Name,
  prefix,
  id 
)

◆ MAXON_DEPENDENCY

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

Parameters
[in]NameName of the dependency.
See also
MAXON_DEPENDENCY_REGISTER
manual_dep

◆ MAXON_PREPROCESSOR_CONDITION

#define MAXON_PREPROCESSOR_CONDITION (   X)

Use MAXON_PREPROCESSOR_CONDITION(X) in a header file to tell the source processor that the corresponding includes in register.cpp shall be enclosed by #if X ... #endif. You have to use this for system specific header files. Example:

MAXON_PREPROCESSOR_CONDITION(defined(MAXON_TARGET_IOS) || defined(MAXON_TARGET_MACOS));

◆ MAXON_INTERFACE_BASES

#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, Object has to be used.

class IoHandlerInterface : MAXON_INTERFACE_BASES(Object)
{
MAXON_INTERFACE(IoHandlerInterface, MAXON_REFERENCE_CONST, "net.maxon.interface.iohandler");
...
};
class InputStreamInterface : MAXON_INTERFACE_BASES(BaseStreamInterface)
{
MAXON_INTERFACE(InputStreamInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.inputstream");
...
};
See also
MAXON_INTERFACE

◆ MAXON_INTERFACE_SINGLE_IMPLEMENTATION

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

class DimensionInterface : MAXON_INTERFACE_BASES(Object)
{
MAXON_INTERFACE(DimensionInterface, MAXON_REFERENCE_CONST, "net.maxon.interface.dimension");
...
};

At runtime it is an error if there is not exactly one registered component which implements the interface.

See also
MAXON_INTERFACE

◆ MAXON_INTERFACE

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

class InputStreamInterface : MAXON_INTERFACE_BASES(BaseStreamInterface)
{
MAXON_INTERFACE(InputStreamInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.inputstream");
public:
MAXON_METHOD Result<Int> ReadEOS(const Block<Byte>& data);
...
};

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.

Parameters
[in]NameName of the interface (has to be the same as the surrounding class name).
[in]REFKINDOne of MAXON_REFERENCE_NORMAL, MAXON_REFERENCE_CONST, MAXON_REFERENCE_COPY_ON_WRITE, MAXON_REFERENCE_ALWAYS_COPY_ON_WRITE.
[in]IDThe unique identifier of the interface.
See also
vinterfaces
MAXON_COMPONENT
MAXON_METHOD
MAXON_FUNCTION
MAXON_INTERFACE_SINGLE_IMPLEMENTATION
MAXON_INTERFACE_NONVIRTUAL
Note
The base class of a virtual interface in the sense of C++ will always be Object. Thus, the interface hierarchy isn't reflected by the C++ class hierarchy. But it is taken into account by the Ptr, ConstPtr and reference classes of virtual interfaces.
The macro itself leaves incomplete code which is completed by the source processor. So you have to place the macro in a header file, because the source processor only scans header files, and you have to include the generated hxx files in the header file. MAXON_INTERFACE must be placed somewhere before the #include of the first hxx file.

◆ MAXON_COMPONENT

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

class IoFileOutputStream : public Component<IoFileOutputStream, OutputStreamInterface>
{
MAXON_COMPONENT(NORMAL, OutputStreamBaseClass);
public:
MAXON_METHOD Result<void> Write(const Block<const Byte>& data)
{
...
}
...
};
MAXON_COMPONENT_CLASS_REGISTER(IoFileOutputStream, "net.maxon.class.iofileoutputstream");

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

  • NORMAL: The normal case. If you don't need to specify base components, you can simply omit this and just write MAXON_COMPONENT().
  • ABSTRACT: The class defined by MAXON_COMPONENT_CLASS_REGISTER will be an abstract class. Doesn't make sense in combination with MAXON_COMPONENT_ONLY_REGISTER or MAXON_COMPONENT_OBJECT_REGISTER.
  • SINGLETON: The class defined by MAXON_COMPONENT_CLASS_REGISTER or MAXON_COMPONENT_OBJECT_REGISTER will be a singleton class. Doesn't make sense in combination with MAXON_COMPONENT_ONLY_REGISTER.
  • FINAL: The component will be marked as final. This means that it is not allowed to add further components to an object class after this component. So you can be sure that no method which is implemented by the final component will be overridden by another component.
  • FINAL_SINGLETON: Combination of FINAL and SINGLETON. Doesn't make sense in combination with MAXON_COMPONENT_ONLY_REGISTER.

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.

Parameters
[in]KINDEither 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.
See also
vinterfaces
MAXON_INTERFACE

◆ PRIVATE_MAXON_COMPONENT_KIND

#define PRIVATE_MAXON_COMPONENT_KIND

◆ PRIVATE_MAXON_COMPONENT_KINDNORMAL

#define PRIVATE_MAXON_COMPONENT_KINDNORMAL

◆ PRIVATE_MAXON_COMPONENT_KINDABSTRACT

#define PRIVATE_MAXON_COMPONENT_KINDABSTRACT

◆ PRIVATE_MAXON_COMPONENT_KINDSINGLETON

#define PRIVATE_MAXON_COMPONENT_KINDSINGLETON

◆ PRIVATE_MAXON_COMPONENT_KINDFINAL

#define PRIVATE_MAXON_COMPONENT_KINDFINAL

◆ PRIVATE_MAXON_COMPONENT_KINDFINAL_SINGLETON

#define PRIVATE_MAXON_COMPONENT_KINDFINAL_SINGLETON

◆ PRIVATE_MAXON_COMPONENT_BASES_A

#define PRIVATE_MAXON_COMPONENT_BASES_A (   POPULATED,
  ... 
)

◆ PRIVATE_MAXON_COMPONENT_BASES_B

#define PRIVATE_MAXON_COMPONENT_BASES_B (   POPULATED,
  ... 
)

◆ PRIVATE_MAXON_COMPONENT_BASES_C

#define PRIVATE_MAXON_COMPONENT_BASES_C (   POPULATED,
  ... 
)

◆ PRIVATE_MAXON_COMPONENT_BASES_0

#define PRIVATE_MAXON_COMPONENT_BASES_0 (   ...)

◆ PRIVATE_MAXON_COMPONENT_BASES_HELPER

#define PRIVATE_MAXON_COMPONENT_BASES_HELPER (   x,
  i,
 
)

◆ PRIVATE_MAXON_COMPONENT_BASES_1

#define PRIVATE_MAXON_COMPONENT_BASES_1 (   ...)

◆ PRIVATE_MAXON_COMPONENT_ID

#define PRIVATE_MAXON_COMPONENT_ID (   ...)

◆ PRIVATE_MAXON_COMPONENT_REGISTRY

#define PRIVATE_MAXON_COMPONENT_REGISTRY (   ...)

◆ PRIVATE_MAXON_COMPONENT_TYPE

#define PRIVATE_MAXON_COMPONENT_TYPE (   DEF,
  ... 
)

◆ PRIVATE_MAXON_COMPONENT_EXTRA_FLAGS

#define PRIVATE_MAXON_COMPONENT_EXTRA_FLAGS

◆ PRIVATE_MAXON_COMPONENT_REGISTER

#define PRIVATE_MAXON_COMPONENT_REGISTER (   C,
  TEMPLATE,
  FLAGS,
  REGISTRY,
  ... 
)

◆ PRIVATE_MAXON_CLASS_REGISTER

#define PRIVATE_MAXON_CLASS_REGISTER (   C,
  TEMPLATE,
  REGISTRY,
  TYPE,
  ... 
)

◆ MAXON_COMPONENT_ONLY_REGISTER

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

class WrappedStreamImpl : public Component<WrappedStreamImpl, WrappedStreamInterface>
{
...
};
MAXON_COMPONENT_ONLY_REGISTER(WrappedStreamImpl, WrappedStreamComponent);

For the identifier there are three possibilities:

  • To define the component which shall be addressed by a MAXON_DECLARATION from a header file, you use the name of that MAXON_DECLARATION:
    MAXON_COMPONENT_ONLY_REGISTER(WrappedStreamImpl, WrappedStreamComponent);
  • You can register the component using a unique identifier, this is typically only used for adapter components:
    MAXON_COMPONENT_ONLY_REGISTER(OutdatedTestAdapter21, "net.maxon.component.outdatedtestadapter21");
  • You can specify the name of a registry and a unique identifier. In this case the component will also be added to the registry:
    MAXON_COMPONENT_ONLY_REGISTER(SomeComponentImpl, MyComponents, "net.maxon.test.somecomponent");
Parameters
[in]CName of the implementation class.
[in]...Here you have to specify either one or two arguments (similar to MAXON_DECLARATION_REGISTER):
  • If you use a single argument, this has to be the unique identifier to use for the component, or the name of a MAXON_DECLARATION if the component shall be the matching definition.
  • If you use two arguments, the first has to name a registry and the second the identifier to use for the component. The component will also be added to the registry.

◆ MAXON_COMPONENT_ONLY_REGISTER_TEMPLATE

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

See also
MAXON_COMPONENT_CLASS_REGISTER_TEMPLATE

◆ MAXON_COMPONENT_CLASS_REGISTER

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

  • You can register the object class using a unique identifier:
    MAXON_COMPONENT_CLASS_REGISTER(IoFileOutputStream, "net.maxon.class.iofileoutputstream");
  • You can use the name of a MAXON_DECLARATION from a header file if the object class shall be the matching definition for the declaration:
    MAXON_COMPONENT_CLASS_REGISTER(IoFileHandler, IoHandlerObjectFileClass);
    If the MAXON_DECLARATION is within a registry namespace, the object class will also be added to the corresponding registry.
  • You can specify the name of a registry and a unique identifier. In this case the object class will also be added to the registry:
    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
    class IoFileOutputStream : public Component<IoFileOutputStream, OutputStreamInterface>
    {
    MAXON_COMPONENT(NORMAL, OutputStreamBaseClass);
    public:
    ...
    };
    MAXON_COMPONENT_CLASS_REGISTER(IoFileOutputStream, "net.maxon.class.iofileoutputstream");
Parameters
[in]CName of the implementation class.
[in]...Here you have to specify either one or two arguments (similar to MAXON_DECLARATION_REGISTER):
  • If you use a single argument, this has to be the unique identifier to use for the registration, or the name of a MAXON_DECLARATION if the object class shall be the matching definition.
  • If you use two arguments, the first has to name a registry and the second the identifier to use for the registration. The object class will also be added to the registry.

◆ MAXON_COMPONENT_CLASS_REGISTER_TEMPLATE

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

template <typename INTERFACE, typename OUTPUT> class OutStreamConverter : public Component<OutStreamConverter<INTERFACE, OUTPUT>, INTERFACE>
{
MAXON_COMPONENT(NORMAL, DataDictionaryObjectClass);
...
};
using OutputStreamConverterFromOutputStream = OutStreamConverter<OutputStreamInterface, OutputStreamRef>;
MAXON_COMPONENT_CLASS_REGISTER_TEMPLATE(OutputStreamConverterFromOutputStream, "net.maxon.class.outputstreamconverterfromoutputstream");

◆ MAXON_COMPONENT_OBJECT_REGISTER

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

  • You can use the name of a MAXON_DECLARATION from a header file if the instance shall be the matching definition for the declaration:
    MAXON_COMPONENT_OBJECT_REGISTER(FileFormatHandlerGenericFileImpl, FileFormatHandlers::GenericFile);
    If the MAXON_DECLARATION is within a registry namespace, the instance will also be added to the corresponding registry.
  • You can specify the name of a registry and a unique identifier. In this case the instance will also be added to the registry:
    MAXON_COMPONENT_OBJECT_REGISTER(IoStdinHandler, IoHandlers, "net.maxon.iohandler.stdin");
  • You can register the instance using a unique identifier, but this is rarely used for MAXON_COMPONENT_OBJECT_REGISTER:
    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
    class IoStdinHandler : public Component<IoStdinHandler, IoHandlerInterface>
    {
    MAXON_COMPONENT(NORMAL, IoHandlerObjectBaseClass);
    ...
    };
    MAXON_COMPONENT_OBJECT_REGISTER(IoStdinHandler, IoHandlers, "net.maxon.iohandler.stdin");
Parameters
[in]CName of the implementation class.
[in]...Here you have to specify either one or two arguments (similar to MAXON_DECLARATION_REGISTER):
  • If you use a single argument, this has to be the name of the MAXON_DECLARATION for which the object shall be the matching definition, or a unique identifier to use for the registration.
  • If you use two arguments, the first has to name a registry and the second the identifier to use for the registration. The object will also be added to the registry.

◆ MAXON_COMPONENT_OBJECT_REGISTER_TEMPLATE

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

See also
MAXON_COMPONENT_CLASS_REGISTER_TEMPLATE

◆ MAXON_STATIC_REGISTER

#define MAXON_STATIC_REGISTER (   C,
  ... 
)

◆ MAXON_FUNCTIONNAME

#define MAXON_FUNCTIONNAME

This macro returns the function name of the current member or global function.

◆ MAXON_REGISTRY

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

MAXON_REGISTRY(FileFormat, FileFormats, "net.maxon.registry.fileformats");
namespace FileFormats
{
MAXON_DECLARATION(FileFormat, MaxonDocumentBinary, "net.maxon.fileformat.maxondocumentbinary");
MAXON_DECLARATION(FileFormat, MaxonDocumentJson, "net.maxon.fileformat.maxondocumentjson");
MAXON_DECLARATION(FileFormat, MaxonDocumentXml, "net.maxon.fileformat.maxondocumentxml");
}

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.

Parameters
[in]TType of the values which are stored at the registry. Has to be supported by Data.
[in]NameName of the registry within the current namespace.
[in]idUnique identifier of the registry.
[in]...Optional parameter of the form MAXON_REGISTRY_DEPENDENCIES(Reg1, Reg2, ...) to specify other registries on which this registry shall depend.

◆ PRIVATE_MAXON_REGISTRY_DEPENDENCY

#define PRIVATE_MAXON_REGISTRY_DEPENDENCY (   x,
  i,
 
)

◆ MAXON_REGISTRY_DEPENDENCIES

#define MAXON_REGISTRY_DEPENDENCIES (   ...)

◆ CONSTSTRING

#define CONSTSTRING (   x)

◆ CONSTCSTRING

#define CONSTCSTRING (   x)

◆ FormatString

#define FormatString (   ...)

◆ FormatCString

#define FormatCString (   ...)

◆ MAXON_SWITCH_FALLTHROUGH

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

switch(condition)
{
case 0:
...do something...
case 1:
...do something...
break;
}

◆ MAXON_DISALLOW_COPY_AND_ASSIGN

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

class MyClass
{
...
};

◆ MAXON_OPERATOR_MOVE_ASSIGNMENT

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

class MyClass
{
public:
MyClass(MyClass&& src);
...
};
Note
This macro can't be used for classes with virtual functions for the sake of safety. Because the created move assignment operator would invoke the constructor, the vtable pointer of the object would be changed if one accidentally used the assignment operator of a base class for an object of a derived class.
This macro must not be used for classes which support concurrent move assignment calls from multiple threads to the same object because the sequence of destructor and move constructor is not thread-safe.
See also
MAXON_OPERATOR_COPY_ASSIGNMENT

◆ MAXON_OPERATOR_COPY_ASSIGNMENT

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

class MyClass
{
public:
MyClass(const MyClass& src);
...
};
Note
This macro can't be used for classes with virtual functions for the sake of safety. Because the created copy assignment operator would invoke the constructor, the vtable pointer of the object would be changed if one accidentally used the assignment operator of a base class for an object of a derived class.
This macro must not be used for classes which support concurrent copy assignment calls from multiple threads to the same object because the sequence of destructor and copy constructor is not thread-safe.
See also
MAXON_OPERATOR_MOVE_ASSIGNMENT

◆ MAXON_OPERATOR_INEQUALITY

#define MAXON_OPERATOR_INEQUALITY (   TypeName)

This macro defines member operators >, <= and >= based on the member operator <. An example:

class MyClass
{
public:
Bool operator <(const MyClass& other) const { return ...; }
...
};

◆ MAXON_OPERATOR_COMPARISON

#define MAXON_OPERATOR_COMPARISON (   TypeName)

This macro defines member operators !=, >, <= and >= based on the member operators == and <. An example:

class MyClass
{
public:
Bool operator ==(const MyClass& other) const { return ...; }
Bool operator <(const MyClass& other) const { return ...; }
...
};

◆ PRIVATE_MAXON_MOVE_MEMBERS

#define PRIVATE_MAXON_MOVE_MEMBERS (   x,
  i,
 
)

◆ MAXON_MOVE_MEMBERS

#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

class Example
{
public:
Example(Example&& src) : MAXON_MOVE_MEMBERS(_a, _b) {}
private:
Int _a;
BaseArray<String> _b;
};

You have to use src as name of the constructor parameter.

◆ PRIVATE_MAXON_COPY_MEMBERS

#define PRIVATE_MAXON_COPY_MEMBERS (   x,
  i,
 
)

◆ MAXON_COPY_MEMBERS

#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

class Example
{
public:
Example(const Example& src) : MAXON_COPY_MEMBERS(_a, _b) {}
private:
Int _a;
String _b;
};

You have to use src as name of the constructor parameter.

◆ PRIVATE_MAXON_HASHCODE1

#define PRIVATE_MAXON_HASHCODE1 (   m1)

◆ PRIVATE_MAXON_HASHCODE2

#define PRIVATE_MAXON_HASHCODE2 (   m1,
  m2 
)

◆ PRIVATE_MAXON_HASHCODE3

#define PRIVATE_MAXON_HASHCODE3 (   m1,
  m2,
  m3 
)

◆ PRIVATE_MAXON_HASHCODE4

#define PRIVATE_MAXON_HASHCODE4 (   m1,
  m2,
  m3,
  m4 
)

◆ PRIVATE_MAXON_HASHCODE5

#define PRIVATE_MAXON_HASHCODE5 (   m1,
  m2,
  m3,
  m4,
  m5 
)

◆ PRIVATE_MAXON_HASHCODE6

#define PRIVATE_MAXON_HASHCODE6 (   m1,
  m2,
  m3,
  m4,
  m5,
  m6 
)

◆ PRIVATE_MAXON_HASHCODE7

#define PRIVATE_MAXON_HASHCODE7 (   m1,
  m2,
  m3,
  m4,
  m5,
  m6,
  m7 
)

◆ PRIVATE_MAXON_HASHCODE8

#define PRIVATE_MAXON_HASHCODE8 (   m1,
  m2,
  m3,
  m4,
  m5,
  m6,
  m7,
  m8 
)

◆ PRIVATE_MAXON_HASHCODE9

#define PRIVATE_MAXON_HASHCODE9 (   m1,
  m2,
  m3,
  m4,
  m5,
  m6,
  m7,
  m8,
  m9 
)

◆ PRIVATE_MAXON_HASHCODE10

#define PRIVATE_MAXON_HASHCODE10 (   m1,
  m2,
  m3,
  m4,
  m5,
  m6,
  m7,
  m8,
  m9,
  m10 
)

◆ PRIVATE_MAXON_HASHCODE_C

#define PRIVATE_MAXON_HASHCODE_C (   count,
  ... 
)

◆ PRIVATE_MAXON_HASHCODE_B

#define PRIVATE_MAXON_HASHCODE_B (   count,
  ... 
)

◆ PRIVATE_MAXON_HASHCODE_A

#define PRIVATE_MAXON_HASHCODE_A (   count,
  ... 
)

◆ MAXON_HASHCODE

#define MAXON_HASHCODE (   ...)

MAXON_HASHCODE computes the hash code of the arguments based on DefaultCompare::GetHashCode. The hash codes h_i of the arguments a_i are combined using the formula ( ... ((h_1 * 31 + h_2) * 31 + h_3) ... ) * 31 + h_n.

◆ PRIVATE_MAXON_EQUALITY_OPERATORS

#define PRIVATE_MAXON_EQUALITY_OPERATORS (   x,
  i,
 
)

◆ MAXON_OPERATOR_EQUALITY

#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

{
public:
private:
Float64 _w;
};

This will define the equality of two quaternions a, b by (a._w == b._w) && (a._v == b._v).

Parameters
[in]TThe 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.
See also
MAXON_OPERATOR_EQUALITY_HASHCODE

◆ MAXON_OPERATOR_EQUALITY_HASHCODE

#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 function using DefaultCompare::GetHashCode for the class members. You have to list all members as in

{
public:
private:
Float64 _w;
};

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::GetHashCode(_w) * 31 + DefaultCompare::GetHashCode(_v).

Parameters
[in]TThe enclosing class type for which the equality operators and the hash code shall be defined.
[in]...List of class members. Equality operators must be available for the types of all members, likewise DefaultCompare::GetHashCode.
See also
MAXON_OPERATOR_EQUALITY

◆ PRIVATE_MAXON_OPERATOR_STRUCT

#define PRIVATE_MAXON_OPERATOR_STRUCT (   x,
  i,
 
)

◆ MAXON_OPERATOR_STRUCT

#define MAXON_OPERATOR_STRUCT (   T,
  ... 
)

◆ MAXON_NONCONST_COUNTERPART

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

const V* FindValue(const K& key) const
{
...
}
V* FindValue(const K& key)
{
return MAXON_NONCONST_COUNTERPART(FindValue(key));
}

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.

Parameters
[in]...The call to the const function, see example. You have to forward all function parameters.

◆ MAXON_DECLARE_CONDITIONAL_COPY_CONSTRUCTOR

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

Parameters
[in]TType of the enclosing class.
[in]condThe condition under which the copy constructor is enabled. Must be dependent on T.

◆ MAXON_DECLARE_CONDITIONAL_MOVE_CONSTRUCTOR

#define MAXON_DECLARE_CONDITIONAL_MOVE_CONSTRUCTOR (   cls,
  cond 
)

◆ MAXON_DECLARE_CONDITIONAL_COPY_ASSIGNMENT

#define MAXON_DECLARE_CONDITIONAL_COPY_ASSIGNMENT (   cls,
  cond 
)

◆ MAXON_DECLARE_CONDITIONAL_MOVE_ASSIGNMENT

#define MAXON_DECLARE_CONDITIONAL_MOVE_ASSIGNMENT (   cls,
  cond 
)

◆ MAXON_TARGET_RELEASE

#define MAXON_TARGET_RELEASE

◆ MAXON_WARN_UNUSED

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

template <typename T> static Result<void> Function(T val)
{
...
}

◆ MAXON_WARN_UNUSED_CLASS

#define MAXON_WARN_UNUSED_CLASS

◆ MAXON_WARN_MUTE_UNUSED

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

◆ PRIVATE_MAXON_DEFAULT_CTOR

#define PRIVATE_MAXON_DEFAULT_CTOR

◆ MAXON_OFFSETOF_NON_STANDARD_LAYOUT

#define MAXON_OFFSETOF_NON_STANDARD_LAYOUT

◆ PRIVATE_MAXON_ALLOC_TYPENAME

#define PRIVATE_MAXON_ALLOC_TYPENAME

◆ PRIVATE_MAXON_TEMPLATE_PREFIX

#define PRIVATE_MAXON_TEMPLATE_PREFIX

◆ MAXON_WORKAROUND_CLANG_DELETED_FUNCTION

#define MAXON_WORKAROUND_CLANG_DELETED_FUNCTION (   X)

◆ PRIVATE_MAXON_PTR_COPY_CONSTRUCTOR

#define PRIVATE_MAXON_PTR_COPY_CONSTRUCTOR

◆ PRIVATE_MAXON_PTR_COPY_ASSIGNMENT

#define PRIVATE_MAXON_PTR_COPY_ASSIGNMENT

◆ static_assert

#define static_assert (   cond,
  str 
)

◆ noexcept

#define noexcept

◆ MAXON_ASSERT_STANDARD_LAYOUT

#define MAXON_ASSERT_STANDARD_LAYOUT (   T)

◆ MAXON_ASSERT_LEGAL_LAYOUT

#define MAXON_ASSERT_LEGAL_LAYOUT (   T)

◆ MAXON_ASSUME_ALIGNED

#define MAXON_ASSUME_ALIGNED (   val,
  alignment 
)

◆ MAXON_LIKELY

#define MAXON_LIKELY (   X)

◆ MAXON_UNLIKELY

#define MAXON_UNLIKELY (   X)

◆ MAXON_SAFE_PLACEMENT_NEW

#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

◆ FORMATTEMPLATECHECK0

#define FORMATTEMPLATECHECK0 (   formatString,
  ... 
)

◆ FORMATTEMPLATECHECK1

#define FORMATTEMPLATECHECK1 (   formatString,
  ... 
)

◆ FORMATTEMPLATECHECK_C

#define FORMATTEMPLATECHECK_C (   count,
  formatString,
  ... 
)

◆ FORMATTEMPLATECHECK_B

#define FORMATTEMPLATECHECK_B (   count,
  formatString,
  ... 
)

◆ FORMATTEMPLATECHECK_A

#define FORMATTEMPLATECHECK_A (   count,
  formatString,
  ... 
)

◆ FORMATTEMPLATECHECK

#define FORMATTEMPLATECHECK (   formatString,
  ... 
)

◆ DebugOutput

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

◆ DiagnosticOutput

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

◆ OutputWithFlags

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

◆ WarningOutput

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

◆ CriticalOutput

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

◆ ApplicationOutput

#define ApplicationOutput (   formatString,
  ... 
)

ApplicationOutput outputs text to the application console. The output is visible in the GUI version of the application. The full outputsyntax 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.

◆ OUTPUTCHECK0

#define OUTPUTCHECK0 (   A,
 
)

◆ OUTPUTCHECK1

#define OUTPUTCHECK1 (   A,
 
)

◆ OUTPUTCHECK_C

#define OUTPUTCHECK_C (   count,
  A,
 
)

◆ OUTPUTCHECK_B

#define OUTPUTCHECK_B (   count,
  A,
 
)

◆ OUTPUTCHECK_A

#define OUTPUTCHECK_A (   count,
  A,
 
)

◆ OUTPUTCHECK

#define OUTPUTCHECK (   A,
  B,
  ... 
)

◆ DebugStop

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

◆ CriticalStop

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

◆ DebugAssert

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

◆ CriticalAssert

#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

#define SizeAssert (   type,
 
)

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.

◆ MAXON_SOURCE_LOCATION

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

◆ MAXON_SOURCE_LOCATION_DECLARATION

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

◆ MAXON_SOURCE_LOCATION_FORWARD

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

◆ MAXON_SOURCE_LOCATION_NAME

#define MAXON_SOURCE_LOCATION_NAME (   x)

MAXON_SOURCE_LOCATION_NAME adds the allocated object name to the SourceLocation object.

Typedef Documentation

◆ OverloadRank0

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:

// this fallback will be chosen if T has neither a member type named Marker nor a member type named ExtraMarker:
template <typename T> void Func(const T& object, OverloadRank0);
// will be chosen if T has a member type named Marker, but no member type named ExtraMarker:
template <typename T> typename SFINAEHelper<void, typename T::Marker>::type Func(const T& object, OverloadRank1);
// will be chosen if T has a member type named ExtraMarker:
template <typename T> typename SFINAEHelper<void, typename T::ExtraMarker>::type Func(const T& object, OverloadRank2);

The set of overloaded functions has to be invoked with OVERLOAD_MAX_RANK as argument for the overload selection parameter:

Func(obj, OVERLOAD_MAX_RANK);

◆ OverloadRank1

See OverloadRank0.

◆ OverloadRank2

See OverloadRank0.

◆ OverloadRank3

See OverloadRank0.

◆ OverloadRank4

See OverloadRank0.

◆ OverloadRank5

See OverloadRank0.

◆ OverloadRankMax

◆ ExecutionInterface

Class for code that needs to be executed once the whole system including modules is up and running. To register code write:

class ExecutionExample : public ExecutionInterface<ExecutionExample>
{
public:
Result<void> operator ()()
{
..do something..
return OK;
}
};
MAXON_DECLARATION_REGISTER(ExecutionJobs, "net.maxon.execution.example")
{
return NewObj(ExecutionExample);
}

◆ ClassTransformer

◆ Component

using Component = ComponentWithBase<C, ComponentRoot, INTERFACES...>

◆ AdapterComponent

using AdapterComponent = ComponentWithBase<C, AdapterRoot, FROM, INTERFACES...>

◆ SelfPtr

using SelfPtr = typename ComponentHelper<ComponentRoot, INTERFACES...>::type::SelfPtr

◆ Utf16CharBuffer

◆ Utf32CharBuffer

◆ FROMSTR

using FROMSTR = void (*)(void* p, const Block<const Utf32Char>& str, Int& processed, const String& formatStatement, Bool& error)

◆ SystemFreeObject

using SystemFreeObject = void (*)(void* self)

◆ DestructorPointer

using DestructorPointer = void (*)(void*)

◆ NonEmptyBases

using NonEmptyBases = typename maxon::details::NonEmptyBasesHelper<typename std::conditional<std::is_empty<BASES>::value, 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.

Template Parameters
BASESList of base classes.

◆ TOSTR

using TOSTR = void (*)(String& result, const void* ptr, const FormatStatement* formatStatement)

Enumeration Type Documentation

◆ SUBSYSTEM

enum SUBSYSTEM
strong

Available subsystems (Windows only)

Enumerator
UNDEFINED 

Undefined SUBSYSTEM.

CONSOLE 

(/SUBSYSTEM:CONSOLE)

WINDOWS 

(/SUBSYSTEM:WINDOWS)

◆ APPLICATION_URLTYPE

enum APPLICATION_URLTYPE
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.

◆ APPLICATIONTYPE

enum APPLICATIONTYPE
strong
Enumerator
OTHER 

Stops the execution as soon as all initializations are done, used for command line mode.

CPYTHON 

application is a python interpreter

CPYTHON3 

application is a python 3 interpreter

◆ APPLICATIONMODE

enum APPLICATIONMODE
strong
See also
Application::SetApplicationMode().
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.

◆ STRINGCONVERSION

enum STRINGCONVERSION
strong

Flags for the string to value conversion.

Enumerator
NONE 
ALLOW_MORE_CHARACTERS 

if the specified string is longer than the converted characters and you specify this flag no error will be returned

◆ STRINGCOMPARISON

enum STRINGCOMPARISON
strong

String Comparison Mode.

Enumerator
MEMORY 

default - fast comparison, memory block is directly compared. This does not result in a correct alphabetical order.

UNICODE_LETTERS 

strings are compared using correct unicode decomposition

UNICODE_NUMBERS 

strings are compared using correct unicode decomposition. Numbers in strings are identified, so "2" is smaller than "10"

CASEINSENSITIVE 

strings are compared case-insensitive using correct unicode decomposition

CASEINSENSITIVE_NUMBERS 

strings are compared case-insensitive using correct unicode decomposition. Numbers in strings are identified, so "2" is smaller than "10"

◆ NORMALIZATION

enum NORMALIZATION
strong
Enumerator
NFC 
NFD 
NKDC 
NFKD 
NFD_HFS 

◆ TARGETAUDIENCE

enum TARGETAUDIENCE
strong
Enumerator
DEBUGGER 
DEVELOPERS 
USERS 
ALL 

◆ WRITEMETA

enum WRITEMETA
strong
Enumerator
DEFAULT 
WARNING 
CRITICAL 
NONEWLINE 
UI_SYNC_DRAW 

◆ OUTPUT

enum OUTPUT
strong

output flags for console output

Enumerator
DIAGNOSTIC 

diagnostic output, shows up if this group of output is activated. This is also the default

WARNING 

warning output, shows up if this group of output is activated

CRITICAL 

critical output, shows up if this group of output is activated

NOLINEBREAK 

if set, no line break is added

HEADER 

if set, header with line number and file name is added

◆ REGPARSEMODE

enum REGPARSEMODE
strong

Regular expression parser find mode.

Enumerator
MATCH 

Searching for exact matches of the complete string.

CONTAINS 

Searching for any match within the string.

STARTS 

Searching for an match at the beginning of the text.

ENDS 

Searching for an match at the end of the text.

Function Documentation

◆ IsCompleteHelper() [1/2]

std::enable_if<(sizeof(T) > 0), std::true_type>::type maxon::IsCompleteHelper ( T *  )

◆ IsCompleteHelper() [2/2]

std::false_type maxon::IsCompleteHelper (   ...)

◆ GetZeroRef()

const T& maxon::GetZeroRef ( )

Returns a C++ reference to an object of type const T whose memory consists of immutable zero bytes. This size of T must not exceed 1024 bytes. This is not checked by the compiler to allow for incomplete types.

◆ GetPtrSizedZeroRef()

const T& maxon::GetPtrSizedZeroRef ( )

Returns a C++ reference to an object of type const T whose memory consists of immutable zero bytes The size of T must not exceed the size of a pointer. This is not checked by the compiler to allow for incomplete types.

◆ NullValue()

T NullValue ( )

Returns a null value of type T.

The null value is defined as follows:

  • If T is a const reference type const U&:
    • If U is a scalar type or Generic, the null value is a const reference to a zero-initialized memory.
    • If there is a specialization of maxon::NullValueFunctions for U, the null value is given by the return value of the NullValueRef function of that specialization.
    • Otherwise, if U has or inherits a static member function const U& U::NullValueRef() or const U& U::NullValue(), the null value is the return value of that function.
    • Otherwise, the null value is the return value of PrivateConstRefNullValue((U*) nullptr, OVERLOAD_MAX_RANK) (which is found using argument-dependent lookup). There is a function template PrivateConstRefNullValue<T>(T*, OverloadRank0) in the maxon namespace which returns a reference to a global default-initialized object of type const T.
  • Otherwise, if T is a non-const reference type U&, a compilation error occurs.
  • Otherwise T is not a reference type:
    • If T is a scalar type, the null value is T().
    • If there is a specialization of maxon::NullValueFunctions for T, the null value is given by the return value of the NullValue function of that specialization.
    • Otherwise, if T has or inherits a static member function T T::NullValue() or const T& T::NullValue(), the null value is the return value of that function.
    • Otherwise, the null value is T().

If you declare a data type T with MAXON_DATATYPE, this will declare helper functions such that NullValue<T>() returns T() and NullValue<const T&>() returns a reference to an object constructed with T().

Template Parameters
TType of the null value. The cases T, T& and const T& are handled differently.
Note
It is necessary to use the fully-qualified name maxon::NullValue if the current scope already contains another NullValue declaration, which is the case for interfaces.
Returns
A null value of type T.

◆ MAXON_ENUM_LIST() [1/7]

enum maxon::SUBSYSTEM maxon::MAXON_ENUM_LIST ( SUBSYSTEM  ,
"net.maxon.datatype.enum.subsystem"   
)

◆ MAXON_ENUM_LIST() [2/7]

enum maxon::APPLICATION_URLTYPE maxon::MAXON_ENUM_LIST ( APPLICATION_URLTYPE  ,
"net.maxon.datatype.enum.application_urltype"   
)

◆ MAXON_ENUM_LIST() [3/7]

enum maxon::APPLICATIONTYPE maxon::MAXON_ENUM_LIST ( APPLICATIONTYPE  ,
"net.maxon.datatype.enum.applicationtype"   
)

◆ MAXON_ENUM_LIST() [4/7]

enum maxon::APPLICATIONMODE maxon::MAXON_ENUM_LIST ( APPLICATIONMODE  ,
"net.maxon.datatype.enum.applicationmode"   
)

◆ MAXON_DECLARATION() [1/4]

maxon::MAXON_DECLARATION ( Class< Error >  ,
ErrorObjectClass  ,
"net.maxon.class.errorobject"   
)

Base Error class to inherit from.

◆ MAXON_DECLARATION() [2/4]

maxon::MAXON_DECLARATION ( AggregatedError  ,
AggregatedErrorObject  ,
"net.maxon.object.aggregatederror"   
)

◆ operator%()

MAXON_ATTRIBUTE_FORCE_INLINE void maxon::operator% ( ErrorPtr rv,
ThreadReferencedError err 
)

◆ Cast() [1/3]

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.

Parameters
[in]refError object to cast.
Template Parameters
RReference class to cast to. This must be a reference class of a virtual interface.
Returns
Casted reference.

◆ IsErrorOfType()

Bool maxon::IsErrorOfType ( const Error &  err)

◆ MAXON_REGISTRY() [1/8]

maxon::MAXON_REGISTRY ( JobRef  ,
ExecutionJobs  ,
"net.maxon.registry.executionjobs"   
)

◆ ImplementationCreateNullValue() [1/4]

NullValueDetector<C*, &C::NullValue>::type maxon::ImplementationCreateNullValue ( OverloadRank3  )

◆ ImplementationCreateNullValue() [2/4]

std::enable_if<MAXON_IS_COW_KIND(C::PrivateInterface::Reference::Handler::KIND), C*>::type maxon::ImplementationCreateNullValue ( OverloadRank2  )

◆ ImplementationCreateNullValue() [3/4]

SFINAEHelper<C*, typename C::PrivateInterface::Reference::Handler>::type maxon::ImplementationCreateNullValue ( OverloadRank1  )

◆ ImplementationCreateNullValue() [4/4]

C* maxon::ImplementationCreateNullValue ( OverloadRank0  )

◆ ImplementationDestroyNullValue() [1/3]

NullValueDetector<C*, &C::NullValue>::type maxon::ImplementationDestroyNullValue ( const C *  ,
OverloadRank3   
)

◆ ImplementationDestroyNullValue() [2/3]

std::enable_if<MAXON_IS_COW_KIND(C::PrivateInterface::Reference::Handler::KIND), C*>::type maxon::ImplementationDestroyNullValue ( const C *  o,
OverloadRank2   
)

◆ ImplementationDestroyNullValue() [3/3]

void maxon::ImplementationDestroyNullValue ( const C *  ,
OverloadRank0   
)

◆ MAXON_DECLARATION() [3/4]

maxon::MAXON_DECLARATION ( Class< LoggerTypeRef >  ,
LoggerTypeBaseClass  ,
"net.maxon.class.loggertypebase"   
)

◆ MAXON_REGISTRY() [2/8]

maxon::MAXON_REGISTRY ( Class< LoggerTypeRef >  ,
LoggerTypes  ,
"net.maxon.core.registry.loggertypes"   
)

◆ MAXON_REGISTRY() [3/8]

maxon::MAXON_REGISTRY ( LoggerRef  ,
Loggers  ,
"net.maxon.core.registry.loggers"   
)

◆ AssertCast()

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.

Parameters
[in]refObject reference to cast.
Template Parameters
RReference class to cast to. This must be a reference class of a virtual interface.
Returns
Casted reference.

◆ Cast() [2/3]

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.

Parameters
[in]refObject reference to cast.
Template Parameters
RReference class to cast to. This must be a reference class of a virtual interface.
Returns
Casted reference.

◆ Cast() [3/3]

SFINAEHelper<Result<R>, typename R::ReferencedType, typename SRC::ReferencedType>::type maxon::Cast ( Result< SRC > &&  src)

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.

Parameters
[in]srcResult to cast.
Template Parameters
RReference class to cast to. This must be a reference class of a virtual interface.
Returns
Casted Result.

◆ MAXON_REGISTRY() [4/8]

maxon::MAXON_REGISTRY ( GenericClass  ,
Classes  ,
"net.maxon.registry.classes"   
)

Each class automatically registers itself at the Classes registry. With

Class<MyType> cls = Classes::Get<MyType>("com.foo.class.bar");

you can look for the class with identifier "com.foo.class.bar". MyType is the expected reference type of instances of the class.

◆ MAXON_REGISTRY() [5/8]

maxon::MAXON_REGISTRY ( ClassTransformer  ,
ClassTransformers  ,
"net.maxon.registry.classtransformers"   
)

◆ GetFunctionName()

Id maxon::GetFunctionName ( const Char funcName)

◆ GetUtf8DefaultDecoder()

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.

Returns
The decoder.

◆ GetUtf8DefaultEncoder()

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.

Returns
The encoder.

◆ MAXON_ENUM_FLAGS() [1/4]

enum maxon::STRINGCONVERSION maxon::MAXON_ENUM_FLAGS ( STRINGCONVERSION  )

◆ MAXON_ENUM_LIST() [5/7]

enum maxon::STRINGCOMPARISON maxon::MAXON_ENUM_LIST ( STRINGCOMPARISON  )

◆ operator"" _cs()

const CString& maxon::operator"" _cs ( const char *  str,
std::size_t  cnt 
)

Creates a (constant) C-string.

◆ DescribeIO() [1/2]

Result<void> maxon::DescribeIO ( const CStringInterface s,
const DataSerializeInterface dsi 
)

◆ DescribeIO() [2/2]

Result<void> maxon::DescribeIO ( const StringInterface s,
const DataSerializeInterface dsi 
)

◆ operator+() [1/14]

String maxon::operator+ ( const String a,
const String b 
)

Concatenates two strings, please don't use a = a + b since this is several times slower than a += b.

◆ operator+() [2/14]

String&& maxon::operator+ ( String &&  a,
const String b 
)

◆ operator+() [3/14]

String&& maxon::operator+ ( String &&  a,
String &&  b 
)

◆ operator+() [4/14]

String&& maxon::operator+ ( const String a,
String &&  b 
)

◆ operator+() [5/14]

CString maxon::operator+ ( const CString a,
const CString b 
)

Concatenates two strings, please don't use a = a + b since this is several times slower than a += b.

◆ operator+() [6/14]

CString&& maxon::operator+ ( CString &&  a,
const CString b 
)

◆ operator+() [7/14]

CString&& maxon::operator+ ( CString &&  a,
CString &&  b 
)

◆ operator+() [8/14]

CString&& maxon::operator+ ( const CString a,
CString &&  b 
)

◆ operator+=()

String& maxon::operator+= ( String s,
const CString b 
)

◆ operator+() [9/14]

String maxon::operator+ ( const String a,
const CString b 
)

◆ operator+() [10/14]

String&& maxon::operator+ ( String &&  a,
const CString b 
)

◆ operator+() [11/14]

String maxon::operator+ ( const String a,
const Char b 
)

◆ operator+() [12/14]

String&& maxon::operator+ ( String &&  a,
const Char b 
)

◆ operator+() [13/14]

CString maxon::operator+ ( const CString a,
const Char b 
)

◆ operator+() [14/14]

CString&& maxon::operator+ ( CString &&  a,
const Char b 
)

◆ ToString() [1/27]

String maxon::ToString ( const String str,
const FormatStatement formatStatement,
Bool  = false 
)

◆ ToString() [2/27]

String maxon::ToString ( const CString str,
const FormatStatement formatStatement,
Bool  = false 
)

◆ ToStringHelper() [1/2]

decltype(std::declval<T>().ToString(nullptr)) maxon::ToStringHelper ( const T *  object,
const FormatStatement formatStatement,
Int  
)

◆ ToStringHelper() [2/2]

String maxon::ToStringHelper ( const T *  object,
const FormatStatement formatStatement,
const Int checkDataType 
)

◆ ToString() [3/27]

std::enable_if<!std::is_enum<T>::value, String>::type maxon::ToString ( const T &  object,
const FormatStatement formatStatement,
Bool  checkDataType = true 
)

◆ ToString() [4/27]

std::enable_if<!std::is_function<T>::value, String>::type maxon::ToString ( const T *  object,
const FormatStatement formatStatement 
)

◆ ToString() [5/27]

const String& maxon::ToString ( Bool  val,
const FormatStatement formatStatement,
Bool  = false 
)

◆ ToString() [6/27]

String maxon::ToString ( Char  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [7/27]

String maxon::ToString ( UChar  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [8/27]

String maxon::ToString ( Int16  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [9/27]

String maxon::ToString ( Int32  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [10/27]

String maxon::ToString ( Int64  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [11/27]

String maxon::ToString ( UInt16  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [12/27]

String maxon::ToString ( UInt32  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [13/27]

String maxon::ToString ( UInt64  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [14/27]

String maxon::ToString ( Float64  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_float.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [15/27]

String maxon::ToString ( Float32  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_float.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [16/27]

String maxon::ToString ( Utf16Char  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [17/27]

String maxon::ToString ( Utf32Char  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a variable into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_integer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [18/27]

String maxon::ToString ( Char val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a C-string into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. No formatting instructions are currently supported.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [19/27]

String maxon::ToString ( const Char val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a C-string into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. No formatting instructions are currently supported.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [20/27]

String maxon::ToString ( const void *  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a pointer into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_pointer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [21/27]

String maxon::ToString ( void *  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a pointer into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_pointer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [22/27]

String maxon::ToString ( const Generic *  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a pointer into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_pointer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [23/27]

String maxon::ToString ( Generic *  val,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

Converts a pointer into a readable string.

Parameters
[in]valThe value that will be converted.
[in]formatStatementNullptr or additional formatting instruction. See also format_pointer.
[in]checkDataTypeMust be set to false, only for internal use.
Returns
The converted result.

◆ ToString() [24/27]

String maxon::ToString ( const DataType type,
const FormatStatement formatStatement,
Bool  checkDataType = false 
)

◆ ExtractString() [1/3]

String maxon::ExtractString ( StringProxy proxy)

◆ ExtractString() [2/3]

const String& maxon::ExtractString ( const String str)

◆ ExtractString() [3/3]

const Char* maxon::ExtractString ( const Char str)

◆ ScanParameter() [1/11]

void maxon::ScanParameter ( Float64 result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [2/11]

void maxon::ScanParameter ( Float32 result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [3/11]

void maxon::ScanParameter ( Int64 result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [4/11]

void maxon::ScanParameter ( Int32 result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [5/11]

void maxon::ScanParameter ( Int16 result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [6/11]

void maxon::ScanParameter ( Char result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [7/11]

void maxon::ScanParameter ( UInt64 result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [8/11]

void maxon::ScanParameter ( UInt32 result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [9/11]

void maxon::ScanParameter ( UInt16 result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [10/11]

void maxon::ScanParameter ( UChar result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ ScanParameter() [11/11]

void maxon::ScanParameter ( T *&  result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ FromStrHlp()

void maxon::FromStrHlp ( T *  result,
const Block< const Utf32Char > &  str,
Int processed,
const String formatStatement,
Bool error 
)

◆ GetFromStrHlp()

FROMSTR maxon::GetFromStrHlp ( )

◆ ScanStringTemplate()

Bool maxon::ScanStringTemplate ( const String str,
const String format,
Int parsedCharacters,
Int  argsCnt,
void **  args,
FROMSTR argFuncs 
)

◆ ExtractCString()

CString maxon::ExtractCString ( StringProxy proxy)

◆ ForwardString()

MAXON_ATTRIBUTE_FORCE_INLINE T maxon::ForwardString ( T &&  str)

◆ ScanString() [1/2]

Bool maxon::ScanString ( STR  inputStr,
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 outputsyntax.
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:

Float64 val1;
Int64 val2, val3;
void* val4;
Bool success = ScanString("@_7.345maef5.8=ab__", "@@_@m@{x}.@{c}=@", val1, val2, val3, val4);

The operation succeeds with 7.345 for val1, 0xaef5 for val2, 56 for val3 and 0xab for val4.

Parameters
[in]inputStrThe input string containing the data that will be extracted.
[in]formatStrThe string containing the parameter format.
[out]argsValues that will be extracted.
Returns
True if successful. Errors can happen if the parameter count does not match the format string, if the input string does not match the format string or the extracted data exceeds the limits of a datatype.

◆ ScanString() [2/2]

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 outputsyntax.
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:

Float64 val1;
Int64 val2, val3;
void* val4;
Int parsedCharacters;
Bool success = ScanString("@_7.345maef5.8=ab__", parsedCharacters, "@@_@m@{x}.@{c}=@", val1, val2, val3, val4);

The operation succeeds with 7.345 for val1, 0xaef5 for val2, 56 for val3 and 0xab for val4.

Parameters
[in]inputStrThe input string containing the data that will be extracted.
[out]parsedInputCharactersThe number of characters that were parsed to match formatStr.
[in]formatStrThe string containing the parameter format.
[out]argsValues that will be extracted.
Returns
True if successful. Errors can happen if the parameter count does not match the format string, if the input string does not match the format string or the extracted data exceeds the limits of a datatype.

◆ _LoadResourceString()

String maxon::_LoadResourceString ( const Id scope,
const InternedId keyValue 
)

◆ LoadResourceString()

String maxon::LoadResourceString ( const STRID &  identifier,
const ARGUMENTS &...  args 
)

Loads the string 'identifier' from the resource and format with the passed parameters.

◆ StrLen() [1/3]

static Int maxon::StrLen ( const SysChar chr)
static

Calculates the length of a null-terminated string of type SysChar.

◆ StrLen() [2/3]

static Int maxon::StrLen ( const Utf32Char chr)
static

Calculates the length of a null-terminated string of type Utf32Char.

◆ StrLen() [3/3]

static Int maxon::StrLen ( const Utf16Char chr)
static

Calculates the length of a null-terminated string of type Utf16Char.

◆ IsSpace()

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsSpace ( TYPE  chr)

Checks if the passed character is a space.

◆ IsTab()

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsTab ( TYPE  chr)

Checks if the passed character is a tab.

◆ IsSpaceOrTab()

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsSpaceOrTab ( TYPE  chr)

Checks if the passed character is a space or tab.

◆ IsLineEnd()

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsLineEnd ( TYPE  chr)

Checks if the passed character is a line end.

◆ IsNumeric()

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsNumeric ( TYPE  chr)

Checks if the passed character is a digit.

◆ IsAlphabetic()

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

◆ IsAlphanumeric()

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsAlphanumeric ( TYPE  chr)

Checks if the passed character is alphabetic or numeric.

◆ IsHexadecimal()

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::IsHexadecimal ( TYPE  chr)

Checks if the passed character is alphabetic or numeric.

◆ GetHexadecimalValue()

MAXON_ATTRIBUTE_FORCE_INLINE Int maxon::GetHexadecimalValue ( TYPE  chr)

Calculates the value from a hexadecimal character. For a valid return value IsHexadecimal must fulfilled.

◆ JoinElements()

static MAXON_WARN_UNUSED REFTYPE maxon::JoinElements ( ITERATABLETYPE &&  iterable,
const REFTYPE &  delimiter,
const FormatStatement formatStr = nullptr 
)
static

Concatenates multiple elements to create a string. Here an example:

BaseArray<String> arr;
arr.Append("a"_s) iferr_return;
arr.Append("b"_s) iferr_return;
String res = JoinElements(arr, ", ");

The result will be "a, b"

Parameters
[in]iterableThe elements to concatenate, can be any iterable data type. The elements must have a valid implementation of ToString.
[in]delimiterThe delimiter that will be placed inbetween two elements. Must be a String or CString. It can be empty.
[in]formatStrThe string containing the parameter format.
Returns
The return string.

◆ MAXON_MEMBERFUNCTION_DETECTOR()

maxon::MAXON_MEMBERFUNCTION_DETECTOR ( GetReferenceCounter  )

◆ MAXON_ENUM_LIST() [6/7]

enum maxon::NORMALIZATION maxon::MAXON_ENUM_LIST ( NORMALIZATION  )

◆ MAXON_ENUM_FLAGS() [2/4]

enum maxon::TARGETAUDIENCE maxon::MAXON_ENUM_FLAGS ( TARGETAUDIENCE  ,
"net.maxon.datatype.enum.targetaudience"  ,
EARLY   
)

◆ MAXON_ENUM_FLAGS() [3/4]

enum maxon::WRITEMETA maxon::MAXON_ENUM_FLAGS ( WRITEMETA  ,
"net.maxon.datatype.enum.writemeta"  ,
EARLY   
)

◆ MAXON_ENUM_FLAGS() [4/4]

enum maxon::OUTPUT maxon::MAXON_ENUM_FLAGS ( OUTPUT  ,
"net.maxon.datatype.enum.output"  ,
EARLY   
)

◆ _ConsoleOutput() [1/3]

void maxon::_ConsoleOutput ( OUTPUT  flags,
const Char str,
Int  line,
const Char file 
)

◆ _ConsoleOutput() [2/3]

void maxon::_ConsoleOutput ( OUTPUT  flags,
const String str,
Int  line,
const Char file 
)

◆ _ConsoleOutput() [3/3]

void maxon::_ConsoleOutput ( OUTPUT  flags,
StringProxy str,
Int  line,
const Char file 
)

◆ _ApplicationOutput() [1/3]

void maxon::_ApplicationOutput ( maxon::TARGETAUDIENCE  t,
maxon::WRITEMETA  lvl,
const maxon::String str,
Int  line,
const Char file 
)

◆ _ApplicationOutput() [2/3]

void maxon::_ApplicationOutput ( maxon::TARGETAUDIENCE  t,
maxon::WRITEMETA  lvl,
const Char str,
Int  line,
const Char file 
)

◆ _ApplicationOutput() [3/3]

void maxon::_ApplicationOutput ( maxon::TARGETAUDIENCE  t,
maxon::WRITEMETA  lvl,
const maxon::StringProxy proxy,
Int  line,
const Char file 
)

◆ ToStrHlp()

void maxon::ToStrHlp ( String result,
const T *  x,
const FormatStatement formatStatement 
)

◆ GetToStrHlp()

TOSTR maxon::GetToStrHlp ( )

◆ Format() [1/2]

StringProxy* maxon::Format ( const String formatString,
Int  argsCnt,
const void **  args,
TOSTR argFuncs 
)

◆ Format() [2/2]

StringProxy* maxon::Format ( const Char formatString,
Int  argsCnt,
const void **  args,
TOSTR argFuncs 
)

◆ FormatTemplateX() [1/2]

StringProxy* maxon::FormatTemplateX ( FORMATSTR  formatString,
const ARGS &...  args 
)

◆ FormatTemplateX() [2/2]

FORMATSTR maxon::FormatTemplateX ( FORMATSTR  formatString)

◆ GetArgCnt()

constexpr Int maxon::GetArgCnt ( const Char *const  formatStr)

cosntexpr which returns the number of '@' parameters in a Format string.

◆ PrivateGetClassName()

static MAXON_ATTRIBUTE_FORCE_INLINE const Char* maxon::PrivateGetClassName ( )
static

◆ MAXON_ENUM_LIST() [7/7]

enum maxon::REGPARSEMODE maxon::MAXON_ENUM_LIST ( REGPARSEMODE  )

◆ MAXON_REGISTRY() [6/8]

maxon::MAXON_REGISTRY ( Class< UnitTestRef >  ,
UnitTestClasses  ,
"net.maxon.registry.unittestclasses"   
)

◆ MAXON_REGISTRY() [7/8]

maxon::MAXON_REGISTRY ( Class< UnitTestRef >  ,
SpeedTestClasses  ,
"net.maxon.registry.speedtestclasses"   
)

◆ MAXON_REGISTRY() [8/8]

maxon::MAXON_REGISTRY ( Class< UnitTestRef >  ,
LongRunTestClasses  ,
"net.maxon.registry.longruntestclasses"   
)

◆ MAXON_DECLARATION() [4/4]

maxon::MAXON_DECLARATION ( Class< UnitTestRef >  ,
UnitTestBaseClass  ,
"net.maxon.class.unittestbase"   
)

◆ PrivateGetRefMember() [1/2]

ErrorPtr & PrivateGetRefMember ( )

◆ PrivateGetRefMember() [2/2]

const ErrorPtr & PrivateGetRefMember ( ) const

◆ Create()

Result<typename maxon::details::ClassCreateType<REFCLASS>::type> Create ( ) const

◆ ToString() [25/27]

String ToString ( const FormatStatement formatStatement) const

Returns a readable string of the content.

Parameters
[in]formatStatementNullptr or additional formatting instruction. Currently no additional formatting instructions are supported.
Returns
The converted result.

◆ ToString() [26/27]

String ToString ( const FormatStatement formatStatement) const

Returns a string representation of this collection as a list of all contained elements.

Parameters
[in]formatStatementNullptr or additional formatting instruction.
Returns
List of all elements as a String.

◆ ToString() [27/27]

String ToString ( const FormatStatement formatStatement)

Iterates over this foreach iterator and returns a string with a list of all visited iteration values.

Parameters
[in]formatStatementNullptr or additional formatting instruction.
Returns
List of all iteration values as a String.
Warning
This is a non-const function which uses this iterator for the iteration. I.e., after function completion this iterator will point to the end.

Variable Documentation

◆ MAXON_ENUM_LIST

struct maxon::Runtime MAXON_ENUM_LIST

◆ alignment

Int alignment

◆ g_zeroMemory

const void* g_zeroMemory

Points to a 32-byte-aligned block of 1024 zero bytes. The memory will be write-protected if possible.

◆ g_zeroPtr

const void* const g_zeroPtr
static

A global const void* value initialized to zero. Compilers will be able to do optimizations because they know the zero value.

◆ STACKTRACE_SKIP

const Int STACKTRACE_SKIP
static

◆ STRING_MAXIMUM_PRECISION

const Int STRING_MAXIMUM_PRECISION
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).

◆ STRING_DYNAMIC_DIGITS

const Int STRING_DYNAMIC_DIGITS
static

Constant for FloatToString. If passed to FloatToString the digits in front of the comma will be dynamically adjusted.

◆ g_systemBehavior

System::SPECIALBEHAVIOR g_systemBehavior

Defines mostly legacy behaviour.

◆ g_isDebuggerPresent

maxon::Bool g_isDebuggerPresent

determines, whether a debugging environment is present. Note that this value will be false if the debugger was attached to a process

◆ g_enableDebugBreak

maxon::Bool g_enableDebugBreak

determines, whether debug breaks will be executed. Note that g_isDebuggerPresent needs to be true, too in order to have an effect.

◆ REGPARSE_CONCAT

const Int REGPARSE_CONCAT
static

◆ REGPARSE_ANYCHAR

const Int REGPARSE_ANYCHAR
static

◆ REGPARSE_ANYDIGIT

const Int REGPARSE_ANYDIGIT
static

◆ REGPARSE_OPERATOR_OR

const Int REGPARSE_OPERATOR_OR
static

◆ REGPARSE_OPERATOR_STAR

const Int REGPARSE_OPERATOR_STAR
static

◆ REGPARSE_OPERATOR_PARENTHESIS_LEFT

const Int REGPARSE_OPERATOR_PARENTHESIS_LEFT
static

◆ REGPARSE_OPERATOR_PARENTHESIS_RIGHT

const Int REGPARSE_OPERATOR_PARENTHESIS_RIGHT
static

◆ MAXON_ENUM_LIST_CLASS

maxon::UnitTestErrorInterface MAXON_ENUM_LIST_CLASS

◆ value

const InterfaceReference *const value
static