C12Adapter Opensource C++ Interface
MCORE

Files

file  MAes.h
 
file  MAesEax.h
 
file  MAlgorithm.h
 
file  MAutomation.h
 
file  MClass.h
 
file  MCommandLineParser.h
 
file  MCOREDefs.h
 Basic definitions of library MCORE.
 
file  MCOREExtern.h
 This file shall be included into every cpp source file that uses MeteringSDK.
 
file  MCriticalSection.h
 
file  MCurrentPathSubstitutor.h
 
file  MDes.h
 
file  MDictionary.h
 
file  MDynamicLibrary.h
 
file  MErrorEnum.h
 List of MeteringSDK error constants.
 
file  MeteringSDKMacros.h
 MeteringSDK generic macro definitions, including version and settings file inclusion.
 
file  MeteringSDKVersion.h
 MeteringSDK Version and copyright information.
 
file  MEvent.h
 
file  MException.h
 
file  MFileNameAndLineNumber.h
 
file  MFindFile.h
 
file  MGuid.h
 
file  MIniFile.h
 
file  MInterlocked.h
 
file  MIso8825.h
 
file  MJavaEnv.h
 
file  MMath.h
 
file  MMD5Checksum.h
 
file  MMessageCatalog.h
 
file  MMessageFile.h
 
file  MMutex.h
 
file  MNonCopyable.h
 
file  MObject.h
 
file  MProgressMonitor.h
 
file  MPropertyDefinition.h
 
file  MRandomGenerator.h
 
file  MReflectedMacros.h
 Helper macros used in reflection.
 
file  MRegexp.h
 
file  MRegistry.h
 
file  MSemaphore.h
 
file  MSerialPort.h
 
file  MSockOptEnum.h
 
file  MStreamMemory.h
 
file  MStreamSocket.h
 
file  MStreamSocketBase.h
 
file  MStreamSocketUdp.h
 
file  MSynchronizer.h
 
file  MThread.h
 
file  MThreadCurrent.h
 
file  MThreadLocalPointer.h
 
file  MThreadWorker.h
 
file  MTime.h
 
file  MTimer.h
 
file  MTimeRecurrent.h
 
file  MTimeRecurrentYearly.h
 
file  MTimeSpan.h
 
file  MTimeZone.h
 
file  MTypeCasting.h
 Type casting helpers.
 
file  MUtilities.h
 
file  MVariant.h
 
file  MVersion.h
 

Classes

class  MAes
 AES encryption and decryption class. More...
 
class  MAesEax
 AES encryption and decryption in EAX mode with authentication. More...
 
class  MAlgorithm
 Set of various, mostly string related algorithms. More...
 
class  MAutomation
 Wrapper class allows creating and using any Automation COM object. More...
 
class  MClass
 Notion of a class that serves as the base for the reflection API. More...
 
class  MCommandLineParser
 Command line parser to help dealing with argv and argc arguments within function main. More...
 
class  MCriticalSection
 System independent lightweight synchronization object. More...
 
class  MCurrentPathSubstitutor
 Locally substitute the current path of an application to another current path. More...
 
class  MDes
 DES encryption and decryption class. More...
 
class  MDictionary
 Dictionary of keys and their values, associative collection. More...
 
class  MDynamicLibrary
 Wrapper for shared object (dll) API. More...
 
class  MErrorEnum
 Error enumeration. More...
 
class  MEvent
 Class that supports event paradigm, synchronizer kind. More...
 
class  MException
 Common exception base for MeteringSDK. More...
 
class  MESystemError
 System-related exception that is thrown in case some system service fails. More...
 
class  MESocketError
 Sockets exception that is thrown in case of the sockets failure. More...
 
class  MEOperationCancelled
 Exception which is thrown in case the operation is canceled. More...
 
class  MENumberOutOfRange
 Exception, number is out of range. More...
 
class  MEIndexOutOfRange
 Exception, array index is out of range. More...
 
class  MEMath
 Exception, Error during mathematical operation. More...
 
class  MFileNameAndLineNumber
 Memory saving fast copied storage for file name and file line. More...
 
class  MFindFile
 Operating system and compiler independent way to search for file or directory. More...
 
class  MGuid
 Global identifier (GUID) object. More...
 
class  MIniFile
 Class that allows reading and writing the Windows-like INI files sequentially. More...
 
class  MInterlocked
 System independent lightweight synchronization object that synchronizes the access to one variable across multiple threads. More...
 
class  MIso8825
 A set of utilities to work with ISO 8825 data types. More...
 
class  MJavaEnv
 Scoped Java environment handler. More...
 
class  MMath
 MMath is derived from MObject, and it only has static properties and methods. More...
 
class  MMD5Checksum
 MD5 Checksum updater and calculator class. More...
 
class  MMessageCatalog
 Catalog of local strings. More...
 
class  MMessageFile
 Message file, internal implementation of file with international strings. More...
 
class  MNonCopyable
 Provides a simple and expressive way to declare non-copyable classes. More...
 
class  MObject
 Root object that establishes dynamic class information, dynamic property and method handling and marshaling. More...
 
class  MProgressListener
 Listener interface that should be implemented in order to get updates from progress monitor. More...
 
class  MProgressAction
 Representation of task activity. More...
 
class  MProgressMonitor
 ProgressMonitor manages a set of ProgressAction objects. More...
 
class  MPropertyDefinition
 Property definition of the object. More...
 
class  MRandomGenerator
 Cryptographically secure random generator. More...
 
class  MRegexp
 POSIX-like regular expression handler. More...
 
class  MRegistry
 Provides the access to Windows registry, system dependent class. More...
 
class  MSemaphore
 Semaphore to be used to synchronize resource access. More...
 
class  MSerialPort
 Serial port device. More...
 
class  MSharedPointer< C >
 Generic intrusive shared pointer. More...
 
class  MSockOptEnum
 Enumerations and constants for socket options. More...
 
class  MStr
 Provides static methods for string manipulation. More...
 
class  MStreamExternalMemory
 The random access stream, arranged on the memory chunk, that this class does not own. More...
 
class  MStreamFile
 Classic file stream capable of manipulating files in the file system. More...
 
class  MStreamMemory
 The random access stream in memory that is always open. More...
 
class  MStreamSocket
 TCP/IP socket, reliable stream. More...
 
class  MStreamSocketBase
 Abstract IP socket, either TCP or UDP. More...
 
class  MStreamSocketUdp
 UDP datagram socket. More...
 
class  MSynchronizer
 Abstract synchronizer object. More...
 
class  MThread
 Operating system independent abstract thread. More...
 
class  MThreadCurrent
 Thread instance that attaches to the current thread to allow manipulations with the thread parameters. More...
 
class  MThreadLocalPointer< T >
 Thread-local pointer, the one that will be different in every thread, API based portable implementation. More...
 
class  MThreadWorker
 Abstract worker thread, the one optimized for doing work outside of the currently running thread. More...
 
class  MTime
 Value to represent a moment in time, consists of both date and time information. More...
 
class  MTimer
 Timer with milliseconds resolution. More...
 
class  MTimeRecurrent
 Abstract value to represent a recurrent time, a certain time that happens periodically. More...
 
class  MTimeRecurrentYearly
 Yearly recurrent date. More...
 
class  MTimeSpan
 Time span represents the difference between two times, a duration. More...
 
class  MTimeZone
 Time zone. More...
 
class  MUtilities
 Provides useful services like timers, data type conversions, path and file manipulation, etc. More...
 
class  MVariant
 Variant data type, where a particular value type is dynamically determined at runtime. More...
 
class  MVersion
 Version that has multiple fraction (subversion) numbers, up to a certain limit. More...
 
class  MXmlNode
 DOM representation of XML node. More...
 
class  MXmlDocument
 DOM representation of XML document. More...
 

Macros

#define M_PRODUCT_LEGAL_COPYRIGHT   "Copyright (c) 1997-2017 Elster Solutions"
 Copyright message of the whole product. More...
 
#define M_PRODUCT_VERSION   "1.0.0.0"
 Product version string. More...
 
#define M_NO_REFLECTION   0
 Flag that disables Reflection API. More...
 
#define M_NO_FULL_REFLECTION   1
 Flag that disables extended Reflection API. More...
 
#define M_NO_FILESYSTEM   0
 Enable or disable support for files and file system operations. More...
 
#define M_NO_MULTITHREADING   0
 Flag that disables Multithreading. More...
 
#define M_NO_SOCKETS   0
 Flag that disables Sockets. More...
 
#define M_NO_SOCKETS_UDP   M_NO_SOCKETS
 Flag that disables socket UDP interface. More...
 
#define M_NO_SOCKETS_SOCKS   M_NO_SOCKETS
 Flag that disables SOCKS proxy of Sockets. More...
 
#define M_NO_TIME   0
 Flag that disables time functions. More...
 
#define M_NO_VARIANT   0
 Flag that disables MVariant class. More...
 
#define M_NO_PROGRESS_MONITOR   0
 Flag that disables MVariant class. More...
 
#define M_NO_AUTOMATION   0
 Windows specific flag that disables COM/OLE and Automation. More...
 
#define M_NO_SERIAL_PORT   0
 Flag that disables serial port support. More...
 
#define M_NO_CONSOLE   0
 Flag that disables standard console streams. More...
 
#define M_NO_REGISTRY   0
 Flag that disables registry manipulation class used to access Windows registry. More...
 
#define M_UNICODE   0
 Whether the UNICODE version of the library has to be built or used. More...
 
#define M_NO_WCHAR_T   0
 Flag that disables all uses of type wchar_t, including unicode conversion functions and unicode strings. More...
 
#define M_NO_ENCODING   0
 Flag that disables character encoding and decoding. More...
 
#define M_NO_MESSAGE_CATALOG   0
 Flag that disables MessageCatalog and related internationalization facilities. More...
 
#define M_GLOBAL_MESSAGE_CATALOG_DOMAIN   "MeteringSDK"
 Domain string for global message catalog. More...
 
#define M_NO_DYNAMIC_LIBRARY   0
 Flag to enable or disable MDynamicLibrary class - wrapper for shared object (dll) API. More...
 
#define M_NO_VERBOSE_ERROR_INFORMATION   0
 No verbose error information significantly decreases the size of the executable image. More...
 
#define M_NO_XML   0
 Whether or not to support XML classes. More...
 
#define M_NO_LUA_COOPERATIVE_IO   1
 Whether to disable LUA cooperative multitasking at Input-Output. More...
 
#define M_USE_CRYPTODEV   0
 Whether to use /dev/crypto device as available in Linux. More...
 
#define M_USE_CRYPTOAPI   0
 Whether to use Microsoft Crypto API as available in Windows. More...
 
#define M_USE_OPENSSL   0
 Whether to use Open SSL library. More...
 
#define M_NO_JNI   0
 Whether to use Java Native Interface. More...
 
#define MCORE_PROJECT_COMPILING   0
 This macro has to be set to zero when MCORE is built. More...
 
#define M_EXPORTED_CLASS
 Class declared with this macro before the class name will be exported from compilation unit. More...
 
#define M_IMPORTED_CLASS
 Class declared with this macro before the class name will be imported into compilation unit. More...
 
#define M_EXPORTED_ABSTRACT_CLASS
 Abstract class declared with this macro before the class name will be exported from compilation unit. More...
 
#define M_IMPORTED_ABSTRACT_CLASS
 Abstract class declared with this macro before the class name will be imported into compilation unit. More...
 
#define M_EXPORTED_TEMPLATE_CLASS
 Template class declared with this macro before the class name will be exported from compilation unit. More...
 
#define M_IMPORTED_TEMPLATE_CLASS
 Template class declared with this macro before the class name will be imported into compilation unit. More...
 
#define M_EXPORTED_FUNC
 Function declared to be exported from the compilation unit. More...
 
#define M_IMPORTED_FUNC
 Function declared to be exported from the compilation unit. More...
 
#define M_NORETURN_FUNC
 Function declared to never return. More...
 
#define M_EXPORTED_C_FUNC   extern "C"
 Function with plain C calling convention declared to be exported from the compilation unit. More...
 
#define M_IMPORTED_C_FUNC   extern "C"
 Function with plain C calling convention declared to be exported from the compilation unit. More...
 
#define M_CDECL
 Specifies that the non-exported function shall have plain C calling convention. More...
 
#define M_UNUSED_FIELD
 Specifies that the field within class or record is not used. More...
 
#define M_UNUSED_TYPEDEF
 Specifies that the type definition that follows this macro is not used. More...
 
#define M_LITTLE_ENDIAN   1
 Macro that tells whether the current architecture is little endian or big endian. More...
 
#define M_DEBUG   1
 Portable debug macro. More...
 
#define M_NEW   new
 Macro M_NEW can be used in client applications in places where new is called without parameters. More...
 
#define M_ASSERT(e)   assert(e)
 Overloadable ASSERT macro, compatible with C language. More...
 
#define M_POINTER_BIT_SIZE   32
 Macro that tells the bit size of a pointer. More...
 
#define M_UNSIGNED_LONG_BIT_SIZE   64
 Macro that tells the bit size of an unsigned long value. More...
 
#define M_WCHAR_T_BIT_SIZE   32
 Macro that tells the bit size of wchar_t.
 
#define M_TIME_T_BIT_SIZE   M_POINTER_BIT_SIZE
 Macro that tells the bit size of time_t.
 
#define M_NUMBER_OF_ARRAY_ELEMENTS(x)   ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
 Compiler and operating system independent unsigned integer types. More...
 
#define M_DEFINE_TEMPLATE_CLASS(t)
 Compiler dependent way of instantiating templates. More...
 
#define M_USED_VARIABLE(v)   (void)(v)
 Declare that the given variable is used, possibly compiler-dependent. More...
 
#define M_NO_THROW
 Define no-throw clause for a function, compiler-dependent.
 
#define M_PRINTF_FORMAT(f, a)
 Declare that the function parameter is a printf format. More...
 
#define M_LL(str)   M_MACRO_CONCATENATE(L, str)
 A define that always expands to a long char string prefix L for a previously expanded parameter. More...
 
#define M_L(str)   str
 Legacy define that is used for strings, in this version it expands into string itself. More...
 
#define M_DIRECTORY_SEPARATOR   '\\'
 This define sets the OS-independent separator for directories.
 
#define M_MACRO_DUMMY(x)   x
 Helper macro that expands into its parameter. More...
 
#define M_MACRO_STRING(x)    M__DO_MACRO_STRING(x)
 Take a parameter of the macro and make a string out of it. More...
 
#define M_SDK_VERSION_STRING   M_MACRO_STRING(M_MACRO_CONCATENATE7(M_SDK_VERSION_MAJOR, ., M_SDK_VERSION_MIDDLE, ., M_SDK_VERSION_MINOR, ., M_SDK_VERSION_TAG))
 MeteringSDK version string separated by dots, loadable into MVersion class.
 
#define M_FILE_VERSION   M_PRODUCT_VERSION_MAJOR,M_PRODUCT_VERSION_MIDDLE,M_PRODUCT_VERSION_MINOR,M_PRODUCT_VERSION_TAG
 MeteringSDK file version literal, separated by commas, as used by Windows resource FILEVERSION. More...
 
#define M_PRODUCT_VERSION_STRING   M_MACRO_STRING(M_MACRO_CONCATENATE7(M_PRODUCT_VERSION_MAJOR, ., M_PRODUCT_VERSION_MIDDLE, ., M_PRODUCT_VERSION_MINOR, ., M_PRODUCT_VERSION_TAG))
 Product version string, can be defined in the configuration file or composed from entities there. More...
 
#define M_SDK_VERSION_MAJOR   6
 First number in MeteringSDK version number.
 
#define M_SDK_VERSION_MIDDLE   9
 Second number in MeteringSDK version number.
 
#define M_SDK_VERSION_MINOR   0
 Third number in MeteringSDK version number.
 
#define M_SDK_VERSION_TAG   8142
 Fourth number in MeteringSDK version number.
 
#define M_SDK_COPYRIGHT   "Copyright (c) 1997-2017 Elster Solutions"
 MeteringSDK copyright message.
 
#define M_ROUND_TO(type, d)   MRoundTo<type>(d)
 Round the floating number to the type specified as template parameter. More...
 
#define M_I_STR(s)    (MMessageCatalog::GetTextDefault(M_I(s)))
 Internationalization string that shall be localized. More...
 
#define M_DECLARE_CLASS(Class)
 This macro has to be defined in every MObject child at the end of the class definitions (because after it all the definitions become protected). More...
 
#define M_DECLARE_CLASS_EXACT(Class)
 This macro has to be defined in every MObject child at the end of the class definitions (because after it all the definitions become protected). More...
 
#define M_START_PROPERTIES(Class)   const MPropertyDefinition s__properties ## Class[] = {
 This macro has to be defined in every MObject child at the beginning of the class macro definitions. More...
 
#define M_CLASS_ENUMERATION(Class, Enumeration)   {# Enumeration, MVariant::VAR_INT, MClass::ST__NULL, MClass::ST__NULL, NULL, NULL, NULL, NULL, NULL, (int)(M ## Class::Enumeration)},
 Define the signed integer enumeration value within a class.
 
#define M_CLASS_ENUMERATION_UINT(Class, Enumeration)   {# Enumeration, MVariant::VAR_UINT, MClass::ST__NULL, MClass::ST__NULL, NULL, NULL, NULL, NULL, NULL, (int)(M ## Class::Enumeration)},
 Define the unsigned integer enumeration value within a class.
 
#define M_OBJECT_PROPERTY_PERSISTENT_BOOL(Class, Property, defaultValue)
 Define the object Boolean persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_BOOL(Class, Property)
 Define the object Boolean property. More...
 
#define M_OBJECT_PROPERTY_BOOL_EXACT(Class, Property)
 Define the object Boolean property. More...
 
#define M_OBJECT_PROPERTY_READONLY_BOOL(Class, Property)
 Define the object read-only Boolean property. More...
 
#define M_OBJECT_PROPERTY_READONLY_BOOL_EXACT(Class, Property)
 Define the object read-only Boolean property with the exact name. More...
 
#define M_CLASS_PROPERTY_BOOL(Class, Property)
 Define the class Boolean property. More...
 
#define M_CLASS_PROPERTY_READONLY_BOOL(Class, Property)
 Define the class read-only Boolean property. More...
 
#define M_CLASS_PROPERTY_READONLY_BOOL_EXACT(Class, Property)
 Define the class read-only Boolean property with the exact name. More...
 
#define M_OBJECT_PROPERTY_PERSISTENT_BYTE(Class, Property, defaultValue)
 Define the object Byte persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_PERSISTENT_CHAR(Class, Property, defaultValue)
 Define the object Char persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_BYTE(Class, Property)
 Define the object Byte property. More...
 
#define M_OBJECT_PROPERTY_CHAR(Class, Property)
 Define the object Char property. More...
 
#define M_OBJECT_PROPERTY_READONLY_BYTE(Class, Property)
 Define the object Byte property. More...
 
#define M_OBJECT_PROPERTY_READONLY_CHAR(Class, Property)
 Define the object Char property. More...
 
#define M_OBJECT_PROPERTY_PERSISTENT_INT(Class, Property, defaultValue)
 Define the object Integer persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_INT(Class, Property)
 Define the object Integer property. More...
 
#define M_OBJECT_PROPERTY_READONLY_INT(Class, Property)
 Define the object read-only Integer property. More...
 
#define M_OBJECT_PROPERTY_READONLY_INT_EXACT(Class, Property)
 Define the object read-only Integer property with exact name. More...
 
#define M_OBJECT_PROPERTY_PERSISTENT_UINT(Class, Property, defaultValue)
 Define the object Unsigned Integer persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_UINT(Class, Property)
 Define the object Unsigned Integer property. More...
 
#define M_OBJECT_PROPERTY_READONLY_UINT(Class, Property)
 Define the object read-only Unsigned Integer property. More...
 
#define M_CLASS_PROPERTY_INT(Class, Property)
 Define the class Unsigned Integer property. More...
 
#define M_CLASS_PROPERTY_READONLY_INT(Class, Property)
 Define the class read-only Unsigned Integer property. More...
 
#define M_CLASS_PROPERTY_UINT(Class, Property)
 Define the class Unsigned Integer property. More...
 
#define M_CLASS_PROPERTY_READONLY_UINT(Class, Property)
 Define the class read-only Unsigned Integer property. More...
 
#define M_OBJECT_PROPERTY_PERSISTENT_DOUBLE(Class, Property, defaultValue)
 Define the object Double persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_DOUBLE(Class, Property)
 Define the object double precision property. More...
 
#define M_OBJECT_PROPERTY_READONLY_DOUBLE(Class, Property)
 Define the object read-only double precision property. More...
 
#define M_CLASS_PROPERTY_READONLY_DOUBLE(Class, Property)
 Define the object read-only double precision property. More...
 
#define M_OBJECT_PROPERTY_PERSISTENT_BYTE_STRING(Class, Property, defaultValue, defaultValueLen, getMethodSignature, putMethodSignature)
 Define the object byte string persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_BYTE_STRING(Class, Property, getMethodSignature, putMethodSignature)
 Define the object byte string property. More...
 
#define M_OBJECT_PROPERTY_READONLY_BYTE_STRING(Class, Property, getMethodSignature)
 Define the object read-only byte string property. More...
 
#define M_OBJECT_PROPERTY_PERSISTENT_STRING(Class, Property, defaultValue, getMethodSignature, putMethodSignature)
 Define the object string persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_STRING(Class, Property, getMethodSignature, putMethodSignature)
 Define the object byte string property. More...
 
#define M_OBJECT_PROPERTY_STRING_EXACT(Class, Property, getMethodSignature, putMethodSignature)
 Define the object byte string property. More...
 
#define M_OBJECT_PROPERTY_READONLY_STRING(Class, Property, getMethodSignature)
 Define the object read-only byte string property. More...
 
#define M_OBJECT_PROPERTY_READONLY_STRING_EXACT(Class, Property, getMethodSignature)
 Define the object read-only byte string property. More...
 
#define M_CLASS_PROPERTY_STRING(Class, Property, getMethodSignature, putMethodSignature)
 Define the class String property. More...
 
#define M_CLASS_PROPERTY_READONLY_STRING(Class, Property, getMethodSignature)
 Define the class read-only String property. More...
 
#define M_OBJECT_PROPERTY_STRING_COLLECTION(Class, Property, getMethodSignature)
 Define the object byte string property. More...
 
#define M_OBJECT_PROPERTY_BYTE_STRING_COLLECTION(Class, Property, getMethodSignature)
 Define the object byte string property. More...
 
#define M_OBJECT_PROPERTY_READONLY_STRING_COLLECTION(Class, Property, getMethodSignature)
 Define the object read-only byte string property. More...
 
#define M_OBJECT_PROPERTY_READONLY_VARIANT_COLLECTION(Class, Property, getMethodSignature)
 Define the object read-only byte string property. More...
 
#define M_OBJECT_PROPERTY_VARIANT(Class, Property, getMethodSignature)
 Define the object property of type MVariant. More...
 
#define M_OBJECT_PROPERTY_PERSISTENT_VARIANT(Class, Property, defaultValue, getMethodSignature, putMethodSignature)
 Define the object variant persistent property with default value. More...
 
#define M_OBJECT_PROPERTY_VARIANT_EXACT(Class, Property, getMethodSignature)
 Define the object property of type MVariant. More...
 
#define M_OBJECT_PROPERTY_READONLY_VARIANT(Class, Property, getMethodSignature)
 Define the object read-only variant property. More...
 
#define M_OBJECT_PROPERTY_READONLY_VARIANT_EXACT(Class, Property, getMethodSignature)
 Define the object read-only variant property, exact name. More...
 
#define M_CLASS_PROPERTY_READONLY_VARIANT(Class, Property, getMethodSignature)
 Define the embedded read-only class property. More...
 
#define M_CLASS_PROPERTY_READONLY_VARIANT_EXACT(Class, Property, getMethodSignature)
 Define the embedded read-only class property with the exact name. More...
 
#define M_OBJECT_PROPERTY_OBJECT(Class, Property)
 Define the object property. More...
 
#define M_OBJECT_PROPERTY_OBJECT_OVERLOADED(Class, Property, GetPropertyImpl, SetPropertyImpl)
 Define the object property with the explicit name. More...
 
#define M_OBJECT_PROPERTY_READONLY_OBJECT(Class, Property)
 Define the object read-only object property. More...
 
#define M_CLASS_PROPERTY_READONLY_OBJECT(Class, Property)
 Define the object read-only object property. More...
 
#define M_OBJECT_PROPERTY_READONLY_OBJECT_EXACT(Class, Property)
 Define the object read-only object property with the exact name. More...
 
#define M_OBJECT_PROPERTY_OBJECT_EMBEDDED(Class, Property, getMethodSignature)
 Define the embedded object property. More...
 
#define M_OBJECT_PROPERTY_READONLY_OBJECT_EMBEDDED(Class, Property, getMethodSignature)
 Define the embedded read-only object property. More...
 
#define M_OBJECT_PROPERTY_READONLY_OBJECT_EMBEDDED_EXACT(Class, Property, getMethodSignature)
 Define the embedded read-only object property with the exact name. More...
 
#define M_CLASS_PROPERTY_READONLY_OBJECT_EMBEDDED(Class, Property, getMethodSignature)
 Define the embedded read-only object property with the exact name. More...
 
#define M_CLASS_PROPERTY_READONLY_OBJECT_EMBEDDED_EXACT(Class, Property, getMethodSignature)
 Define the embedded read-only object property with the exact name. More...
 
#define M_CLASS_PROPERTY_READONLY_STRING_COLLECTION(Class, Property, getMethodSignature)
 Define the object read-only byte string property. More...
 
#define M_START_METHODS(Class)
 This macro has to be defined in every MObject child in the class macro definitions. More...
 
#define M_OBJECT_SERVICE(Class, Service, serviceType)   {# Service, -1, MClass::serviceType, (MObject::Method)&M ## Class::Service, NULL},
 Define the object service. More...
 
#define M_OBJECT_SERVICE_NAMED(Class, Service, ServiceImpl, serviceType)   {# Service, -1, MClass::serviceType, (MObject::Method)&M ## Class::ServiceImpl, NULL},
 Define the object service with a name different than the implementation. More...
 
#define M_OBJECT_SERVICE_OVERLOADED(Class, Service, ServiceImpl, numParameters, serviceType)   {# Service, numParameters, MClass::serviceType, (MObject::Method)&M ## Class::ServiceImpl, NULL},
 Define the object service with the explicit name and number of parameters. More...
 
#define M_CLASS_SERVICE(Class, Service, serviceType)   {# Service, -1, MClass::serviceType, NULL, (MClass::Method)&M ## Class::Service},
 Define the class service. More...
 
#define M_CLASS_SERVICE_OVERLOADED(Class, Service, ServiceImpl, numParameters, serviceType)   {# Service, numParameters, MClass::serviceType, NULL, (MClass::Method)&M ## Class::ServiceImpl},
 Define the class service with the explicit name and number of parameters. More...
 
#define M_CLASS_FRIEND_SERVICE(Class, Service, FriendService, serviceType)   {# Service, -1, MClass::serviceType, NULL, (MClass::Method)&FriendService},
 Define the friend class service. More...
 
#define M_CLASS_FRIEND_SERVICE_OVERLOADED(Class, Service, FriendService, numParameters, serviceType)   {# Service, numParameters, MClass::serviceType, NULL, (MClass::Method)&FriendService},
 Define the class service with the explicit name and number of parameters. More...
 
#define M_END_CLASS(Class, Parent)
 Complete the definitions for the class. More...
 
#define M_END_CLASS_EXACT(Class, Parent)
 Complete the definitions for the class with the exact given name. More...
 
#define M_END_CLASS_TYPED(Class, Parent, Type)
 Complete the definitions for the typed class (one which type name is different from class name. More...
 
#define M_SET_PERSISTENT_PROPERTIES_TO_DEFAULT(Class)   DoSetPersistentPropertiesToDefault(&s_class)
 Set all persistent properties of this object and all its parents to default values. More...
 
#define M_LINK_THE_CLASS_IN(Class)    const MClass* _linkWith ## Class = Class::GetStaticClass();
 This macro ensures the reflected class gets linked even though the linker would place it away.
 
#define M_SHARED_POINTER_CLASS(C)
 Macro that should be defined at the end of the class, which is the client of MSharedPointer. More...
 
#define M_SHARED_POINTER_CLASS_INIT   m_numRefs(0)
 Macro that should be defined at the initialization section of constructor for the shared class. More...
 
#define M_RTTI_SUPPORTED   1
 Macro M_RTTI_SUPPORTED will tell the best guess if RTTI is supported by the current compiler and its options. More...
 
#define M_CHECKED_CAST(t, p)    (static_cast<t>(p))
 Casting nonzero pointers statically, with check on debug time. More...
 
#define M_CHECKED_CAST_OR_NULL(t, p)    (static_cast<t>(p))
 Casting possibly zero pointers statically, with check on debug time. More...
 
#define M_DYNAMIC_CAST(c, o)    MDoObjectDynamicCast<c>(o)
 Pointer-based variation of the standard dynamic cast for objects, not NULL, usable for MObject children. More...
 
#define M_DYNAMIC_CONST_CAST(c, o)    MDoObjectDynamicCast<const c>(o)
 Constant version of pointer-based variation of the standard dynamic cast for objects, not NULL, usable for MObject children. More...
 
#define M_DYNAMIC_CAST_WITH_NULL_CHECK(c, o)    MDoObjectDynamicCastWithNullCheck<c>(o)
 Pointer-based variation of the standard dynamic cast for objects or NULL, usable for MObject children. More...
 
#define M_DYNAMIC_CONST_CAST_WITH_NULL_CHECK(c, o)    MDoObjectDynamicCastWithNullCheck<const c>(o)
 Constant version of pointer-based variation of the standard dynamic cast for objects or NULL, usable for MObject children. More...
 
#define M_DYNAMIC_CAST_WITH_THROW(c, o)    MDoObjectDynamicCastWithThrow<c>(o)
 Pointer-based variation of the standard dynamic cast for objects, not NULL, usable for MObject children. More...
 
#define M_DYNAMIC_CONST_CAST_WITH_THROW(c, o)    MDoObjectDynamicCastWithThrow<const c>(o)
 Constant version of pointer-based variation of the standard dynamic cast for objects, not NULL, usable for MObject children. More...
 
#define M_64_CAST(type, value)    MDo64Cast<type>(value)
 32-bit OS only: Cast 64-bit integral type into 32-bit integral type with check whether the conversion lost any bits. More...
 

Typedefs

typedef char * MChars
 Pointer to zero terminated character array that represents a readable text.
 
typedef const char * MConstChars
 Pointer to zero terminated constant character array that represents a readable text. More...
 
typedef char MChar
 Type for a single human readable character, legacy define. More...
 
typedef unsigned char MUnsignedChar
 Type for single unsigned character.
 
typedef const signed char * MConstLocalChars
 Pointer to zero-terminated constant ASCII characters that are to be localized. More...
 
typedef std::string MByteString
 Byte string, used for byte buffer handling purpose. More...
 
typedef std::string MStdString
 Plain standard character string in utf-8 encoding. More...
 
typedef std::string MAnsiString
 Legacy define, equivalent of MStdString. More...
 
typedef std::wstring MWideString
 UNICODE-based wide character string. More...
 
typedef std::vector< MStdStringMStdStringVector
 Vector of standard strings.
 
typedef std::vector< MByteStringMByteStringVector
 Vector of byte strings.
 

Functions

M_FUNC unsigned MGetRuntimeOSMask ()
 Get the OS platform code, determined at runtime. More...
 
M_FUNC MStdString MToStdString (Mint64 value)
 Convert the long value to a standard string. More...
 
M_FUNC MStdString MToStdString (Muint64 value)
 Convert the unsigned long value to a standard string. More...
 
M_FUNC MStdString MToStdString (int value)
 Convert the long value to a string standard string. More...
 
M_FUNC MStdString MToStdString (unsigned value)
 Convert the unsigned long value to a standard string. More...
 
MStdString MToStdString (long value)
 Convert the long value to a standard string. More...
 
MStdString MToStdString (unsigned long value)
 Convert the unsigned long value to a standard string. More...
 
M_FUNC MStdString MToStdString (double value, bool shortestFormat=false, unsigned precision=14)
 Convert the double precision floating point value to string. More...
 
const MStdStringMToStdString (const MByteString &s)
 Convert the byte string value to a string. More...
 
M_FUNC MWideString MToWideString (const char *str)
 Convert the zero terminated constant character pointer to the standard wide string according to the current locale. More...
 
M_FUNC MWideString MToWideString (const wchar_t *str)
 Convert the zero terminated constant wide character pointer to the standard ANSI string according to the current locale. More...
 
M_FUNC MWideString MToWideString (const char *buff, size_t size)
 Convert the constant character pointer to the standard wide string according to the current locale. More...
 
M_FUNC MStdString MToStdString (const wchar_t *buff, size_t size)
 Convert the constant character pointer to the standard ANSI string according to the current locale. More...
 
M_FUNC MWideString MToWideString (const MStdString &)
 Convert the standard ASCII string to the standard wide string according to the current locale. More...
 
M_FUNC MStdString MToStdString (const MWideString &)
 Convert the standard wide string to the standard ASCII string according to the current locale. More...
 
M_FUNC MStdString MToStdString (const char *)
 Convert the constant character pointer to the standard string, whether that is a UNICODE or plain character string. More...
 
M_FUNC MStdString MToStdString (const char *, size_t size)
 Convert the constant character pointer and size to the standard string, whether that is a UNICODE or plain character string.
 
M_FUNC MStdString MToStdString (const wchar_t *)
 Convert the constant wide character pointer to the standard string, whether that is a UNICODE or plain character string. More...
 
void MEncryptDecryptLite (char *dest, const char *src, unsigned size)
 Lite pseudo-encryption-decryption algorithm. More...
 
Muint16 MSwapUINT16 (unsigned val)
 Swap all bytes of 2-byte value.
 
Muint32 MSwapUINT24 (unsigned val)
 Swap all bytes of 3-byte value, return it as 32-bit value due to computer architecture restriction.
 
Muint32 MSwapUINT32 (Muint32 val)
 Swap all bytes of 4-byte value.
 
Muint16 MToBigEndianUINT16 (unsigned val)
 Convert a two-byte value to a big endian value. More...
 
void MToBigEndianUINT16 (unsigned val, void *twoBytes)
 Convert a two-byte value to a big endian value denoted by a given pointer. More...
 
unsigned MFromBigEndianUINT16 (Muint16 val)
 Convert a big endian two-byte value to the value which is handled by the current computer architecture. More...
 
unsigned MFromBigEndianUINT16 (const void *twoBytes)
 Convert a big endian two-byte value given as its address to the value which is handled by the current computer architecture. More...
 
Muint32 MToBigEndianUINT24 (Muint32 val)
 Convert a 32 byte unsigned integer value to a big endian value which is 24 bits long. More...
 
void MToBigEndianUINT24 (unsigned val, void *threeBytes)
 Convert a three-byte value to a big endian value denoted by a given pointer. More...
 
Muint32 MFromBigEndianUINT24 (Muint32 val)
 Convert a big endian three-byte value to the value which is handled by the current computer architecture. More...
 
Muint32 MFromBigEndianUINT24 (const void *threeBytes)
 Convert a big endian three-byte value given as byte string to the value which is handled by the current computer architecture. More...
 
Muint32 MToBigEndianUINT32 (Muint32 val)
 Convert a 32 byte unsigned integer value to a big endian 32-bit value.
 
void MToBigEndianUINT32 (unsigned val, void *fourBytes)
 Convert a four-byte value to a big endian value denoted by a given pointer. More...
 
Muint32 MFromBigEndianUINT32 (Muint32 val)
 Convert a big endian 4-byte value to the value which is handled by the current computer architecture. More...
 
Muint32 MFromBigEndianUINT32 (const void *fourBytes)
 Convert a big endian 4-byte value given as const void pointer according to the current computer architecture. More...
 
Muint16 MToLittleEndianUINT16 (unsigned val)
 Convert a two-byte value to a little endian value. More...
 
void MToLittleEndianUINT16 (unsigned val, void *twoBytes)
 Convert a two-byte value to a little endian value denoted by a given pointer. More...
 
unsigned MFromLittleEndianUINT16 (Muint16 val)
 Convert a two-byte little endian value to the value which is handled by the current computer architecture. More...
 
unsigned MFromLittleEndianUINT16 (const void *twoBytes)
 Convert a two-byte little endian value given as address to the value which is handled by the current computer architecture. More...
 
Muint32 MToLittleEndianUINT24 (Muint32 val)
 Convert a 32 byte unsigned integer value to a little endian value which is 24 bits long. More...
 
void MToLittleEndianUINT32 (unsigned val, void *fourBytes)
 Convert a four-byte value to a little endian value denoted by a given pointer. More...
 
unsigned MFromLittleEndianUINT32 (const void *fourBytes)
 Convert a four-byte little endian value given as address to the value which is handled by the current computer architecture. More...
 
void MToLittleEndianUINT64 (Muint64 val, void *eightBytes)
 Convert an eight-byte value to a little endian value denoted by a given pointer. More...
 
Muint64 MFromLittleEndianUINT64 (const void *eightBytes)
 Convert an eight-byte little endian value given as address to Muint64 value which is handled by the current computer architecture. More...
 
Muint16 MToAlignedUINT16 (const void *twoBytes)
 Convert two bytes in a pointer, given as pointer, into a 16 byte unsigned integer value. More...
 
Muint32 MToAlignedUINT32 (const void *fourBytes)
 Convert two bytes in a pointer, given as pointer. More...
 
M_FUNC void MAddDirectorySeparatorIfNecessary (MStdString &directory)
 Add a directory separator if it is not at the end of the path (directory). More...
 
bool MPointerIsNull (const void *ptr)
 Silent way of checking if a given pointer is not null. More...
 
template<class Type >
bool MReferenceIsNull (const Type &ref)
 Silent way of checking if a given reference is actually a null pointer. More...
 
template<typename T >
MRoundTo (double d)
 Round the floating number to the type specified as template parameter. More...
 

Variables

const MErrorEnum::Type M_ERR_BAD_TIME_VALUE = static_cast<MErrorEnum::Type>(0x8004040B)
 Text: "Time value is bad".
 
const MErrorEnum::Type M_ERR_REGEXP_TOO_BIG = static_cast<MErrorEnum::Type>(0x8004040C)
 Text: "Regular expression is too big".
 
const MErrorEnum::Type M_ERR_REGEXP_TOO_MANY_PARENTHESES = static_cast<MErrorEnum::Type>(0x8004040D)
 Text: "Regular expression has too many parentheses".
 
const MErrorEnum::Type M_ERR_REGEXP_UNTERMINATED_PARENTHESES = static_cast<MErrorEnum::Type>(0x8004040E)
 Text: "Regular expression has unterminated parentheses '('".
 
const MErrorEnum::Type M_ERR_REGEXP_UNMATCHED_PARENTHESES = static_cast<MErrorEnum::Type>(0x8004040F)
 Text: "Regular expression has unmatched parentheses ')'".
 
const MErrorEnum::Type M_ERR_REGEXP_OP_COULD_BE_EMPTY = static_cast<MErrorEnum::Type>(0x80040410)
 Text: "Regular expression operand '*+' could be empty".
 
const MErrorEnum::Type M_ERR_REGEXP_NESTED_OP = static_cast<MErrorEnum::Type>(0x80040411)
 Text: "Regular expression has nested '*?+'".
 
const MErrorEnum::Type M_ERR_REGEXP_INVALID_RANGE = static_cast<MErrorEnum::Type>(0x80040412)
 Text: "Regular expression has invalid range within '[]'".
 
const MErrorEnum::Type M_ERR_REGEXP_UNMATCHED_BRACE = static_cast<MErrorEnum::Type>(0x80040413)
 Text: "Regular expression has unmatched '[]'".
 
const MErrorEnum::Type M_ERR_REGEXP_OP_FOLLOWS_NOTHING = static_cast<MErrorEnum::Type>(0x80040414)
 Text: "Regular expression has '?', '+' or '*' that follows nothing".
 
const MErrorEnum::Type M_ERR_REGEXP_TRAILING_ESC = static_cast<MErrorEnum::Type>(0x80040415)
 Text: "Regular expression has trailing '\\'".
 
const MErrorEnum::Type M_ERR_SYNTAX_ERROR_IN_S1 = static_cast<MErrorEnum::Type>(0x80040423)
 Text: "Syntax error in '%s'".
 
const MErrorEnum::Type M_ERR_DIVISION_BY_ZERO = static_cast<MErrorEnum::Type>(0x80040427)
 Text: "Division by zero".
 
const MErrorEnum::Type M_ERR_UNEXPECTED_CHARACTER_C1 = static_cast<MErrorEnum::Type>(0x80040430)
 Text: "Unexpected character '%c'" Text: "Unexpected character with code 0x%X". More...
 
const MErrorEnum::Type M_ERR_UNTERMINATED_STRING = static_cast<MErrorEnum::Type>(0x80040441)
 Text: "Unterminated string".
 
const MErrorEnum::Type M_ERR_INVALID_OPERATION_DURING_ACTIVE_BACKGROUND_COMMUNICATION = static_cast<MErrorEnum::Type>(0x80040458)
 Text: "Invalid operation during active background communication".
 
const MErrorEnum::Type M_ERR_UNKNOWN_CHANNEL_S1 = static_cast<MErrorEnum::Type>(0x80040462)
 Text: "Channel '%s' is unknown".
 
const MErrorEnum::Type M_ERR_UNKNOWN_PROTOCOL_S1 = static_cast<MErrorEnum::Type>(0x80040463)
 Text: "Protocol '%s' is unknown".
 
const MErrorEnum::Type M_ERR_INVALID_OR_UNSUPPORTED_PARITY_U1 = static_cast<MErrorEnum::Type>(0x80040476)
 Text: "Invalid or unsupported parity %u".
 
const MErrorEnum::Type M_ERR_INVALID_OR_UNSUPPORTED_NUMBER_OF_STOP_BITS_U1 = static_cast<MErrorEnum::Type>(0x80040477)
 Text: "Invalid or unsupported number of stop bits %u".
 
const MErrorEnum::Type M_ERR_INVALID_OR_UNSUPPORTED_NUMBER_OF_DATA_BITS_U1 = static_cast<MErrorEnum::Type>(0x80040478)
 Text: "Invalid or unsupported number of data bits %u".
 
const MErrorEnum::Type M_ERR_PASSWORD_SHOULD_BE_NO_MORE_THAN_D1_BYTES_LONG = static_cast<MErrorEnum::Type>(0x80040483)
 Text: "Password should be no more than %d bytes long".
 
const MErrorEnum::Type M_ERR_AUTHENTICATION_KEY_IS_EXPECTED_TO_BE_D1_BYTES_LONG = static_cast<MErrorEnum::Type>(0x80040484)
 Text: "Authentication key is expected to be %d bytes long".
 
const MErrorEnum::Type M_ERR_USER_NAME_SHOULD_BE_NO_MORE_THAN_D1_BYTES_LONG = static_cast<MErrorEnum::Type>(0x80040486)
 Text: "User name should be no more than %d bytes long".
 
const MErrorEnum::Type M_ERR_CANNOT_CONNECT_CHANNEL_S1_IS_ALREADY_CONNECTED = static_cast<MErrorEnum::Type>(0x80040487)
 Text: "Cannot connect channel '%s' because it is already connected".
 
const MErrorEnum::Type M_ERR_EXPECTED_X1_GOT_X2 = static_cast<MErrorEnum::Type>(0x8004048C)
 Text: "Expected character 0x%02X, received 0x%02X".
 
const MErrorEnum::Type M_ERR_ENUMERATION_S1_CANNOT_BE_ASSIGNED_TO = static_cast<MErrorEnum::Type>(0x800404B2)
 Text: "Enumeration value '%s' cannot be assigned to".
 
const MErrorEnum::Type M_ERR_CANNOT_SET_READONLY_PROPERTY_S1 = static_cast<MErrorEnum::Type>(0x800404B3)
 Text: "Cannot set readonly property '%s'".
 
const MErrorEnum::Type M_ERR_WAIT_PERIOD_U1_IS_BIGGER_THAN_MAXIMUM_255 = static_cast<MErrorEnum::Type>(0x800404C1)
 Text: "Requested wait period %u is bigger than supported maximum of 255 seconds".
 
const MErrorEnum::Type M_ERR_TIMED_OUT_WHILE_WAITING_FOR_CONNECTION = static_cast<MErrorEnum::Type>(0x800404C2)
 Text: "Timed out while waiting for connection by modem" Text: "Timed out while waiting for incoming socket connection".
 
const MErrorEnum::Type M_ERR_CHANNEL_NOT_IN_ANSWER_MODE = static_cast<MErrorEnum::Type>(0x800404C6)
 Text: "Channel is expected to be in answer mode".
 
const MErrorEnum::Type M_ERR_DTR_CONTROL_WITH_CODE_X1_IS_NOT_KNOWN = static_cast<MErrorEnum::Type>(0x800404C7)
 Text: "DTR control character with code 0x%X is not known, expected E, D, or H".
 
const MErrorEnum::Type M_ERR_RTS_CONTROL_WITH_CODE_X1_IS_NOT_KNOWN = static_cast<MErrorEnum::Type>(0x800404C8)
 Text: "RTS control character with code 0x%X is not known, expected E, D, H, or T".
 
const MErrorEnum::Type M_ERR_CANNOT_CONVERT_CHARACTER_WITH_CODE_X1_INTO_HEX = static_cast<MErrorEnum::Type>(0x800404D2)
 Text: "Cannot convert character with code 0x%X into a hexadecimal number".
 
const MErrorEnum::Type M_ERR_WIDE_CHARACTER_WITH_CODE_X1_IN_PLACE_WHERE_ONLY_ANSI_ALLOWED = static_cast<MErrorEnum::Type>(0x800404D3)
 Text: "Wide character with code 0x%X encountered in place where only eight-bit characters allowed".
 
const MErrorEnum::Type M_ERR_RESPONSE_FROM_TABLE8_IS_LESS_THAN_FOUR_BYTES = static_cast<MErrorEnum::Type>(0x800404DC)
 Text: "Protocol violation, response from table 8 is less than four bytes".
 
const MErrorEnum::Type M_ERR_BAD_VALUE_FOR_DSP_TYPE = static_cast<MErrorEnum::Type>(0x800404E4)
 Text: "Bad value for DSP type".
 
const MErrorEnum::Type M_ERR_INCOMPATIBILITY_IN_TABLE_SIZE_OR_CONTENTS_DURING_IDENTIFY = static_cast<MErrorEnum::Type>(0x800404E7)
 Text: "Incompatibility in table size or contents, cannot identify the meter".
 
const MErrorEnum::Type M_ERR_ATTEMPT_TO_CHANGE_OBJECT_TYPE_FROM_S1_TO_S2 = static_cast<MErrorEnum::Type>(0x800404E8)
 Text: "Attempt to change object type from '%s' to '%s'".
 
const MErrorEnum::Type M_ERR_SUPPLY_EVEN_NUMBER_OF_HEX_CHARACTERS_TWO_FOR_EACH_BYTE = static_cast<MErrorEnum::Type>(0x8004050F)
 Text: "Supply even number of hexadecimal characters, two for each byte".
 
const MErrorEnum::Type M_ERR_PROPERTY_S1_IS_NOT_PERSISTENT_AND_HAS_NO_DEFAULT_VALUE = static_cast<MErrorEnum::Type>(0x800407EC)
 Text: "Property '%s' is not persistent and it has no default value".
 
const MErrorEnum::Type M_ERR_THREAD_SHOULD_FINISH_EXECUTION_TO_GET_RESULT = static_cast<MErrorEnum::Type>(0x800407F5)
 Text: "Thread should finish execution to get its result".
 
const MErrorEnum::Type M_ERR_ISO8825_BINARY_REPRESENTATION_OF_UNIVERSAL_IDENTIFIER_IS_BAD = static_cast<MErrorEnum::Type>(0x800407F6)
 Text: "ISO 8825 binary representation of universal identifier is bad".
 
const MErrorEnum::Type M_ERR_ISO8825_STRING_REPRESENTATION_OF_UNIVERSAL_IDENTIFIER_IS_BAD = static_cast<MErrorEnum::Type>(0x800407F7)
 Text: "ISO 8825 string representation of universal identifier is bad".
 
const MErrorEnum::Type M_ERR_ISO8825_LENGTH_IS_BAD = static_cast<MErrorEnum::Type>(0x800407F8)
 Text: "ISO 8825 length is bad".
 
const MErrorEnum::Type M_ERR_ISO8825_SHORT_LENGTH_IS_BAD = static_cast<MErrorEnum::Type>(0x800407F9)
 Text: "ISO 8825 short length is bad, does not fit in one byte".
 
const MErrorEnum::Type M_ERR_OBJECT_PROPERTY_S1_CANNOT_BE_GOT_FROM_A_CLASS_WITHOUT_OBJECT = static_cast<MErrorEnum::Type>(0x80040804)
 Text: "Object property '%s' cannot be got from a class, without object".
 
const MErrorEnum::Type M_ERR_OBJECT_PROPERTY_S1_CANNOT_BE_SET_TO_A_CLASS_WITHOUT_OBJECT = static_cast<MErrorEnum::Type>(0x80040805)
 Text: "Object property '%s' cannot be set to a class, without object".
 
const MErrorEnum::Type M_ERR_SERVICE_S1_CANNOT_BE_CALLED_WITHOUT_OBJECT = static_cast<MErrorEnum::Type>(0x80040807)
 Text: "Service '%s' cannot be called without object".
 
const MErrorEnum::Type M_ERR_SERVICE_S1_DOES_NOT_HAVE_D2_PARAMETERS = static_cast<MErrorEnum::Type>(0x80040808)
 Text: "Service '%s' does not have %d parameters". More...
 
const MErrorEnum::Type M_ERR_UNKNOWN_XML_ESCAPE_SEQUENCE_S1 = static_cast<MErrorEnum::Type>(0x80040809)
 Text: "Unknown XML sequence '%s'".
 
const MErrorEnum::Type M_ERR_BAD_VERSION_NUMBER_FORMAT_S1 = static_cast<MErrorEnum::Type>(0x8004080A)
 Text: "Bad version number format '%s'".
 
const MErrorEnum::Type M_ERR_OPERATION_NOT_SUPPORTED_FOR_THIS_TYPE = static_cast<MErrorEnum::Type>(0x8004080F)
 Text: "Operation not supported for this type".
 
const MErrorEnum::Type M_ERR_OVERFLOW_IN_OPERATION_S1 = static_cast<MErrorEnum::Type>(0x80040810)
 Text: "Overflow in operation '%s'".
 
const MErrorEnum::Type M_ERR_UNDERFLOW_IN_OPERATION_S1 = static_cast<MErrorEnum::Type>(0x80040811)
 Text: "Underflow in operation '%s'".
 
const MErrorEnum::Type M_ERR_BINARY_OPERATION_BETWEEN_INCOMPATIBLE_ARGUMENTS = static_cast<MErrorEnum::Type>(0x80040820)
 Text: "Binary operation between incompatible arguments".
 
const MErrorEnum::Type M_ERR_SIZES_OF_ITEMS_ARE_DIFFERENT_D1_AND_D2 = static_cast<MErrorEnum::Type>(0x80040827)
 Text: "Sizes of items are different, %d and %d".
 
const MErrorEnum::Type M_ERR_BAD_RAD40_CHARACTER_S1 = static_cast<MErrorEnum::Type>(0x80040828)
 Text: "Character '%s' is not allowed in RAD40".
 
const MErrorEnum::Type M_ERR_DICTIONARY_DOES_NOT_HAVE_KEY_S1 = static_cast<MErrorEnum::Type>(0x8004082A)
 Text: "The dictionary does not have key '%s'".
 
const MErrorEnum::Type M_ERR_COULD_NOT_CAST_OBJECT_OF_TYPE_S1_TO_S2 = static_cast<MErrorEnum::Type>(0x80040830)
 Text: "Could not cast object of type '%s' to '%s'".
 
const MErrorEnum::Type M_ERR_TIME_FUNCTION_ERROR = static_cast<MErrorEnum::Type>(0x80040863)
 Text: "Time function error".
 
const MErrorEnum::Type M_ERR_RECURRENT_TIME_OFFSET_D1_IS_NOT_SUPPORTED_BY_OS = static_cast<MErrorEnum::Type>(0x80040864)
 Text: "Recurrent time offset %d is not supported by OS".
 
const MErrorEnum::Type M_ERR_PARAMETER_D1_TYPE_MISMATCH = static_cast<MErrorEnum::Type>(0x8004086C)
 Text: "Parameter %d type mismatch".
 
const MErrorEnum::Type M_ERR_PARAMETER_D1_NOT_FOUND = static_cast<MErrorEnum::Type>(0x8004086D)
 Text: "Parameter %d not found".
 
const MErrorEnum::Type M_ERR_EXTERNAL_APPLICATION_EXCEPTION_CODE_D1 = static_cast<MErrorEnum::Type>(0x8004086E)
 Text: "External application exception, code %d".
 
const MErrorEnum::Type M_ERR_EXTERNAL_APPLICATION_EXCEPTION_CODE_D1_MESSAGE_S2 = static_cast<MErrorEnum::Type>(0x8004086F)
 Text: "External application exception, code %d, message: %s".
 
const MErrorEnum::Type M_ERR_SINGLE_DIMENSION_ARRAY_IS_REQUIRED = static_cast<MErrorEnum::Type>(0x80040870)
 Text: "Single dimension array is required".
 
const MErrorEnum::Type M_ERR_ARGUMENT_S1_IS_NOT_OPTIONAL = static_cast<MErrorEnum::Type>(0x80040871)
 Text: "Argument '%s' is not optional".
 
const MErrorEnum::Type M_ERR_REGEXP_IS_NOT_COMPILED = static_cast<MErrorEnum::Type>(0x80040872)
 Text: "Regular expression is not compiled".
 
const MErrorEnum::Type M_ERR_INVALID_HEX_FORMAT = static_cast<MErrorEnum::Type>(0x80040876)
 Text: "Invalid HEX display format: '%s'".
 
const MErrorEnum::Type M_ERR_TIME_SPAN_TOO_LARGE_CANNOT_BE_REPRESENTED = static_cast<MErrorEnum::Type>(0x8004087A)
 Text: "Time span too large - cannot be represented".
 
const MErrorEnum::Type M_ERR_TIME_ZONE_S1_NOT_FOUND = static_cast<MErrorEnum::Type>(0x80040888)
 Text: "Time zone '%s' is not found".
 
const MErrorEnum::Type M_ERR_BAD_STREAM_FLAG = static_cast<MErrorEnum::Type>(0x8004088C)
 Text: "Scrambled stream '%s' cannot be opened for reading and writing simultaneously" Text: "Stream '%s' cannot be mangled and encrypted at the same time" Text: "Stream '%s' cannot be opened for reading with both UseHeader and any of obfuscation flags".
 
const MErrorEnum::Type M_ERR_ENTRY_NOT_FOUND = static_cast<MErrorEnum::Type>(0x80040892)
 Text "Entry not found".
 
const MErrorEnum::Type M_ERR_FILE_PATH_TOO_LONG = static_cast<MErrorEnum::Type>(0x80040893)
 Text "File path too long".
 
const MErrorEnum::Type M_ERR_FIND_ARGUMENT_IS_BAD = static_cast<MErrorEnum::Type>(0x80040894)
 Text "Argument of File Find method is bad".
 
const MErrorEnum::Type M_ERR_SIZE_OF_NUMBER_OUTSIDE_RANGE = static_cast<MErrorEnum::Type>(0x80040898)
 Text "Size of byte string representation of a number shall be in range 1 to 8" Text "Key size is expected to be 16 bytes".
 
const MErrorEnum::Type M_ERR_BAD_GUID_FORMAT = static_cast<MErrorEnum::Type>(0x8004089E)
 Format of GUID is bad. More...
 
const MErrorEnum::Type M_ERR_CONFIGURATION_NOT_OPEN = static_cast<MErrorEnum::Type>(0x800408A0)
 Text: "Registry not open".
 
const MErrorEnum::Type M_ERR_CANNOT_SET_TO_SUCH_NODE = static_cast<MErrorEnum::Type>(0x800408A3)
 Text: "Cannot set name to node of this type" Text: "Cannot set value to node of this type".
 
const MErrorEnum::Type M_ERR_PACKET_IS_TOO_BIG = static_cast<MErrorEnum::Type>(0x800408A4)
 Text: "The outgoing packet does not fit into datagram".
 
const MErrorEnum::Type M_ERR_JAVA_NATIVE_INTERFACE_ERROR = static_cast<MErrorEnum::Type>(0x800408A5)
 Text: "Java native interface not initialized".
 
const MErrorEnum::Type M_ERR_OPENSSL_ERROR = static_cast<MErrorEnum::Type>(0x800408A6)
 Text: "OpenSSL error %d: %u".
 
const MErrorEnum::Type M_ERR_OUT_OF_SEQUENCE = static_cast<MErrorEnum::Type>(0x800408A7)
 Text "Call is made out of sequence".
 
const MErrorEnum::Type M_ERR_BAD_PRINT_FORMAT_S1 = static_cast<MErrorEnum::Type>(0x800408A8)
 Text "Bad print format '%s'".
 
const MErrorEnum::Type M_ERR_BAD_STRING_FOR_ENCODING_S1 = static_cast<MErrorEnum::Type>(0x800408A9)
 Text: "Bad string for encoding '%s'".
 
const MErrorEnum::Type M_ERR_INVALID_NUMERIC_STRING_FORMAT_S1 = static_cast<MErrorEnum::Type>(0x800408AA)
 Text: "Invalid numeric string format '%s'".
 
const MErrorEnum::Type M_ERR_INVALID_CHARACTER_IN_NUMERIC_STRING = static_cast<MErrorEnum::Type>(0x800408AB)
 Text: "Invalid character in numeric string".
 
const MErrorEnum::Type M_ERR_INVALID_OPERATION_ON_APK_ASSET = static_cast<MErrorEnum::Type>(0x800408AC)
 Text: "Cannot change an asset within apk" Text: "Invalid operation on apk asset".
 
const MErrorEnum::Type M_ERR_METER_DOES_NOT_SUPPORT_AUTHENTICATION = static_cast<MErrorEnum::Type>(0x80040BD0)
 Text: "Meter does not support authentication".
 
const MErrorEnum::Type M_ERR_METER_REQUESTED_UNKNOWN_AUTHENTICATION_ALGORITHM = static_cast<MErrorEnum::Type>(0x80040BD1)
 Text: "Meter requested unknown authentication algorithm".
 
const MErrorEnum::Type M_ERR_IDENTIFY_FAILED_GOT_UNRECOGNIZED_FEATURE_CODE_X1 = static_cast<MErrorEnum::Type>(0x80040BD2)
 Text: "Identify protocol request failed, got unrecognized feature code 0x%02X".
 
const MErrorEnum::Type M_ERR_IDENTIFIED_INFORMATION_IS_NOT_AVAILABLE = static_cast<MErrorEnum::Type>(0x80040BD7)
 Text: "ANSI Identify service was not called, identified information is not available".
 
const MErrorEnum::Type M_ERR_NEGOTIATED_INFORMATION_IS_NOT_AVAILABLE = static_cast<MErrorEnum::Type>(0x80040BDA)
 Text: "ANSI Negotiate service was not called, negotiated information is not available".
 
const MErrorEnum::Type M_ERR_NEGOTIATED_SESSION_IDLE_TIMEOUT_IS_NOT_AVAILABLE = static_cast<MErrorEnum::Type>(0x80040BDB)
 Text: "ANSI Logon service was not called, the session idle timeout is not available".
 
const MErrorEnum::Type M_ERR_INBOUND_PACKET_DATA_LENGTH_IS_BAD = static_cast<MErrorEnum::Type>(0x80040BDF)
 Text: "Packet data length is bad".
 
const MErrorEnum::Type M_ERR_DID_NOT_GET_A_VALID_BYTE_AMONG_D1_GARBAGE_BYTES_LAST_ONE_HAD_CODE_X2 = static_cast<MErrorEnum::Type>(0x80040BE0)
 Text: "Did not get a valid byte among %d garbage bytes (last one had code 0x%X)".
 
const MErrorEnum::Type M_ERR_CONNECTION_NOT_ESTABLISHED_BUT_REQUIRED = static_cast<MErrorEnum::Type>(0x80040BEA)
 Text: "Connection not established, connection is required for this operation".
 
const MErrorEnum::Type M_ERR_NO_PHONE_NUMBER_SPECIFIED = static_cast<MErrorEnum::Type>(0x80040BF7)
 Text: "No phone number specified".
 
const MErrorEnum::Type M_ERR_COMMAND_WITH_SUCH_PARAMETERS_IS_QUEUED_ALREADY = static_cast<MErrorEnum::Type>(0x80040C3E)
 Text: "Command with such parameters is queued already".
 
const MErrorEnum::Type M_ERR_COULD_NOT_FIND_DATA_WITH_SPECIFIED_PARAMETERES = static_cast<MErrorEnum::Type>(0x80040C3F)
 Text: "Could not find data with specified parameters".
 
const MErrorEnum::Type M_ERR_BAD_DATA_IN_ACSE_RESPONSE = static_cast<MErrorEnum::Type>(0x80040C46)
 Text: "Bad ACSE element %2X received".
 
const MErrorEnum::Type M_ERR_REQUEST_LENGTH_EXCEEDS_C1222_DATA_FORMAT_PACKET_SIZE = static_cast<MErrorEnum::Type>(0x80040D52)
 Text: "Request length exceeds packet size of C12.22 data format".
 
const MErrorEnum::Type M_ERR_APPLICATION_CONTEXT_SHALL_BE_ABSOULTE = static_cast<MErrorEnum::Type>(0x80040D54)
 Text: "Application context shall be an absolute UID".
 
const MErrorEnum::Type M_ERR_PROTOCOL_IMPLEMENTATION_MISMATCH = static_cast<MErrorEnum::Type>(0x80040D57)
 Protocol implementation mismatch.
 
const MErrorEnum::Type M_ERR_NOT_SUPPORTED_IN_ONE_WAY_MODE = static_cast<MErrorEnum::Type>(0x80040D58)
 Operation is not supported in one way mode.
 
const MErrorEnum::Type M_ERR_RAS_DIAL_NOT_CONNECTED = static_cast<MErrorEnum::Type>(0x80041808)
 Text: "Error when dialing RAS connection '%s'" Text: "Invalid parameter for RAS connection '%s'" Text: "User decision to disconnect RAS connection '%s' was made" Text: "Unknown error when establishing RAS connection '%s'".
 
const MErrorEnum::Type M_ERR_RAS_DIAL_ALREADY_CONNECTED = static_cast<MErrorEnum::Type>(0x80041809)
 Text: "Channel is already connected or it has already dialed a RAS connection".
 
const MErrorEnum::Type M_ERR_RAS_DIAL_NAME_EMPTY = static_cast<MErrorEnum::Type>(0x8004180A)
 Text: "RAS dial name is empty".
 
#define M_DYNAMIC   0
 
#define M_ENSURED_ASSERT(e)   M_ASSERT(e)
 
#define M_COMPILED_ASSERT(e)   typedef int M_MACRO_CONCATENATE(__MStaticAssertionFault, __LINE__) [ (e) ? 1 : -1 ] M_UNUSED_TYPEDEF
 
#define M_DEPRECATED(text)
 
#define M_NO_UNALIGNED_DATA   1
 
#define MAnsiToStdString(s)   (s)
 
#define MStdToAnsiString(s)   (s)
 
#define MByteToStdString(s)   (s)
 
#define MStdToByteString(s)   (s)
 
#define MToAnsiString   MToStdString
 
#define MWideToStdString(s)   MToStdString(s)
 
#define MStdToWideString(s)   MToWideString(s)
 
M_FUNC size_t MFormatVALc (char *buf, size_t size, const char *format, const lconv *lc, va_list args)
 
M_FUNC size_t MFormatVA (char *buf, size_t size, const char *format, va_list args)
 
M_FUNC size_t MFormatLc (char *buf, size_t size, const char *format, const lconv *lc,...)
 
M_FUNC size_t MFormat (char *buf, size_t size, const char *format,...)
 
M_FUNC size_t MFormatVALc (wchar_t *buf, size_t size, const wchar_t *format, const lconv *lc, va_list args)
 
M_FUNC size_t MFormatVA (wchar_t *buf, size_t size, const wchar_t *format, va_list args)
 
M_FUNC size_t MFormatLc (wchar_t *buf, size_t size, const wchar_t *format, const lconv *lc,...)
 
M_FUNC size_t MFormat (wchar_t *buf, size_t size, const wchar_t *format,...)
 
M_FUNC MStdString MGetStdString (MConstLocalChars str,...)
 
M_FUNC MStdString MGetStdString (MConstChars str,...)
 
M_FUNC MStdString MGetStdStringVA (MConstLocalChars str, va_list va)
 
M_FUNC MStdString MGetStdStringVA (MConstChars str, va_list va)
 
M_FUNC int MToInt (const char *str)
 
int MToInt (const MByteString &str)
 
M_FUNC int MToInt (const wchar_t *str)
 
int MToInt (const MWideString &str)
 
M_FUNC unsigned MToUnsigned (const char *str)
 
unsigned MToUnsigned (const MByteString &str)
 
M_FUNC unsigned MToUnsigned (const wchar_t *str)
 
unsigned MToUnsigned (const MWideString &str)
 
M_FUNC Mint64 MToInt64 (const char *str)
 
Mint64 MToInt64 (const MByteString &str)
 
M_FUNC Mint64 MToInt64 (const wchar_t *str)
 
Mint64 MToInt64 (const MWideString &str)
 
M_FUNC Muint64 MToUInt64 (const char *str)
 
Muint64 MToUInt64 (const MByteString &str)
 
M_FUNC Muint64 MToUInt64 (const wchar_t *str)
 
Muint64 MToUInt64 (const MWideString &str)
 
unsigned long MToUnsignedLong (const char *str)
 
unsigned long MToUnsignedLong (const MByteString &str)
 
unsigned long MToUnsignedLong (const wchar_t *str)
 
unsigned long MToUnsignedLong (const MWideString &str)
 
long MToLong (const char *str)
 
long MToLong (const MByteString &str)
 
long MToLong (const wchar_t *str)
 
long MToLong (const MWideString &str)
 
M_FUNC double MToDouble (const char *str)
 
double MToDouble (const MByteString &str)
 
M_FUNC double MToDouble (const wchar_t *str)
 
double MToDouble (const MWideString &str)
 
M_FUNC char * MToChars (Mint64 value, char *buff)
 
M_FUNC wchar_t * MToChars (Mint64 value, wchar_t *buff)
 
M_FUNC char * MToChars (Muint64 value, char *buff)
 
M_FUNC wchar_t * MToChars (Muint64 value, wchar_t *buff)
 
M_FUNC char * MToChars (int value, char *buff)
 
M_FUNC char * MToChars (unsigned value, char *buff)
 
M_FUNC wchar_t * MToChars (int value, wchar_t *buff)
 
M_FUNC wchar_t * MToChars (unsigned value, wchar_t *buff)
 
char * MToChars (long value, char *buff)
 
wchar_t * MToChars (long value, wchar_t *buff)
 
char * MToChars (unsigned long value, char *buff)
 
wchar_t * MToChars (unsigned long value, wchar_t *buff)
 
M_FUNC char * MToChars (double value, char *buff, bool shortestFormat=false, unsigned precision=14)
 
M_FUNC wchar_t * MToChars (double value, wchar_t *buff, bool shortestFormat=false, unsigned precision=14)
 
M_FUNC size_t Mstrnlen (const char *string, size_t maxlen)
 
M_FUNC size_t Mstrnlen (const wchar_t *string, size_t maxlen)
 
#define M_OS_ANSI_C   0x00000
 Operating system interface masks. More...
 
#define M_OS_DOS   0x00001
 Operating system interface masks. More...
 
#define M_OS_DOS16   0x00003
 Operating system interface masks. More...
 
#define M_OS_DOS32   0x00007
 Operating system interface masks. More...
 
#define M_OS_WINDOWS   0x00010
 Operating system interface masks. More...
 
#define M_OS_WIN32   0x00040
 Operating system interface masks. More...
 
#define M_OS_WIN64   0x00080
 Operating system interface masks. More...
 
#define M_OS_WIN32_CE   0x01000
 Operating system interface masks. More...
 
#define M_OS_POSIX   0x10000
 Operating system interface masks. More...
 
#define M_OS_UNIX   0x20000
 Operating system interface masks. More...
 
#define M_OS_CYGWIN   0x40000
 Operating system interface masks. More...
 
#define M_OS_LINUX   0x80000
 Operating system interface masks. More...
 
#define M_OS_UCLINUX   0x100000
 Operating system interface masks. More...
 
#define M_OS_NUTTX   0x200000
 Operating system interface masks. More...
 
#define M_OS_CMX   0x400000
 Operating system interface masks. More...
 
#define M_OS_QNXNTO   0x2000000
 Operating system interface masks. More...
 
#define M_OS_BSD   0x4000000
 Operating system interface masks. More...
 
#define M_OS_ANDROID   0x8000000
 Operating system interface masks. More...
 
#define M_MACRO_CONCATENATE(a, b)    M__DO_MACRO_CONCATENATE(a, b)
 
#define M_MACRO_CONCATENATE3(a, b, c)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE(a, b), c)
 
#define M_MACRO_CONCATENATE4(a, b, c, d)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE3(a, b, c), d)
 
#define M_MACRO_CONCATENATE5(a, b, c, d, e)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE4(a, b, c, d), e)
 
#define M_MACRO_CONCATENATE6(a, b, c, d, e, f)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE5(a, b, c, d, e), f)
 
#define M_MACRO_CONCATENATE7(a, b, c, d, e, f, g)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE6(a, b, c, d, e, f), g)
 
#define M_MACRO_CONCATENATE8(a, b, c, d, e, f, g, h)   M_MACRO_CONCATENATE(M_MACRO_CONCATENATE7(a, b, c, d, e, f, g), h)
 
#define M_CODE_STR(c, s)    (c), (s)
 
#define M_CODE_STR_P1(c, s, p1)    (c), (s), (p1)
 
#define M_CODE_STR_P2(c, s, p1, p2)    (c), (s), (p1), (p2)
 
#define M_CODE_STR_P3(c, s, p1, p2, p3)   (c), (s), (p1), (p2), (p3)
 
#define M_OPT_STR(s)    (s)
 
#define M_I(s)    (MConstLocalChars(s))
 
#define M_THREAD_LOCAL_STORAGE_VARIABLE   __thread
 
#define M__USE_THREAD_LOCAL_POINTER   ((defined(__GNUC__) && M_GCC_VERSION >= 44300) || defined(__clang__))
 
#define M_THREAD_LOCAL_POINTER(T)   MThreadLocalPointer<T>
 
#define M_TIMER64_SUPPORT   1
 

Detailed Description

Macro Definition Documentation

#define M_64_CAST (   type,
  value 
)    MDo64Cast<type>(value)

32-bit OS only: Cast 64-bit integral type into 32-bit integral type with check whether the conversion lost any bits.

This is typically used for size_t conversion.

Parameters
typeis either int or unsigned, literal
valueis of type Muint64 or Mint64. If value does not fit within 32-bits a conversion exception is thrown.
Returns
value cast to given type
#define M__USE_THREAD_LOCAL_POINTER   ((defined(__GNUC__) && M_GCC_VERSION >= 44300) || defined(__clang__))

Whether to use compiler-native M_THREAD_LOCAL_STORAGE_VARIABLE in M_THREAD_LOCAL_POINTER.

Determine whether to use local storage natively supported by the compiler and development environment, or rather use a more portable API-based class MThreadLocalPointer.

When the user does not supply this value, an attempt to determine it from the environment is made. Currently, an assumption is made that we have to support Windows XP, the one with buggy native __declspec(thread).

See also
M_THREAD_LOCAL_POINTER the user level macro to declare the most portable and efficient thread local pointer.
#define M_ASSERT (   e)    assert(e)

Overloadable ASSERT macro, compatible with C language.

The library uses this version of assertion in places where the condition can still happen at runtime at the extreme low probability. There are also M_ENSURED_ASSERT and M_COMPILED_ASSERT.

#define M_CDECL

Specifies that the non-exported function shall have plain C calling convention.

The effect of the macro depends on the compiler, operating system, and compilation mode.

#define M_CHECKED_CAST (   t,
 
)    (static_cast<t>(p))

Casting nonzero pointers statically, with check on debug time.

If the target object is the one expected, it is returned. Otherwise an assertion is fired. Simply speaking, dynamic_cast with assert is used during debugging, and static_cast on release.

#define M_CHECKED_CAST_OR_NULL (   t,
 
)    (static_cast<t>(p))

Casting possibly zero pointers statically, with check on debug time.

If the target object is the one expected, or it is zero, it is returned. Otherwise an assertion is fired.

See also
M_CHECKED_CAST
#define M_CLASS_FRIEND_SERVICE (   Class,
  Service,
  FriendService,
  serviceType 
)    {# Service, -1, MClass::serviceType, NULL, (MClass::Method)&FriendService},

Define the friend class service.

See details in MObject class header comment.

#define M_CLASS_FRIEND_SERVICE_OVERLOADED (   Class,
  Service,
  FriendService,
  numParameters,
  serviceType 
)    {# Service, numParameters, MClass::serviceType, NULL, (MClass::Method)&FriendService},

Define the class service with the explicit name and number of parameters.

This is to help implement services with default parameters. See details in MObject class header comment.

#define M_CLASS_PROPERTY_BOOL (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BOOL, MClass::ST_bool_S, MClass::ST_S_bool, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, (MClass::Method)&M ## Class::Set ## Property, NULL},
Variant has Boolean value.
Definition: MVariant.h:27

Define the class Boolean property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_INT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_INT, MClass::ST_int_S, MClass::ST_S_int, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, (MClass::Method)&M ## Class::Set ## Property, NULL},
Variant has integer value.
Definition: MVariant.h:31

Define the class Unsigned Integer property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_BOOL (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BOOL, MClass::ST_bool_S, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, NULL, NULL},
Variant has Boolean value.
Definition: MVariant.h:27

Define the class read-only Boolean property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_BOOL_EXACT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BOOL, MClass::ST_bool_S, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Property, NULL, NULL, NULL},
Variant has Boolean value.
Definition: MVariant.h:27

Define the class read-only Boolean property with the exact name.

See details in MObject class header comment. This one is suitable for properties like IsEmpty, IsReadOnly and so on.

#define M_CLASS_PROPERTY_READONLY_DOUBLE (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_DOUBLE, MClass::ST_double_S, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, NULL, NULL},
Variant has double value.
Definition: MVariant.h:32

Define the object read-only double precision property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_INT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_INT, MClass::ST_int_S, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, NULL, NULL},
Variant has integer value.
Definition: MVariant.h:31

Define the class read-only Unsigned Integer property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_OBJECT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_OBJECT, MClass::ST_MObjectP_S, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, NULL, NULL},
Variant has an object.
Definition: MVariant.h:36

Define the object read-only object property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_OBJECT_EMBEDDED (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_OBJECT_EMBEDDED, MClass::getMethodSignature, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, NULL, NULL},
Object, embedded into the variant, can be copied with memory copy operation.
Definition: MVariant.h:37

Define the embedded read-only object property with the exact name.

See details in MObject class header comment. Get method signature is most often ST_MObject_S, but it can be ST_MObjectByValue_S.

#define M_CLASS_PROPERTY_READONLY_OBJECT_EMBEDDED_EXACT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_OBJECT_EMBEDDED, MClass::getMethodSignature, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Property, NULL, NULL, NULL},
Object, embedded into the variant, can be copied with memory copy operation.
Definition: MVariant.h:37

Define the embedded read-only object property with the exact name.

See details in MObject class header comment. Get method signature is most often ST_MObject_S, but it can be ST_MObjectByValue_S.

#define M_CLASS_PROPERTY_READONLY_STRING (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING, MClass::getMethodSignature, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, NULL, NULL},
Variant has string value.
Definition: MVariant.h:34

Define the class read-only String property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_STRING_COLLECTION (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING_COLLECTION, MClass::getMethodSignature, MClass::ST__NULL, \
NULL, (MClass::Method)M ## Class::Get ## Property, NULL, NULL, NULL},
Variant has string collection value.
Definition: MVariant.h:35

Define the object read-only byte string property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_UINT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_UINT, MClass::ST_unsigned_S, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, NULL, NULL},
Variant has unsigned integer value. Its conversion rate is smaller than INT, not like in C...
Definition: MVariant.h:30

Define the class read-only Unsigned Integer property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_VARIANT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT, MClass::getMethodSignature, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, NULL, NULL},
Variant type by itself. Used externally by applications to denote variant as the whole type...
Definition: MVariant.h:40

Define the embedded read-only class property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_READONLY_VARIANT_EXACT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT, MClass::getMethodSignature, MClass::ST__NULL, \
NULL, (MClass::Method)&M ## Class::Property, NULL, NULL, NULL},
Variant type by itself. Used externally by applications to denote variant as the whole type...
Definition: MVariant.h:40

Define the embedded read-only class property with the exact name.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_STRING (   Class,
  Property,
  getMethodSignature,
  putMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING, MClass::getMethodSignature, MClass::putMethodSignature, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, (MClass::Method)&M ## Class::Set ## Property, NULL},
Variant has string value.
Definition: MVariant.h:34

Define the class String property.

See details in MObject class header comment.

#define M_CLASS_PROPERTY_UINT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_UINT, MClass::ST_unsigned_S, MClass::ST_S_unsigned, \
NULL, (MClass::Method)&M ## Class::Get ## Property, NULL, (MClass::Method)&M ## Class::Set ## Property, NULL},
Variant has unsigned integer value. Its conversion rate is smaller than INT, not like in C...
Definition: MVariant.h:30

Define the class Unsigned Integer property.

See details in MObject class header comment.

#define M_CLASS_SERVICE (   Class,
  Service,
  serviceType 
)    {# Service, -1, MClass::serviceType, NULL, (MClass::Method)&M ## Class::Service},

Define the class service.

See details in MObject class header comment.

#define M_CLASS_SERVICE_OVERLOADED (   Class,
  Service,
  ServiceImpl,
  numParameters,
  serviceType 
)    {# Service, numParameters, MClass::serviceType, NULL, (MClass::Method)&M ## Class::ServiceImpl},

Define the class service with the explicit name and number of parameters.

This is to help implement services with default parameters. See details in MObject class header comment.

#define M_CODE_STR (   c,
 
)    (c), (s)

Helper macro that handles compile mode related to absence of a string in the exception and log.

#define M_CODE_STR_P1 (   c,
  s,
  p1 
)    (c), (s), (p1)

Helper macro that handles compile mode related to absence of a string in the exception and log.

#define M_CODE_STR_P2 (   c,
  s,
  p1,
  p2 
)    (c), (s), (p1), (p2)

Helper macro that handles compile mode related to absence of a string in the exception and log.

#define M_CODE_STR_P3 (   c,
  s,
  p1,
  p2,
  p3 
)    (c), (s), (p1), (p2), (p3)

Helper macro that handles compile mode related to absence of a string in the exception and log.

#define M_COMPILED_ASSERT (   e)    typedef int M_MACRO_CONCATENATE(__MStaticAssertionFault, __LINE__) [ (e) ? 1 : -1 ] M_UNUSED_TYPEDEF

Version of ASSERT macro, which works at compile time. This way, the given expression shall be constant, known at compile time. M_COMPILED_ASSERT can be used not only in the execution code, but also in every place where a declaration is possible. There are also M_ASSERT and M_ENSURED_ASSERT.

The other feature of compiled assert is that it exists in both debug and release version, since there is no extra overhead caused by its presence.

When the compiled assertion is failing, there will be an error message of some sort at compile time. Many implementations will show an error that the array bound in type definition is negative. There will also be an error if an attempt to have a variable expression but not constant one is made.

#define M_DEBUG   1

Portable debug macro.

Usage of this macro from the client programs of MCORE is based on the assumption that if the client is compiled with the debugging information on, it has to be linked with the MCORE library, which also has debugging enabled.

#define M_DECLARE_CLASS (   Class)
Value:
public: virtual const MClass* GetClass() const; \
static const MClass* GetStaticClass() { return &s_class; } \
static const MClass s_class;
Notion of a class that serves as the base for the reflection API.
Definition: MClass.h:27

This macro has to be defined in every MObject child at the end of the class definitions (because after it all the definitions become protected).

See MObject class definition for details.

#define M_DECLARE_CLASS_EXACT (   Class)
Value:
public: virtual const MClass* GetClass() const; \
static const MClass* GetStaticClass() { return &s_class; } \
static const MClass s_class;
Notion of a class that serves as the base for the reflection API.
Definition: MClass.h:27

This macro has to be defined in every MObject child at the end of the class definitions (because after it all the definitions become protected).

The name of the class is exact, without M prefix. See MObject class definition for details.

#define M_DEFINE_TEMPLATE_CLASS (   t)

Compiler dependent way of instantiating templates.

Note that templates with multiple parameters are not supported.

#define M_DEPRECATED (   text)

Deprecated declaration marker.

Use it to define methods that need to be reviewed or replaced.

#define M_DYNAMIC   0

Shall be 1 if a MeteringSDK dynamic library is to be used or built, while value zero is for static library.

The macro applies to all MeteringSDK libraries, while the client applications or libraries are free to decide whether they shall be dynamic or static, as well as how this shall be defined or handled in code. A dynamic client library can contain either static or dynamic version of MeteringSDK. If MeteringSDK is built dynamically, C/C++ dynamic runtime shall also be linked, while for static version either dynamic or static runtime linkage is possible.

If the value of this macro is not specified, dynamic MeteringSDK is assumed for Windows, while static is for any other operating system.

#define M_DYNAMIC_CAST (   c,
 
)    MDoObjectDynamicCast<c>(o)

Pointer-based variation of the standard dynamic cast for objects, not NULL, usable for MObject children.

Because there is no multiple inheritance, this macro call is many times faster than the standard dynamic cast, and it also resolves the problem on some CE platforms where dynamic_cast is not properly implemented. Different from M_CHECKED_CAST, this macro takes non const-volatile-qualified name of the target class, and there is no star to denote a pointer.

The difference in behavior with the standard dynamic_cast is that they do not accept NULL as a valid argument.

Parameters
cMust be a symbolic name of a class derived from MObject, and this class shall be reflected with appropriate macros. Otherwise compiler errors will appear, or a cast will not work as expected.
oObject to be casted into class c. It must be a nonzero object, a debug time assertion will be hit.
Returns
  • If o is of requested type, pointer casted to a requested object is returned.
  • Otherwise NULL is returned.

Example:

1 MDataObject* dataObj = M_DYNAMIC_CAST(MDataObject, obj);
See also
M_DYNAMIC_CONST_CAST
M_DYNAMIC_CAST_WITH_NULL_CHECK
M_DYNAMIC_CONST_CAST_WITH_NULL_CHECK
M_DYNAMIC_CAST_WITH_THROW
M_DYNAMIC_CONST_CAST_WITH_THROW
#define M_DYNAMIC_CAST_WITH_NULL_CHECK (   c,
 
)    MDoObjectDynamicCastWithNullCheck<c>(o)

Pointer-based variation of the standard dynamic cast for objects or NULL, usable for MObject children.

Because there is no multiple inheritance, this macro call is many times faster than the standard dynamic cast, and it also resolves the problem on some CE platforms where dynamic_cast is not properly implemented. Different from M_CHECKED_CAST, this macro takes non const-volatile-qualified name of the target class, and there is no star to denote a pointer.

When NULL value is given as object, the macro behaves like standard pointer-based dynamic_cast, returns NULL.

Parameters
cMust be a symbolic name of a class derived from MObject, and this class shall be reflected with appropriate macros. Otherwise compiler errors will appear, or a cast will not work as expected.
oObject to be casted into class c. NULL pointer value can be given, in which case NULL is returned.
Returns
  • If o is of requested type, pointer casted to a requested object is returned.
  • Otherwise NULL is returned.
See also
M_DYNAMIC_CAST
M_DYNAMIC_CONST_CAST
M_DYNAMIC_CONST_CAST_WITH_NULL_CHECK
M_DYNAMIC_CAST_WITH_THROW
M_DYNAMIC_CONST_CAST_WITH_THROW
#define M_DYNAMIC_CAST_WITH_THROW (   c,
 
)    MDoObjectDynamicCastWithThrow<c>(o)

Pointer-based variation of the standard dynamic cast for objects, not NULL, usable for MObject children.

Because there is no multiple inheritance, this macro call is many times faster than the standard dynamic cast, and it also resolves the problem on some CE platforms where dynamic_cast is not properly implemented. Different from M_CHECKED_CAST, this macro takes non const-volatile-qualified name of the target class, and there is no star to denote a pointer.

Much like reference-based dynamic_cast, this call will throw an exception if the given object is not of the type requested.

Parameters
cMust be a symbolic name of a class derived from MObject, and this class shall be reflected with appropriate macros. Otherwise compiler errors will appear, or a cast will not work as expected.
oObject to be casted into class c. NULL pointer value can be given, in which case NULL is returned.
Returns
Pointer casted to a requested object is returned. NULL is never returned from this call.
See also
M_DYNAMIC_CAST
M_DYNAMIC_CONST_CAST
M_DYNAMIC_CAST_WITH_NULL_CHECK
M_DYNAMIC_CONST_CAST_WITH_NULL_CHECK
M_DYNAMIC_CONST_CAST_WITH_THROW
#define M_DYNAMIC_CONST_CAST (   c,
 
)    MDoObjectDynamicCast<const c>(o)

Constant version of pointer-based variation of the standard dynamic cast for objects, not NULL, usable for MObject children.

Because there is no multiple inheritance, this macro call is many times faster than the standard dynamic cast, and it also resolves the problem on some CE platforms where dynamic_cast is not properly implemented. Different from =M_CHECKED_CAST, this macro takes non const-volatile-qualified name of the target class, and there is no star to denote a pointer.

The difference in behavior with the standard dynamic_cast is that they do not accept NULL as a valid argument.

Parameters
cMust be a symbolic name of a class derived from MObject, and this class shall be reflected with appropriate macros. Qualifier const shall not be mentioned. Otherwise compiler errors will appear, or a cast will not work as expected.
oObject to be casted into class c. It must be a non-NULL object, or a debug time assertion will be hit.
Returns
  • If o is of requested constant type, constant pointer casted to a requested object is returned.
  • Otherwise NULL is returned.

Example:

1 const MDataObject* dataObj = M_DYNAMIC_CONST_CAST(MDataObject, obj);
See also
M_DYNAMIC_CAST
M_DYNAMIC_CAST_WITH_NULL_CHECK
M_DYNAMIC_CONST_CAST_WITH_NULL_CHECK
M_DYNAMIC_CAST_WITH_THROW
M_DYNAMIC_CONST_CAST_WITH_THROW
#define M_DYNAMIC_CONST_CAST_WITH_NULL_CHECK (   c,
 
)    MDoObjectDynamicCastWithNullCheck<const c>(o)

Constant version of pointer-based variation of the standard dynamic cast for objects or NULL, usable for MObject children.

Because there is no multiple inheritance, this macro call is many times faster than the standard dynamic cast, and it also resolves the problem on some CE platforms where dynamic_cast is not properly implemented. Different from =M_CHECKED_CAST, this macro takes non const-volatile-qualified name of the target class, and there is no star to denote a pointer.

When NULL value is given as object, the macro behaves like standard pointer-based dynamic_cast, returns NULL.

Parameters
cMust be a symbolic name of a class derived from MObject, and this class shall be reflected with appropriate macros. Qualifier const shall not be mentioned. Otherwise compiler errors will appear, or a cast will not work as expected.
oObject to be casted into class c. NULL pointer value can be given, in which case NULL is returned.
Returns
  • If o is of requested constant type, constant pointer casted to a requested object is returned.
  • Otherwise NULL is returned.
See also
M_DYNAMIC_CAST
M_DYNAMIC_CONST_CAST
M_DYNAMIC_CAST_WITH_NULL_CHECK
M_DYNAMIC_CAST_WITH_THROW
M_DYNAMIC_CONST_CAST_WITH_THROW
#define M_DYNAMIC_CONST_CAST_WITH_THROW (   c,
 
)    MDoObjectDynamicCastWithThrow<const c>(o)

Constant version of pointer-based variation of the standard dynamic cast for objects, not NULL, usable for MObject children.

Because there is no multiple inheritance, this macro call is many times faster than the standard dynamic cast, and it also resolves the problem on some CE platforms where dynamic_cast is not properly implemented. Different from =M_CHECKED_CAST, this macro takes non const-volatile-qualified name of the target class, and there is no star to denote a pointer.

Parameters
cMust be a symbolic name of a class derived from MObject, and this class shall be reflected with appropriate macros. Qualifier const shall not be mentioned. Otherwise compiler errors will appear, or a cast will not work as expected.
oObject to be casted into class c. NULL pointer value can be given, in which case NULL is returned.
Returns
Pointer casted to a requested object is returned. NULL is never returned from this call.
See also
M_DYNAMIC_CAST
M_DYNAMIC_CONST_CAST
M_DYNAMIC_CAST_WITH_NULL_CHECK
M_DYNAMIC_CONST_CAST_WITH_NULL_CHECK
M_DYNAMIC_CAST_WITH_THROW
#define M_END_CLASS (   Class,
  Parent 
)
Value:
{"\0\0\0"} }; \
const MClass M ## Class::s_class = {# Class, # Class, s__properties ## Class, s__services ## Class, &(M ## Parent::s_class)}; \
static const MClass::RegisterClassHelper s__register ## Class(&M ## Class::s_class); \
const MClass* M ## Class::GetClass() const { return &s_class; }
Notion of a class that serves as the base for the reflection API.
Definition: MClass.h:27

Complete the definitions for the class.

This macro appears in the implementation file.

#define M_END_CLASS_EXACT (   Class,
  Parent 
)
Value:
{"\0\0\0"} }; \
const MClass Class::s_class = {# Class, # Class, s__properties ## Class, s__services ## Class, &(Parent::s_class)}; \
static const MClass::RegisterClassHelper s__register ## Class(&Class::s_class); \
const MClass* Class::GetClass() const { return &s_class; }
Notion of a class that serves as the base for the reflection API.
Definition: MClass.h:27

Complete the definitions for the class with the exact given name.

Note that the parent has to have an exact name too. This macro appears in the implementation file.

#define M_END_CLASS_TYPED (   Class,
  Parent,
  Type 
)
Value:
{"\0\0\0"} }; \
const MClass M ## Class::s_class = {# Class, Type, s__properties ## Class, s__services ## Class, &(M ## Parent::s_class)}; \
static const MClass::RegisterClassHelper s__register ## Class(&M ## Class::s_class); \
const MClass* M ## Class::GetClass() const { return &s_class; }
Notion of a class that serves as the base for the reflection API.
Definition: MClass.h:27

Complete the definitions for the typed class (one which type name is different from class name.

This macro appears in the implementation file.

#define M_ENSURED_ASSERT (   e)    M_ASSERT(e)

Version of ASSERT macro, which tells that the given condition is best ensured to be true at runtime.

This converts into instructions to optimizer which can lead to considerable speed and size improvement. There are also M_ASSERT and M_COMPILED_ASSERT.

#define M_EXPORTED_ABSTRACT_CLASS

Abstract class declared with this macro before the class name will be exported from compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. If the macro is applied to non-abstract class, the result is unpredictable. Typically, this macro is used in a conditional define with M_IMPORTED_ABSTRACT_CLASS to declare exported/imported classes in the header of compilation unit.

See also
M_IMPORTED_ABSTRACT_CLASS
M_EXPORTED_CLASS - exporting non-abstract non-template classes
M_EXPORTED_TEMPLATE_CLASS - exporting templates
#define M_EXPORTED_C_FUNC   extern "C"

Function with plain C calling convention declared to be exported from the compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. Typically, this macro is used in a conditional define with M_IMPORTED_C_FUNC to declare exported/imported classes in the header of compilation unit.

See also
M_IMPORTED_C_FUNC
#define M_EXPORTED_CLASS

Class declared with this macro before the class name will be exported from compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. Typically, this macro is used in a conditional define with M_IMPORTED_CLASS to declare exported/imported classes in the header of compilation unit.

See also
M_IMPORTED_CLASS
M_EXPORTED_ABSTRACT_CLASS - can save some extra space in case of abstract objects by not generating virtual table
M_EXPORTED_TEMPLATE_CLASS - exporting templates
#define M_EXPORTED_FUNC

Function declared to be exported from the compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. Typically, this macro is used in a conditional define with M_IMPORTED_FUNC to declare exported/imported classes in the header of compilation unit.

See also
M_IMPORTED_FUNC
#define M_EXPORTED_TEMPLATE_CLASS

Template class declared with this macro before the class name will be exported from compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. If the macro is applied to non-template class, the result is unpredictable. Typically, this macro is used in a conditional define with M_IMPORTED_TEMPLATE_CLASS to declare exported/imported classes in the header of compilation unit.

See also
M_IMPORTED_TEMPLATE_CLASS
M_EXPORTED_CLASS - exporting non-abstract non-template classes
M_EXPORTED_ABSTRACT_CLASS - exporting abstract classes
#define M_FILE_VERSION   M_PRODUCT_VERSION_MAJOR,M_PRODUCT_VERSION_MIDDLE,M_PRODUCT_VERSION_MINOR,M_PRODUCT_VERSION_TAG

MeteringSDK file version literal, separated by commas, as used by Windows resource FILEVERSION.

If file version is not found in MeteringSDKSettings.h configuration file, it is composed from mandatory macros M_PRODUCT_VERSION_MAJOR, M_PRODUCT_VERSION_MIDDLE, M_PRODUCT_VERSION_MINOR, and M_PRODUCT_VERSION_TAG.

#define M_GLOBAL_MESSAGE_CATALOG_DOMAIN   "MeteringSDK"

Domain string for global message catalog.

This macro has an effect only when M_NO_MESSAGE_CATALOG is zero, message catalog is enabled. This is a string to denote the message catalog of the application, "MeteringSDK" by default.

#define M_I (   s)    (MConstLocalChars(s))

Internationalization characters that shall be localized. This is somewhat similar to standard macro gettext_noop.

#define M_I_STR (   s)    (MMessageCatalog::GetTextDefault(M_I(s)))

Internationalization string that shall be localized.

This is somewhat similar to standard macro gettext, except that it returns an MStdString.

#define M_IMPORTED_ABSTRACT_CLASS

Abstract class declared with this macro before the class name will be imported into compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. If the macro is applied to non-abstract class, the result is unpredictable. Typically, this macro is used in a conditional define with M_EXPORTED_ABSTRACT_CLASS to declare exported/imported classes in the header of compilation unit.

See also
M_IMPORTED_ABSTRACT_CLASS
M_EXPORTED_CLASS - exporting non-abstract non-template classes
M_IMPORTED_TEMPLATE_CLASS - importing templates
#define M_IMPORTED_C_FUNC   extern "C"

Function with plain C calling convention declared to be exported from the compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. Typically, this macro is used in a conditional define with M_EXPORTED_C_FUNC to declare exported/imported classes in the header of compilation unit.

See also
M_EXPORTED_C_FUNC
#define M_IMPORTED_CLASS

Class declared with this macro before the class name will be imported into compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. Typically, this macro is used in a conditional define with M_EXPORTED_CLASS to declare exported/imported classes in the header of compilation unit.

See also
M_EXPORTED_CLASS
M_IMPORTED_ABSTRACT_CLASS - can save some extra space in case of abstract objects by not generating virtual table
M_IMPORTED_TEMPLATE_CLASS - importing templates
#define M_IMPORTED_FUNC

Function declared to be exported from the compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. Typically, this macro is used in a conditional define with M_EXPORTED_FUNC to declare exported/imported classes in the header of compilation unit.

See also
M_EXPORTED_FUNC
#define M_IMPORTED_TEMPLATE_CLASS

Template class declared with this macro before the class name will be imported into compilation unit.

The effect of the macro depends on the compiler, operating system, and compilation mode. If the macro is applied to non-template class, the result is unpredictable. Typically, this macro is used in a conditional define with M_EXPORTED_TEMPLATE_CLASS to declare exported/imported classes in the header of compilation unit.

See also
M_EXPORTED_TEMPLATE_CLASS
M_EXPORTED_CLASS - exporting non-abstract non-template classes
M_IMPORTED_ABSTRACT_CLASS - importing abstract classes
#define M_L (   str)    str

Legacy define that is used for strings, in this version it expands into string itself.

Also, see M_LL for unconditional define of UNICODE prefix for any macro or string.

#define M_LITTLE_ENDIAN   1

Macro that tells whether the current architecture is little endian or big endian.

Intel processors are little endian, Sun Sparcs and Motorolas are big endian.

#define M_LL (   str)    M_MACRO_CONCATENATE(L, str)

A define that always expands to a long char string prefix L for a previously expanded parameter.

If the parameter is a macro that resolves into a string. Use it as follows: M_LL(FILE). Without the above helper defines it would not be possible to pre-expand a FILE macro.

See also
M_L for conditional define of UNICODE prefix for any macro or string based on UNICODE compatibility mode.
#define M_MACRO_CONCATENATE (   a,
 
)    M__DO_MACRO_CONCATENATE(a, b)

Helper macro that concatenates the pre-expanded parameters

This define makes possible to have FILE or M_LL(FILE) in the source code, other defines of this kind. Variable number of parameters are supported, from two to eight.

#define M_MACRO_CONCATENATE3 (   a,
  b,
 
)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE(a, b), c)

Helper macro that concatenates the pre-expanded parameters

This define makes possible to have FILE or M_LL(FILE) in the source code, other defines of this kind. Variable number of parameters are supported, from two to eight.

#define M_MACRO_CONCATENATE4 (   a,
  b,
  c,
 
)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE3(a, b, c), d)

Helper macro that concatenates the pre-expanded parameters

This define makes possible to have FILE or M_LL(FILE) in the source code, other defines of this kind. Variable number of parameters are supported, from two to eight.

#define M_MACRO_CONCATENATE5 (   a,
  b,
  c,
  d,
 
)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE4(a, b, c, d), e)

Helper macro that concatenates the pre-expanded parameters

This define makes possible to have FILE or M_LL(FILE) in the source code, other defines of this kind. Variable number of parameters are supported, from two to eight.

#define M_MACRO_CONCATENATE6 (   a,
  b,
  c,
  d,
  e,
 
)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE5(a, b, c, d, e), f)

Helper macro that concatenates the pre-expanded parameters

This define makes possible to have FILE or M_LL(FILE) in the source code, other defines of this kind. Variable number of parameters are supported, from two to eight.

#define M_MACRO_CONCATENATE7 (   a,
  b,
  c,
  d,
  e,
  f,
 
)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE6(a, b, c, d, e, f), g)

Helper macro that concatenates the pre-expanded parameters

This define makes possible to have FILE or M_LL(FILE) in the source code, other defines of this kind. Variable number of parameters are supported, from two to eight.

#define M_MACRO_CONCATENATE8 (   a,
  b,
  c,
  d,
  e,
  f,
  g,
 
)    M_MACRO_CONCATENATE(M_MACRO_CONCATENATE7(a, b, c, d, e, f, g), h)

Helper macro that concatenates the pre-expanded parameters

This define makes possible to have FILE or M_LL(FILE) in the source code, other defines of this kind. Variable number of parameters are supported, from two to eight.

#define M_MACRO_DUMMY (   x)    x

Helper macro that expands into its parameter.

This macro is handy for making single literals out of non-literals or multiple literals, part of macro trickery.

#define M_MACRO_STRING (   x)    M__DO_MACRO_STRING(x)

Take a parameter of the macro and make a string out of it.

Differing from the standard # prefix, this macro addresses the case if the given argument is a macro to be expanded.

#define M_NEW   new

Macro M_NEW can be used in client applications in places where new is called without parameters.

The debugging version allows looking at the lines in the source code where the memory leak took place.

Internally MCORE uses this macro in places of all memory allocations where operator new would be used.

In its file MCOREDefs.cpp, MCORE also has code that invokes memory leak dumps for the debugging version at application exit. Any other DLL or the executable file might overwrite this flag. This is the case when the expected memory leaks are not dumped...

#define M_NO_AUTOMATION   0

Windows specific flag that disables COM/OLE and Automation.

It is zero, enabled by default for Windows, disabled for any other operating system. Can be disabled with giving a nonzero value for things such as COM security issues.

#define M_NO_CONSOLE   0

Flag that disables standard console streams.

Those are accessible through MStreamFile::GetStdOut(), MStreamFile::GetStdIn(), and MStreamFile::GetStdErr(). Console is not supported in Windows CE operating system, and for this OS the default value of this macro is zero.

#define M_NO_DYNAMIC_LIBRARY   0

Flag to enable or disable MDynamicLibrary class - wrapper for shared object (dll) API.

By default, dynamic library is enabled only for M_DYNAMIC builds.

#define M_NO_ENCODING   0

Flag that disables character encoding and decoding.

When this flag is nonzero, support of local character conversions related to methods of MStr class will be disabled.

See also
M_NO_WCHAR_T
#define M_NO_FILESYSTEM   0

Enable or disable support for files and file system operations.

The default is have support for files and file system.

#define M_NO_FULL_REFLECTION   1

Flag that disables extended Reflection API.

Extended reflection API provides extra information about parameters and service prototypes, and it is auxiliary for most of the use cases. Also, some compilers have difficulties while compiling the macros invented for handling this extra information.

The default value is the same as M_NO_REFLECTION for all compilers other than those of Borland/Inprise/Embarcadero, for which this macro is always set to zero.

#define M_NO_JNI   0

Whether to use Java Native Interface.

Set it to zero only for Java related code such as JNI facades.

#define M_NO_LUA_COOPERATIVE_IO   1

Whether to disable LUA cooperative multitasking at Input-Output.

LUA Cooperative multitasking allows context switching at certain Input-Output operations.

#define M_NO_MESSAGE_CATALOG   0

Flag that disables MessageCatalog and related internationalization facilities.

Enabled by default with zero value, can be disabled when a client application does not handle international text.

See also
M_GLOBAL_MESSAGE_CATALOG_DOMAIN - string that identifies the domain of the message catalog.
#define M_NO_MULTITHREADING   0

Flag that disables Multithreading.

When this flag is nonzero, support of multithreading will be disabled in MeteringSDK, which removes a big set of classes and features, such as background communication.

#define M_NO_PROGRESS_MONITOR   0

Flag that disables MVariant class.

This define is very restrictive, incompatible with many features of MeteringSDK, but it saves lots of code space.

#define M_NO_REFLECTION   0

Flag that disables Reflection API.

When Reflection is enabled, default, every reflected class will be added into the executable whether or not it is actually used. This creates a considerable overhead, however adds the ability of manipulating classes dynamically at runtime.

#define M_NO_REGISTRY   0

Flag that disables registry manipulation class used to access Windows registry.

By default, this is zero for Windows, and nonzero for every other operating system.

See also
MRegistry
#define M_NO_SERIAL_PORT   0

Flag that disables serial port support.

Enabled by default, zero value. Having it nonzero is handy for cases when MeteringSDK has to be used for rare applications that do not handle serial port.

#define M_NO_SOCKETS   0

Flag that disables Sockets.

This is useful when it is necessary for the library to be linked without socket support. This disables many useful features such as monitor or socket channel. The value of this flag is zero by default, enable socket support.

#define M_NO_SOCKETS_SOCKS   M_NO_SOCKETS

Flag that disables SOCKS proxy of Sockets.

When sockets are enabled, this define allows disabling SOCKS proxy support. When sockets are disabled, the value of this define does not have any effect.

#define M_NO_SOCKETS_UDP   M_NO_SOCKETS

Flag that disables socket UDP interface.

When sockets are enabled, this define allows disabling SOCKS proxy support. When sockets are disabled, the value of this define does not have any effect.

#define M_NO_TIME   0

Flag that disables time functions.

This disables a set of classes and features related to time. The flag is zero by default, time is enabled, and it is useful in rare cases when time is not used, but the memory is such a precious resource that squeezing a few extra bytes makes a lot of sense.

#define M_NO_UNALIGNED_DATA   1

Tells whether the processor can handle unaligned data.

If this is nonzero all data manipulation will be made only on properly aligned data. For example, integers will have to be located on an address divisible by four for a value to be taken, a double precision number will locate on an address divisible by eight and so on. Defining this to zero can give some minor boost in performance.

If this value is not defined a guess is attempted based on processor architecture. Currently only Intel allows unaligned data. Possible C preprocessor defines are taken from http://sourceforge.net/p/predef/wiki/Architectures/

#define M_NO_VARIANT   0

Flag that disables MVariant class.

This define is very restrictive, incompatible with many features of MeteringSDK, but it saves lots of code space.

#define M_NO_VERBOSE_ERROR_INFORMATION   0

No verbose error information significantly decreases the size of the executable image.

Zero by default, error information is verbose. Defining it to one helps fit the executable image into a small memory device.

#define M_NO_WCHAR_T   0

Flag that disables all uses of type wchar_t, including unicode conversion functions and unicode strings.

Enabled by default with zero value, can be disabled when a plain char client application does not need any wchar_t support.

See also
M_UNICODE - whether to use unicode strings primarily.
#define M_NO_XML   0

Whether or not to support XML classes.

By default, XML classes are present in MCORE, the macro value is zero.

#define M_NORETURN_FUNC

Function declared to never return.

Typically, this is either a function that always throws an exception, or a function that calls exit().

#define M_NUMBER_OF_ARRAY_ELEMENTS (   x)    ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))

Compiler and operating system independent unsigned integer types.

Macro for calculation of size of statically allocated arrays.

The array given as parameter should be defined with explicit subscripts, and the declaration has to be visible. The parameter should not be just a pointer to the array. Otherwise the macro expands into a compile error.

The implementation is tricky, and it was borrowed from Chromium project.

#define M_OBJECT_PROPERTY_BOOL (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BOOL, MClass::ST_bool_X, MClass::ST_X_bool, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has Boolean value.
Definition: MVariant.h:27

Define the object Boolean property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_BOOL_EXACT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BOOL, MClass::ST_bool_X, MClass::ST_X_bool, \
(MObject::Method)&M ## Class::Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has Boolean value.
Definition: MVariant.h:27

Define the object Boolean property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_BYTE (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BYTE, MClass::ST_byte_X, MClass::ST_X_byte, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has Byte value.
Definition: MVariant.h:28

Define the object Byte property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_BYTE_STRING (   Class,
  Property,
  getMethodSignature,
  putMethodSignature 
)
Value:
{# Property, MVariant::VAR_BYTE_STRING, MClass::getMethodSignature, MClass::putMethodSignature, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has the byte string.
Definition: MVariant.h:33

Define the object byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_BYTE_STRING_COLLECTION (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT_COLLECTION, MClass::getMethodSignature, MClass::ST_X_constMByteStringVectorA, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Array of any type of elements, array of variants.
Definition: MVariant.h:38

Define the object byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_CHAR (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_CHAR, MClass::ST_char_X, MClass::ST_X_char, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has Character value.
Definition: MVariant.h:29

Define the object Char property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_DOUBLE (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_DOUBLE, MClass::ST_double_X, MClass::ST_X_double, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has double value.
Definition: MVariant.h:32

Define the object double precision property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_INT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_INT, MClass::ST_int_X, MClass::ST_X_int, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has integer value.
Definition: MVariant.h:31

Define the object Integer property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_OBJECT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_OBJECT, MClass::ST_MObjectP_X, MClass::ST_X_MObjectP, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has an object.
Definition: MVariant.h:36

Define the object property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_OBJECT_EMBEDDED (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_OBJECT_EMBEDDED, MClass::getMethodSignature, MClass::ST_X_MObjectP, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Object, embedded into the variant, can be copied with memory copy operation.
Definition: MVariant.h:37

Define the embedded object property.

See details in MObject class header comment. Get method signature is most often ST_MObject_X, but it can be ST_MObjectByValue_X.

#define M_OBJECT_PROPERTY_OBJECT_OVERLOADED (   Class,
  Property,
  GetPropertyImpl,
  SetPropertyImpl 
)
Value:
{# Property, MVariant::VAR_OBJECT, MClass::ST_MObjectP_X, MClass::ST_X_MObjectP, \
(MObject::Method)&M ## Class::GetPropertyImpl, NULL, (MObject::Method)&M ## Class::SetPropertyImpl, NULL, NULL},
Variant has an object.
Definition: MVariant.h:36

Define the object property with the explicit name.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_PERSISTENT_BOOL (   Class,
  Property,
  defaultValue 
)
Value:
{# Property, MVariant::VAR_BOOL, MClass::ST_bool_X, MClass::ST_X_bool, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)-1, (int)(defaultValue)},
Variant has Boolean value.
Definition: MVariant.h:27

Define the object Boolean persistent property with default value.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_PERSISTENT_BYTE (   Class,
  Property,
  defaultValue 
)
Value:
{# Property, MVariant::VAR_BYTE, MClass::ST_byte_X, MClass::ST_X_byte, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)-1, (int)(defaultValue)},
Variant has Byte value.
Definition: MVariant.h:28

Define the object Byte persistent property with default value.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_PERSISTENT_BYTE_STRING (   Class,
  Property,
  defaultValue,
  defaultValueLen,
  getMethodSignature,
  putMethodSignature 
)
Value:
{# Property, MVariant::VAR_BYTE_STRING, MClass::getMethodSignature, MClass::putMethodSignature, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)defaultValue, defaultValueLen},
Variant has the byte string.
Definition: MVariant.h:33

Define the object byte string persistent property with default value.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_PERSISTENT_CHAR (   Class,
  Property,
  defaultValue 
)
Value:
{# Property, MVariant::VAR_CHAR, MClass::ST_char_X, MClass::ST_X_char, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)-1, (int)(defaultValue)},
Variant has Character value.
Definition: MVariant.h:29

Define the object Char persistent property with default value.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_PERSISTENT_DOUBLE (   Class,
  Property,
  defaultValue 
)
Value:
{# Property, MVariant::VAR_DOUBLE, MClass::ST_double_X, MClass::ST_X_double, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)&defaultValue, 0},
Variant has double value.
Definition: MVariant.h:32

Define the object Double persistent property with default value.

See details in MObject class header comment.

Different from the other persistent properties, the default value for this one has to be a pointer to a static constant.

#define M_OBJECT_PROPERTY_PERSISTENT_INT (   Class,
  Property,
  defaultValue 
)
Value:
{# Property, MVariant::VAR_INT, MClass::ST_int_X, MClass::ST_X_int, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)-1, (int)(defaultValue)},
Variant has integer value.
Definition: MVariant.h:31

Define the object Integer persistent property with default value.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_PERSISTENT_STRING (   Class,
  Property,
  defaultValue,
  getMethodSignature,
  putMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING, MClass::getMethodSignature, MClass::putMethodSignature, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)(MConstChars)(defaultValue)},
const char * MConstChars
Pointer to zero terminated constant character array that represents a readable text.
Definition: MCOREDefs.h:951
Variant has string value.
Definition: MVariant.h:34

Define the object string persistent property with default value.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_PERSISTENT_UINT (   Class,
  Property,
  defaultValue 
)
Value:
{# Property, MVariant::VAR_UINT, MClass::ST_unsigned_X, MClass::ST_X_unsigned, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)-1, (int)(defaultValue)},
Variant has unsigned integer value. Its conversion rate is smaller than INT, not like in C...
Definition: MVariant.h:30

Define the object Unsigned Integer persistent property with default value.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_PERSISTENT_VARIANT (   Class,
  Property,
  defaultValue,
  getMethodSignature,
  putMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT, MClass::getMethodSignature, MClass::putMethodSignature, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, (void*)-1, (int)(defaultValue)},
Variant type by itself. Used externally by applications to denote variant as the whole type...
Definition: MVariant.h:40

Define the object variant persistent property with default value.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_BOOL (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BOOL, MClass::ST_bool_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has Boolean value.
Definition: MVariant.h:27

Define the object read-only Boolean property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_BOOL_EXACT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BOOL, MClass::ST_bool_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Property, NULL, NULL, NULL, NULL},
Variant has Boolean value.
Definition: MVariant.h:27

Define the object read-only Boolean property with the exact name.

See details in MObject class header comment. This one is suitable for properties like IsEmpty, IsReadOnly and so on.

#define M_OBJECT_PROPERTY_READONLY_BYTE (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_BYTE, MClass::ST_byte_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has Byte value.
Definition: MVariant.h:28

Define the object Byte property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_BYTE_STRING (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_BYTE_STRING, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has the byte string.
Definition: MVariant.h:33

Define the object read-only byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_CHAR (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_CHAR, MClass::ST_char_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has Character value.
Definition: MVariant.h:29

Define the object Char property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_DOUBLE (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_DOUBLE, MClass::ST_double_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has double value.
Definition: MVariant.h:32

Define the object read-only double precision property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_INT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_INT, MClass::ST_int_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has integer value.
Definition: MVariant.h:31

Define the object read-only Integer property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_INT_EXACT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_INT, MClass::ST_int_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Property, NULL, NULL, NULL, NULL},
Variant has integer value.
Definition: MVariant.h:31

Define the object read-only Integer property with exact name.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_OBJECT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_OBJECT, MClass::ST_MObjectP_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has an object.
Definition: MVariant.h:36

Define the object read-only object property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_OBJECT_EMBEDDED (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_OBJECT_EMBEDDED, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Object, embedded into the variant, can be copied with memory copy operation.
Definition: MVariant.h:37

Define the embedded read-only object property.

See details in MObject class header comment. Get method signature is most often ST_MObject_X, but it can be ST_MObjectByValue_X.

#define M_OBJECT_PROPERTY_READONLY_OBJECT_EMBEDDED_EXACT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_OBJECT_EMBEDDED, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Property, NULL, NULL, NULL, NULL},
Object, embedded into the variant, can be copied with memory copy operation.
Definition: MVariant.h:37

Define the embedded read-only object property with the exact name.

See details in MObject class header comment. Get method signature is most often ST_MObject_X, but it can be ST_MObjectByValue_X.

#define M_OBJECT_PROPERTY_READONLY_OBJECT_EXACT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_OBJECT, MClass::ST_MObjectP_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Property, NULL, NULL, NULL, NULL},
Variant has an object.
Definition: MVariant.h:36

Define the object read-only object property with the exact name.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_STRING (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has string value.
Definition: MVariant.h:34

Define the object read-only byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_STRING_COLLECTION (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING_COLLECTION, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has string collection value.
Definition: MVariant.h:35

Define the object read-only byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_STRING_EXACT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Property, NULL, NULL, NULL, NULL},
Variant has string value.
Definition: MVariant.h:34

Define the object read-only byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_UINT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_UINT, MClass::ST_unsigned_X, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant has unsigned integer value. Its conversion rate is smaller than INT, not like in C...
Definition: MVariant.h:30

Define the object read-only Unsigned Integer property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_VARIANT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Variant type by itself. Used externally by applications to denote variant as the whole type...
Definition: MVariant.h:40

Define the object read-only variant property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_VARIANT_COLLECTION (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT_COLLECTION, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Get ## Property, NULL, NULL, NULL, NULL},
Array of any type of elements, array of variants.
Definition: MVariant.h:38

Define the object read-only byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_READONLY_VARIANT_EXACT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT, MClass::getMethodSignature, MClass::ST__NULL, \
(MObject::Method)&M ## Class::Property, NULL, NULL, NULL, NULL},
Variant type by itself. Used externally by applications to denote variant as the whole type...
Definition: MVariant.h:40

Define the object read-only variant property, exact name.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_STRING (   Class,
  Property,
  getMethodSignature,
  putMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING, MClass::getMethodSignature, MClass::putMethodSignature, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has string value.
Definition: MVariant.h:34

Define the object byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_STRING_COLLECTION (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING_COLLECTION, MClass::getMethodSignature, MClass::ST_X_constMStdStringVectorA, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has string collection value.
Definition: MVariant.h:35

Define the object byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_STRING_EXACT (   Class,
  Property,
  getMethodSignature,
  putMethodSignature 
)
Value:
{# Property, MVariant::VAR_STRING, MClass::getMethodSignature, MClass::putMethodSignature, \
(MObject::Method)&M ## Class::Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has string value.
Definition: MVariant.h:34

Define the object byte string property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_UINT (   Class,
  Property 
)
Value:
{# Property, MVariant::VAR_UINT, MClass::ST_unsigned_X, MClass::ST_X_unsigned, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant has unsigned integer value. Its conversion rate is smaller than INT, not like in C...
Definition: MVariant.h:30

Define the object Unsigned Integer property.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_VARIANT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT, MClass::getMethodSignature, MClass::ST_X_constMVariantA, \
(MObject::Method)&M ## Class::Get ## Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant type by itself. Used externally by applications to denote variant as the whole type...
Definition: MVariant.h:40

Define the object property of type MVariant.

See details in MObject class header comment.

#define M_OBJECT_PROPERTY_VARIANT_EXACT (   Class,
  Property,
  getMethodSignature 
)
Value:
{# Property, MVariant::VAR_VARIANT, MClass::getMethodSignature, MClass::ST_X_constMVariantA, \
(MObject::Method)&M ## Class::Property, NULL, (MObject::Method)&M ## Class::Set ## Property, NULL, NULL},
Variant type by itself. Used externally by applications to denote variant as the whole type...
Definition: MVariant.h:40

Define the object property of type MVariant.

See details in MObject class header comment.

#define M_OBJECT_SERVICE (   Class,
  Service,
  serviceType 
)    {# Service, -1, MClass::serviceType, (MObject::Method)&M ## Class::Service, NULL},

Define the object service.

See details in MObject class header comment.

#define M_OBJECT_SERVICE_NAMED (   Class,
  Service,
  ServiceImpl,
  serviceType 
)    {# Service, -1, MClass::serviceType, (MObject::Method)&M ## Class::ServiceImpl, NULL},

Define the object service with a name different than the implementation.

See details in MObject class header comment.

#define M_OBJECT_SERVICE_OVERLOADED (   Class,
  Service,
  ServiceImpl,
  numParameters,
  serviceType 
)    {# Service, numParameters, MClass::serviceType, (MObject::Method)&M ## Class::ServiceImpl, NULL},

Define the object service with the explicit name and number of parameters.

This is to help implement services with default parameters. See details in MObject class header comment.

#define M_OPT_STR (   s)    (s)

Helper macro that handles compile mode related to absence of a string in the exception and log.

#define M_OS_ANDROID   0x8000000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_ANSI_C   0x00000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_BSD   0x4000000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_CMX   0x400000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_CYGWIN   0x40000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_DOS   0x00001

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_DOS16   0x00003

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_DOS32   0x00007

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_LINUX   0x80000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_NUTTX   0x200000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_POSIX   0x10000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_QNXNTO   0x2000000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_UCLINUX   0x100000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_UNIX   0x20000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_WIN32   0x00040

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_WIN32_CE   0x01000

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_WIN64   0x00080

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_OS_WINDOWS   0x00010

Operating system interface masks.

One can use M_OS macro in conjunction with these flags to determine which OS interface is supported. These are the defines to allow their usage at compile time. At runtime more precise information is available through MGetRuntimeOSMask call.ANSI C interface required

#define M_POINTER_BIT_SIZE   32

Macro that tells the bit size of a pointer.

Note that it is assumed that unsigned integer and plain integer have the same size.

#define M_PRINTF_FORMAT (   f,
 
)

Declare that the function parameter is a printf format.

This macro helps find bad format uses using gcc compiler

#define M_PRODUCT_LEGAL_COPYRIGHT   "Copyright (c) 1997-2017 Elster Solutions"

Copyright message of the whole product.

This define is typically made in configuration file MeteringSDKSettings.h the code below creates the default value if it was not.

#define M_PRODUCT_VERSION   "1.0.0.0"

Product version string.

This define is typically made in configuration file MeteringSDKSettings.h the code below creates the default value if it was not.

#define M_PRODUCT_VERSION_STRING   M_MACRO_STRING(M_MACRO_CONCATENATE7(M_PRODUCT_VERSION_MAJOR, ., M_PRODUCT_VERSION_MIDDLE, ., M_PRODUCT_VERSION_MINOR, ., M_PRODUCT_VERSION_TAG))

Product version string, can be defined in the configuration file or composed from entities there.

If product version is not found in MeteringSDKSettings.h configuration file, it is composed from mandatory macros M_PRODUCT_VERSION_MAJOR, M_PRODUCT_VERSION_MIDDLE, M_PRODUCT_VERSION_MINOR, and M_PRODUCT_VERSION_TAG.

#define M_ROUND_TO (   type,
 
)    MRoundTo<type>(d)

Round the floating number to the type specified as template parameter.

The feature is implemented as a macro for compiler compatibility reasons, and it is equivalent to the function MMath::RoundTo<type>(value), except that the usage is different.

Precondition
The first parameter has to be the integer type, the second parameter has to be of type double. Certain checking is provided for compilers that support function templates with template parameters that do not depend on the function parameters.
#define M_RTTI_SUPPORTED   1

Macro M_RTTI_SUPPORTED will tell the best guess if RTTI is supported by the current compiler and its options.

It is used primarily internally.

#define M_SET_PERSISTENT_PROPERTIES_TO_DEFAULT (   Class)    DoSetPersistentPropertiesToDefault(&s_class)

Set all persistent properties of this object and all its parents to default values.

This macro is typically called from constructors of classes that have persistent properties.

#define M_SHARED_POINTER_CLASS (   C)
Value:
public: typedef MSharedPointer<M ## C> SharedPointer; \
private: MInterlocked m_numRefs; \
friend class MSharedPointer<M ## C>;
Generic intrusive shared pointer.
Definition: MSharedPointer.h:58
System independent lightweight synchronization object that synchronizes the access to one variable ac...
Definition: MInterlocked.h:21

Macro that should be defined at the end of the class, which is the client of MSharedPointer.

The macro will define type SharedPointer, and a set of private definitions needed to implement the functionality.

Parameters
C- the parameter is the class name without the M prefix.
See also
MSharedPointer for more information and an example.
#define M_SHARED_POINTER_CLASS_INIT   m_numRefs(0)

Macro that should be defined at the initialization section of constructor for the shared class.

If there is more data to follow, just use comma after the macro.

See also
MSharedPointer for more information and an example.
#define M_START_METHODS (   Class)
Value:
{""} }; \
const MServiceDefinition s__services ## Class[] = {
Service definition of the object.
Definition: MServiceDefinition.h:21

This macro has to be defined in every MObject child in the class macro definitions.

See MObject class definition for details.

#define M_START_PROPERTIES (   Class)    const MPropertyDefinition s__properties ## Class[] = {

This macro has to be defined in every MObject child at the beginning of the class macro definitions.

See MObject class definition for details.

#define M_THREAD_LOCAL_POINTER (   T)    MThreadLocalPointer<T>

API based thread storage specifier for a variable, most portable implementation.

With this approach, a thread local variable is declared like this:

1 // Notice that myThreadLocalVariable will be a pointer of type MyType*
2 //
3 M_THREAD_LOCAL_POINTER(MyType) myThreadLocalVariable;

To ensure portability, using this define requires compiling code with either 0 or 1 value of M__USE_THREAD_LOCAL_POINTER.

See also
MThreadLocalStorage class that implements API based variant of the pointer.
M_THREAD_LOCAL_STORAGE_VARIABLE less portable but more efficient thread local storage.
M__USE_THREAD_LOCAL_POINTER determines which method is used for M_THREAD_LOCAL_POINTER.
#define M_THREAD_LOCAL_STORAGE_VARIABLE   __thread

Compiler-native thread storage specifier for a variable, efficient implementation.

With this approach, a thread local variable is declared like this:

1 M_THREAD_LOCAL_STORAGE_VARIABLE MyType myThreadLocalVariable;

List of known platforms where this is supported (Notice that Windows XP has a buggy implementation!):

  • Windows since Windows Vista using Visual C++ and Borland C++Builder
  • Linux with GCC version >= 45000
  • Very likely, many other GCC based platforms
See also
MThreadLocalPointer for more portable but less efficient API based implementation.
M_THREAD_LOCAL_POINTER for a conditional macro that attempts to determine the most efficient while portable/workable implementation.
#define M_TIMER64_SUPPORT   1

Whether the platform supports 64-bit timer.

All platforms except of Windows XP and older support 64-bit timers. This is a compilation option, not runtime. Therefore, if the software has to support Windows XP, compiled accordingly with _WIN32_WINNT below 0x0600, 32-bit timers will be used, and those will roll over in about 25 days.

#define M_UNICODE   0

Whether the UNICODE version of the library has to be built or used.

When UNICODE is enabled, UTF-8 representation of human readable strings is used on all platforms.

See also
M_NO_WCHAR_T - whether to include wchar_t handling (required for M_UNICODE builds).
#define M_UNSIGNED_LONG_BIT_SIZE   64

Macro that tells the bit size of an unsigned long value.

On the known 32-bit operating systems unsigned long and long are always 32 bits. On the known 64-bit operating systems Windows has a 32-bit unsigned long while all the other OSes such as Linux have it 64-bits.

#define M_UNUSED_FIELD

Specifies that the field within class or record is not used.

The effect of the macro depends on the compiler, operating system, and compilation mode.

#define M_UNUSED_TYPEDEF

Specifies that the type definition that follows this macro is not used.

The effect of the macro depends on the compiler, operating system, and compilation mode.

#define M_USE_CRYPTOAPI   0

Whether to use Microsoft Crypto API as available in Windows.

When M_USE_CRYPTOAPI is enabled, M_USE_OPENSSL and M_USE_CRYPTODEV should be 0.

#define M_USE_CRYPTODEV   0

Whether to use /dev/crypto device as available in Linux.

When M_USE_CRYPTODEV is enabled, M_USE_OPENSSL and M_USE_CRYPTOAPI should be 0.

#define M_USE_OPENSSL   0

Whether to use Open SSL library.

When M_USE_OPENSSL is enabled, M_USE_CRYPTOAPI and M_USE_CRYPTODEV should be 0.

#define M_USED_VARIABLE (   v)    (void)(v)

Declare that the given variable is used, possibly compiler-dependent.

The parameter shall be a single variable name.

#define MAnsiToStdString (   s)    (s)

Legacy conversion macros, please expand in your source code.

#define MByteToStdString (   s)    (s)

Legacy conversion macros, please expand in your source code.

#define MCORE_PROJECT_COMPILING   0

This macro has to be set to zero when MCORE is built.

It is done in the make files. Default is use library, not build it.

#define MStdToAnsiString (   s)    (s)

Legacy conversion macros, please expand in your source code.

#define MStdToByteString (   s)    (s)

Legacy conversion macros, please expand in your source code.

#define MStdToWideString (   s)    MToWideString(s)

Legacy conversion macros, please expand in your source code.

#define MToAnsiString   MToStdString

Legacy conversion macros, please expand in your source code.

#define MWideToStdString (   s)    MToStdString(s)

Legacy conversion macros, please expand in your source code.

Typedef Documentation

typedef std::string MAnsiString

Legacy define, equivalent of MStdString.

See also
MStdString
typedef std::string MByteString

Byte string, used for byte buffer handling purpose.

Note that this is not the same as the readable character string. It has usage of STL basic_string, but the underlying implementation can be different in case the compiler does not support STL.

typedef char MChar

Type for a single human readable character, legacy define.

This type is discouraged from usage as a single char will not be able to represent a locale-sensitive non-English readable character. Always use a string for locale dependent human readable text.

typedef const char* MConstChars

Pointer to zero terminated constant character array that represents a readable text.

This type definition is to distinguish from plain const char* that can stand for an array of raw bytes.

typedef const signed char* MConstLocalChars

Pointer to zero-terminated constant ASCII characters that are to be localized.

This is typically an English text. A unique signed character pointer is used so the compile errors can be seen at the case of misuse.

typedef std::string MStdString

Plain standard character string in utf-8 encoding.

Note that this is not necessarily the same type as MByteString. It has usage of STL basic_string, but the underlying implementation can be different in case the compiler does not support STL. Note that this is not necessarily the same type as MByteString, and the direct assignments between them are not allowed.

typedef std::wstring MWideString

UNICODE-based wide character string.

It is possible that this type gets defined only in the UNICODE version. It has usage of STL basic_string, but the underlying implementation can be different in case the compiler does not support STL.

Function Documentation

M_FUNC void MAddDirectorySeparatorIfNecessary ( MStdString directory)

Add a directory separator if it is not at the end of the path (directory).

Like in UNIX, if the directory name is /tmp/tools, the result path will be /tmp/tools/. If it was /tmp/tools/ already, this function will do nothing. If the directory is an empty string (assuming the current one), nothing is done too.

void MEncryptDecryptLite ( char *  dest,
const char *  src,
unsigned  size 
)
inline

Lite pseudo-encryption-decryption algorithm.

Applied twice on the buffer, it yields the same value. The size shall be divisible by eight, and the source shall be aligned to double word boundary.

Precondition
The source and destination are valid pointers. The size is divisible by eight. Debug version has certain limited checking for validity of this condition.
M_FUNC size_t MFormat ( char *  buf,
size_t  size,
const char *  format,
  ... 
)

Set the DLL instance of the current library.

This service is used for initialization purpose only in case the current MeteringSDK is a DLL library. In this case call it from DllMain of that library with the library instance given as parameter. String formatter global function.

Format specification corresponds to standard library printf function, described as follows:

The length modifier:

  • hh - the following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.
  • h - the following integer conversion corresponds to a short int or unsigned short int argument, or a following n conversion corresponds to a pointer to a short int argument.
  • l - the following integer conversion corresponds to a long int or unsigned long int argument, or a following n conversion corresponds to a pointer to a long int argument, or a following c conversion corresponds to a wchar_t argument, or a following s conversion corresponds to a pointer to wchar_t argument.
  • ll - a following integer conversion corresponds to a long long int or unsigned long long int argument, or a following n conversion corresponds to a pointer to a long long int argument.
  • q - this is a synonym for ll.
  • z - the following integer conversion corresponds to a size_t or ssize_t argument.
  • t - the following integer conversion corresponds to a ptrdiff_t argument.

The conversion specifier:

  • d, i - the int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • o, u, x, X - the unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • e, E - the double argument is rounded and converted in the style [-]d.ddde-/+dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.
  • f, F - the double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.
  • g, G - the double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
  • c - if no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb function, with a conversion state starting in the initial state, and the resulting multibyte string is written.
  • s - if an h modifier is present: The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte ('\0'); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

    If an l modifier is present: The const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

  • p - the void* pointer argument is printed in hexadecimal (as if by "%#x" or "%#lx").
  • n - the number of characters written so far is stored into the integer indicated by the int * (or variant) pointer argument. No argument is converted.
  • C - When used with character buffer and format, specifies a wide-character (wchar_t); when used with wide-character buffer and format, specifies a single-byte character (char).
  • S - When used with character buffer and format, specifies a wide-character string (wchar_t*); when used with wide-character buffer and format, specifies a single-byte character string (char*).
  • % - a '' is written. No argument is converted. The complete conversion specification is '%'.
M_FUNC size_t MFormat ( wchar_t *  buf,
size_t  size,
const wchar_t *  format,
  ... 
)

Set the DLL instance of the current library.

This service is used for initialization purpose only in case the current MeteringSDK is a DLL library. In this case call it from DllMain of that library with the library instance given as parameter. String formatter global function.

Format specification corresponds to standard library printf function, described as follows:

The length modifier:

  • hh - the following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.
  • h - the following integer conversion corresponds to a short int or unsigned short int argument, or a following n conversion corresponds to a pointer to a short int argument.
  • l - the following integer conversion corresponds to a long int or unsigned long int argument, or a following n conversion corresponds to a pointer to a long int argument, or a following c conversion corresponds to a wchar_t argument, or a following s conversion corresponds to a pointer to wchar_t argument.
  • ll - a following integer conversion corresponds to a long long int or unsigned long long int argument, or a following n conversion corresponds to a pointer to a long long int argument.
  • q - this is a synonym for ll.
  • z - the following integer conversion corresponds to a size_t or ssize_t argument.
  • t - the following integer conversion corresponds to a ptrdiff_t argument.

The conversion specifier:

  • d, i - the int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • o, u, x, X - the unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • e, E - the double argument is rounded and converted in the style [-]d.ddde-/+dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.
  • f, F - the double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.
  • g, G - the double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
  • c - if no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb function, with a conversion state starting in the initial state, and the resulting multibyte string is written.
  • s - if an h modifier is present: The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte ('\0'); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

    If an l modifier is present: The const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

  • p - the void* pointer argument is printed in hexadecimal (as if by "%#x" or "%#lx").
  • n - the number of characters written so far is stored into the integer indicated by the int * (or variant) pointer argument. No argument is converted.
  • C - When used with character buffer and format, specifies a wide-character (wchar_t); when used with wide-character buffer and format, specifies a single-byte character (char).
  • S - When used with character buffer and format, specifies a wide-character string (wchar_t*); when used with wide-character buffer and format, specifies a single-byte character string (char*).
  • % - a '' is written. No argument is converted. The complete conversion specification is '%'.
M_FUNC size_t MFormatLc ( char *  buf,
size_t  size,
const char *  format,
const lconv *  lc,
  ... 
)

Set the DLL instance of the current library.

This service is used for initialization purpose only in case the current MeteringSDK is a DLL library. In this case call it from DllMain of that library with the library instance given as parameter. String formatter global function.

Format specification corresponds to standard library printf function, described as follows:

The length modifier:

  • hh - the following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.
  • h - the following integer conversion corresponds to a short int or unsigned short int argument, or a following n conversion corresponds to a pointer to a short int argument.
  • l - the following integer conversion corresponds to a long int or unsigned long int argument, or a following n conversion corresponds to a pointer to a long int argument, or a following c conversion corresponds to a wchar_t argument, or a following s conversion corresponds to a pointer to wchar_t argument.
  • ll - a following integer conversion corresponds to a long long int or unsigned long long int argument, or a following n conversion corresponds to a pointer to a long long int argument.
  • q - this is a synonym for ll.
  • z - the following integer conversion corresponds to a size_t or ssize_t argument.
  • t - the following integer conversion corresponds to a ptrdiff_t argument.

The conversion specifier:

  • d, i - the int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • o, u, x, X - the unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • e, E - the double argument is rounded and converted in the style [-]d.ddde-/+dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.
  • f, F - the double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.
  • g, G - the double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
  • c - if no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb function, with a conversion state starting in the initial state, and the resulting multibyte string is written.
  • s - if an h modifier is present: The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte ('\0'); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

    If an l modifier is present: The const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

  • p - the void* pointer argument is printed in hexadecimal (as if by "%#x" or "%#lx").
  • n - the number of characters written so far is stored into the integer indicated by the int * (or variant) pointer argument. No argument is converted.
  • C - When used with character buffer and format, specifies a wide-character (wchar_t); when used with wide-character buffer and format, specifies a single-byte character (char).
  • S - When used with character buffer and format, specifies a wide-character string (wchar_t*); when used with wide-character buffer and format, specifies a single-byte character string (char*).
  • % - a '' is written. No argument is converted. The complete conversion specification is '%'.
M_FUNC size_t MFormatLc ( wchar_t *  buf,
size_t  size,
const wchar_t *  format,
const lconv *  lc,
  ... 
)

Set the DLL instance of the current library.

This service is used for initialization purpose only in case the current MeteringSDK is a DLL library. In this case call it from DllMain of that library with the library instance given as parameter. String formatter global function.

Format specification corresponds to standard library printf function, described as follows:

The length modifier:

  • hh - the following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.
  • h - the following integer conversion corresponds to a short int or unsigned short int argument, or a following n conversion corresponds to a pointer to a short int argument.
  • l - the following integer conversion corresponds to a long int or unsigned long int argument, or a following n conversion corresponds to a pointer to a long int argument, or a following c conversion corresponds to a wchar_t argument, or a following s conversion corresponds to a pointer to wchar_t argument.
  • ll - a following integer conversion corresponds to a long long int or unsigned long long int argument, or a following n conversion corresponds to a pointer to a long long int argument.
  • q - this is a synonym for ll.
  • z - the following integer conversion corresponds to a size_t or ssize_t argument.
  • t - the following integer conversion corresponds to a ptrdiff_t argument.

The conversion specifier:

  • d, i - the int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • o, u, x, X - the unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • e, E - the double argument is rounded and converted in the style [-]d.ddde-/+dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.
  • f, F - the double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.
  • g, G - the double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
  • c - if no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb function, with a conversion state starting in the initial state, and the resulting multibyte string is written.
  • s - if an h modifier is present: The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte ('\0'); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

    If an l modifier is present: The const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

  • p - the void* pointer argument is printed in hexadecimal (as if by "%#x" or "%#lx").
  • n - the number of characters written so far is stored into the integer indicated by the int * (or variant) pointer argument. No argument is converted.
  • C - When used with character buffer and format, specifies a wide-character (wchar_t); when used with wide-character buffer and format, specifies a single-byte character (char).
  • S - When used with character buffer and format, specifies a wide-character string (wchar_t*); when used with wide-character buffer and format, specifies a single-byte character string (char*).
  • % - a '' is written. No argument is converted. The complete conversion specification is '%'.
M_FUNC size_t MFormatVA ( char *  buf,
size_t  size,
const char *  format,
va_list  args 
)

Set the DLL instance of the current library.

This service is used for initialization purpose only in case the current MeteringSDK is a DLL library. In this case call it from DllMain of that library with the library instance given as parameter. String formatter global function.

Format specification corresponds to standard library printf function, described as follows:

The length modifier:

  • hh - the following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.
  • h - the following integer conversion corresponds to a short int or unsigned short int argument, or a following n conversion corresponds to a pointer to a short int argument.
  • l - the following integer conversion corresponds to a long int or unsigned long int argument, or a following n conversion corresponds to a pointer to a long int argument, or a following c conversion corresponds to a wchar_t argument, or a following s conversion corresponds to a pointer to wchar_t argument.
  • ll - a following integer conversion corresponds to a long long int or unsigned long long int argument, or a following n conversion corresponds to a pointer to a long long int argument.
  • q - this is a synonym for ll.
  • z - the following integer conversion corresponds to a size_t or ssize_t argument.
  • t - the following integer conversion corresponds to a ptrdiff_t argument.

The conversion specifier:

  • d, i - the int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • o, u, x, X - the unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • e, E - the double argument is rounded and converted in the style [-]d.ddde-/+dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.
  • f, F - the double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.
  • g, G - the double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
  • c - if no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb function, with a conversion state starting in the initial state, and the resulting multibyte string is written.
  • s - if an h modifier is present: The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte ('\0'); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

    If an l modifier is present: The const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

  • p - the void* pointer argument is printed in hexadecimal (as if by "%#x" or "%#lx").
  • n - the number of characters written so far is stored into the integer indicated by the int * (or variant) pointer argument. No argument is converted.
  • C - When used with character buffer and format, specifies a wide-character (wchar_t); when used with wide-character buffer and format, specifies a single-byte character (char).
  • S - When used with character buffer and format, specifies a wide-character string (wchar_t*); when used with wide-character buffer and format, specifies a single-byte character string (char*).
  • % - a '' is written. No argument is converted. The complete conversion specification is '%'.
M_FUNC size_t MFormatVA ( wchar_t *  buf,
size_t  size,
const wchar_t *  format,
va_list  args 
)

Set the DLL instance of the current library.

This service is used for initialization purpose only in case the current MeteringSDK is a DLL library. In this case call it from DllMain of that library with the library instance given as parameter. String formatter global function.

Format specification corresponds to standard library printf function, described as follows:

The length modifier:

  • hh - the following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.
  • h - the following integer conversion corresponds to a short int or unsigned short int argument, or a following n conversion corresponds to a pointer to a short int argument.
  • l - the following integer conversion corresponds to a long int or unsigned long int argument, or a following n conversion corresponds to a pointer to a long int argument, or a following c conversion corresponds to a wchar_t argument, or a following s conversion corresponds to a pointer to wchar_t argument.
  • ll - a following integer conversion corresponds to a long long int or unsigned long long int argument, or a following n conversion corresponds to a pointer to a long long int argument.
  • q - this is a synonym for ll.
  • z - the following integer conversion corresponds to a size_t or ssize_t argument.
  • t - the following integer conversion corresponds to a ptrdiff_t argument.

The conversion specifier:

  • d, i - the int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • o, u, x, X - the unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • e, E - the double argument is rounded and converted in the style [-]d.ddde-/+dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.
  • f, F - the double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.
  • g, G - the double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
  • c - if no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb function, with a conversion state starting in the initial state, and the resulting multibyte string is written.
  • s - if an h modifier is present: The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte ('\0'); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

    If an l modifier is present: The const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

  • p - the void* pointer argument is printed in hexadecimal (as if by "%#x" or "%#lx").
  • n - the number of characters written so far is stored into the integer indicated by the int * (or variant) pointer argument. No argument is converted.
  • C - When used with character buffer and format, specifies a wide-character (wchar_t); when used with wide-character buffer and format, specifies a single-byte character (char).
  • S - When used with character buffer and format, specifies a wide-character string (wchar_t*); when used with wide-character buffer and format, specifies a single-byte character string (char*).
  • % - a '' is written. No argument is converted. The complete conversion specification is '%'.
M_FUNC size_t MFormatVALc ( char *  buf,
size_t  size,
const char *  format,
const lconv *  lc,
va_list  args 
)

Set the DLL instance of the current library.

This service is used for initialization purpose only in case the current MeteringSDK is a DLL library. In this case call it from DllMain of that library with the library instance given as parameter. String formatter global function.

Format specification corresponds to standard library printf function, described as follows:

The length modifier:

  • hh - the following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.
  • h - the following integer conversion corresponds to a short int or unsigned short int argument, or a following n conversion corresponds to a pointer to a short int argument.
  • l - the following integer conversion corresponds to a long int or unsigned long int argument, or a following n conversion corresponds to a pointer to a long int argument, or a following c conversion corresponds to a wchar_t argument, or a following s conversion corresponds to a pointer to wchar_t argument.
  • ll - a following integer conversion corresponds to a long long int or unsigned long long int argument, or a following n conversion corresponds to a pointer to a long long int argument.
  • q - this is a synonym for ll.
  • z - the following integer conversion corresponds to a size_t or ssize_t argument.
  • t - the following integer conversion corresponds to a ptrdiff_t argument.

The conversion specifier:

  • d, i - the int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • o, u, x, X - the unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • e, E - the double argument is rounded and converted in the style [-]d.ddde-/+dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.
  • f, F - the double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.
  • g, G - the double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
  • c - if no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb function, with a conversion state starting in the initial state, and the resulting multibyte string is written.
  • s - if an h modifier is present: The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte ('\0'); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

    If an l modifier is present: The const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

  • p - the void* pointer argument is printed in hexadecimal (as if by "%#x" or "%#lx").
  • n - the number of characters written so far is stored into the integer indicated by the int * (or variant) pointer argument. No argument is converted.
  • C - When used with character buffer and format, specifies a wide-character (wchar_t); when used with wide-character buffer and format, specifies a single-byte character (char).
  • S - When used with character buffer and format, specifies a wide-character string (wchar_t*); when used with wide-character buffer and format, specifies a single-byte character string (char*).
  • % - a '' is written. No argument is converted. The complete conversion specification is '%'.
M_FUNC size_t MFormatVALc ( wchar_t *  buf,
size_t  size,
const wchar_t *  format,
const lconv *  lc,
va_list  args 
)

Set the DLL instance of the current library.

This service is used for initialization purpose only in case the current MeteringSDK is a DLL library. In this case call it from DllMain of that library with the library instance given as parameter. String formatter global function.

Format specification corresponds to standard library printf function, described as follows:

The length modifier:

  • hh - the following integer conversion corresponds to a signed char or unsigned char argument, or a following n conversion corresponds to a pointer to a signed char argument.
  • h - the following integer conversion corresponds to a short int or unsigned short int argument, or a following n conversion corresponds to a pointer to a short int argument.
  • l - the following integer conversion corresponds to a long int or unsigned long int argument, or a following n conversion corresponds to a pointer to a long int argument, or a following c conversion corresponds to a wchar_t argument, or a following s conversion corresponds to a pointer to wchar_t argument.
  • ll - a following integer conversion corresponds to a long long int or unsigned long long int argument, or a following n conversion corresponds to a pointer to a long long int argument.
  • q - this is a synonym for ll.
  • z - the following integer conversion corresponds to a size_t or ssize_t argument.
  • t - the following integer conversion corresponds to a ptrdiff_t argument.

The conversion specifier:

  • d, i - the int argument is converted to signed decimal notation. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • o, u, x, X - the unsigned int argument is converted to unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters abcdef are used for x conversions; the letters ABCDEF are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros. The default precision is 1. When 0 is printed with an explicit precision 0, the output is empty.
  • e, E - the double argument is rounded and converted in the style [-]d.ddde-/+dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears. An E conversion uses the letter E (rather than e) to introduce the exponent. The exponent always contains at least two digits; if the value is zero, the exponent is 00.
  • f, F - the double argument is rounded and converted to decimal notation in the style [-]ddd.ddd, where the number of digits after the decimal-point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears. If a decimal point appears, at least one digit appears before it.
  • g, G - the double argument is converted in style f or e (or F or E for G conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style e is used if the exponent from its conversion is less than -4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
  • c - if no l modifier is present, the int argument is converted to an unsigned char, and the resulting character is written. If an l modifier is present, the wint_t (wide character) argument is converted to a multibyte sequence by a call to the wcrtomb function, with a conversion state starting in the initial state, and the resulting multibyte string is written.
  • s - if an h modifier is present: The const char * argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating null byte ('\0'); if a precision is specified, no more than the number specified are written. If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte.

    If an l modifier is present: The const wchar_t * argument is expected to be a pointer to an array of wide characters. Wide characters from the array are converted to multibyte characters (each by a call to the wcrtomb function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character. The resulting multibyte characters are written up to (but not including) the terminating null byte. If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written. Note that the precision determines the number of bytes written, not the number of wide characters or screen positions. The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached.

  • p - the void* pointer argument is printed in hexadecimal (as if by "%#x" or "%#lx").
  • n - the number of characters written so far is stored into the integer indicated by the int * (or variant) pointer argument. No argument is converted.
  • C - When used with character buffer and format, specifies a wide-character (wchar_t); when used with wide-character buffer and format, specifies a single-byte character (char).
  • S - When used with character buffer and format, specifies a wide-character string (wchar_t*); when used with wide-character buffer and format, specifies a single-byte character string (char*).
  • % - a '' is written. No argument is converted. The complete conversion specification is '%'.
unsigned MFromBigEndianUINT16 ( Muint16  val)
inline

Convert a big endian two-byte value to the value which is handled by the current computer architecture.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

unsigned MFromBigEndianUINT16 ( const void *  twoBytes)
inline

Convert a big endian two-byte value given as its address to the value which is handled by the current computer architecture.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

Muint32 MFromBigEndianUINT24 ( Muint32  val)
inline

Convert a big endian three-byte value to the value which is handled by the current computer architecture.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

Muint32 MFromBigEndianUINT24 ( const void *  threeBytes)
inline

Convert a big endian three-byte value given as byte string to the value which is handled by the current computer architecture.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

Muint32 MFromBigEndianUINT32 ( Muint32  val)
inline

Convert a big endian 4-byte value to the value which is handled by the current computer architecture.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

Muint32 MFromBigEndianUINT32 ( const void *  fourBytes)
inline

Convert a big endian 4-byte value given as const void pointer according to the current computer architecture.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

unsigned MFromLittleEndianUINT16 ( Muint16  val)
inline

Convert a two-byte little endian value to the value which is handled by the current computer architecture.

On SUN SPARK and the like, this service swaps the bytes, while on Intel x86, i64, ARM, and the other little endian architectures it does nothing.

unsigned MFromLittleEndianUINT16 ( const void *  twoBytes)
inline

Convert a two-byte little endian value given as address to the value which is handled by the current computer architecture.

On SUN SPARK and the like, this service swaps the bytes, while on Intel x86, i64, ARM, and the other little endian architectures it does nothing.

unsigned MFromLittleEndianUINT32 ( const void *  fourBytes)
inline

Convert a four-byte little endian value given as address to the value which is handled by the current computer architecture.

On SUN SPARK and the like, this service swaps the bytes, while on Intel x86, i64, ARM, and the other little endian architectures it does nothing.

Muint64 MFromLittleEndianUINT64 ( const void *  eightBytes)
inline

Convert an eight-byte little endian value given as address to Muint64 value which is handled by the current computer architecture.

On SUN SPARK and the like, this service swaps the bytes, while on Intel x86, i64, ARM, and the other little endian architectures it does nothing.

M_FUNC unsigned MGetRuntimeOSMask ( )

Get the OS platform code, determined at runtime.

(opposite to compile-defined M_OS_ masks determined at compile time).

At present, the call will always return the value M_OS as it was known at compile time.

M_FUNC MStdString MGetStdString ( MConstLocalChars  str,
  ... 
)

Get the formatted string representation for given format with parameter expansion.

M_FUNC MStdString MGetStdString ( MConstChars  str,
  ... 
)

Get the formatted string representation for given format with parameter expansion.

M_FUNC MStdString MGetStdStringVA ( MConstLocalChars  str,
va_list  va 
)

Get the formatted string representation for given format with parameter expansion through va_list.

M_FUNC MStdString MGetStdStringVA ( MConstChars  str,
va_list  va 
)

Get the formatted string representation for given format with parameter expansion through va_list.

bool MPointerIsNull ( const void *  ptr)
inline

Silent way of checking if a given pointer is not null.

This is to avoid newer C++ compiler behavior of assuming pointer to 'this' and object references are never null.

The implementation might have to be reviewed for cases of aggressive whole-code optimization which can look at the implementation of MPointerIsNull.

template<class Type >
bool MReferenceIsNull ( const Type &  ref)

Silent way of checking if a given reference is actually a null pointer.

This is to avoid newer C++ compiler behavior of assuming pointer to 'this' and object references are never null.

template<typename T >
T MRoundTo ( double  d)

Round the floating number to the type specified as template parameter.

This function has to be used with caution, as not all compilers support the templates that do not depend on actual parameters.

Please use a macro M_ROUND_TO(type, value) if the compatibility with the older C++ compilers has to be achieved. Here is the usage:

1 int i = MRoundTo<int>(0.5);
2 char j = MRoundTo<char>(1.8);
M_FUNC size_t Mstrnlen ( const char *  string,
size_t  maxlen 
)

Convenience special version of strnlen that works in all supported platforms.

This is a multiplatform version of POSIX call strnlen.

M_FUNC size_t Mstrnlen ( const wchar_t *  string,
size_t  maxlen 
)

Convenience special version of strnlen that works in all supported platforms.

This is a multiplatform version of POSIX call strnlen.

Muint16 MToAlignedUINT16 ( const void *  twoBytes)
inline

Convert two bytes in a pointer, given as pointer, into a 16 byte unsigned integer value.

The pointer could be unaligned.

Muint32 MToAlignedUINT32 ( const void *  fourBytes)
inline

Convert two bytes in a pointer, given as pointer.

into a 16 byte unsigned integer value. The pointer could be unaligned.

Muint16 MToBigEndianUINT16 ( unsigned  val)
inline

Convert a two-byte value to a big endian value.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

void MToBigEndianUINT16 ( unsigned  val,
void *  twoBytes 
)
inline

Convert a two-byte value to a big endian value denoted by a given pointer.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

Muint32 MToBigEndianUINT24 ( Muint32  val)
inline

Convert a 32 byte unsigned integer value to a big endian value which is 24 bits long.

For the alignment reasons, the value through which this operation is handled is Muint32.

void MToBigEndianUINT24 ( unsigned  val,
void *  threeBytes 
)
inline

Convert a three-byte value to a big endian value denoted by a given pointer.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

void MToBigEndianUINT32 ( unsigned  val,
void *  fourBytes 
)
inline

Convert a four-byte value to a big endian value denoted by a given pointer.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

M_FUNC char* MToChars ( Mint64  value,
char *  buff 
)

Convert the long value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

M_FUNC wchar_t* MToChars ( Mint64  value,
wchar_t *  buff 
)

Convert the long value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

M_FUNC char* MToChars ( Muint64  value,
char *  buff 
)

Convert the unsigned long value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

M_FUNC wchar_t* MToChars ( Muint64  value,
wchar_t *  buff 
)

Convert the unsigned long value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

M_FUNC char* MToChars ( int  value,
char *  buff 
)

Convert the int value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

M_FUNC char* MToChars ( unsigned  value,
char *  buff 
)

Convert the int value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

M_FUNC wchar_t* MToChars ( int  value,
wchar_t *  buff 
)

Convert the int value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

M_FUNC wchar_t* MToChars ( unsigned  value,
wchar_t *  buff 
)

Convert the int value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

char* MToChars ( long  value,
char *  buff 
)
inline

Convert the long value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

wchar_t* MToChars ( long  value,
wchar_t *  buff 
)
inline

Convert the long value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

char* MToChars ( unsigned long  value,
char *  buff 
)
inline

Convert the unsigned long value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

wchar_t* MToChars ( unsigned long  value,
wchar_t *  buff 
)
inline

Convert the unsigned long value to a characters string, using the given buffer.

No exceptions can be thrown, but the supplied buffer has to have at least 16 characters.

M_FUNC char* MToChars ( double  value,
char *  buff,
bool  shortestFormat = false,
unsigned  precision = 14 
)

Convert the double precision value to a characters string, using the given buffer.

Parameters
valueThe number to convert.
buffDestination buffer of at least 24 bytes long.
shortestFormatIf false, ".0" will always be appended to whole numbers, this is the default. If true, if the number is whole, it will not have a decimal separator followed by zero.
precisionPrecision of the number representation. The value 14, default, guarantees absence of rounding artefacts. Precision 17 is the maximum, and the result number can look like 1.00000000000000001. Precisions above 17 are equivalent to 17.
M_FUNC wchar_t* MToChars ( double  value,
wchar_t *  buff,
bool  shortestFormat = false,
unsigned  precision = 14 
)

Convert the double precision value to a characters string, using the given buffer.

Parameters
valueThe number to convert.
buffDestination buffer of at least 24 bytes long.
shortestFormatIf false, ".0" will always be appended to whole numbers, this is the default. If true, if the number is whole, it will not have a decimal separator followed by zero.
precisionPrecision of the number representation. The value 14, default, guarantees absence of rounding artefacts. Precision 17 is the maximum, and the result number can look like 1.00000000000000001. Precisions above 17 are equivalent to 17.
M_FUNC double MToDouble ( const char *  str)

Convert a character string to a double precision floating point number.

If the string starts with 0x, the number is considered to be hexadecimal. Such hexadecimal number cannot have fraction or exponent. If the string does not represent a correct double precision floating point number, a conversion error is thrown.

Parameters
strString to convert to a double precision floating point number.
Returns
double - result of the conversion
double MToDouble ( const MByteString str)
inline

Convert a character string to a double precision floating point number.

If the string starts with 0x, the number is considered to be hexadecimal. Such hexadecimal number cannot have fraction or exponent. If the string does not represent a correct double precision floating point number, a conversion error is thrown.

Parameters
strString to convert to a double precision floating point number.
Returns
double - result of the conversion
M_FUNC double MToDouble ( const wchar_t *  str)

Convert a character string to a double precision floating point number.

If the string starts with 0x, the number is considered to be hexadecimal. Such hexadecimal number cannot have fraction or exponent. If the string does not represent a correct double precision floating point number, a conversion error is thrown.

Parameters
strString to convert to a double precision floating point number.
Returns
double - result of the conversion
double MToDouble ( const MWideString str)
inline

Convert a character string to a double precision floating point number.

If the string starts with 0x, the number is considered to be hexadecimal. Such hexadecimal number cannot have fraction or exponent. If the string does not represent a correct double precision floating point number, a conversion error is thrown.

Parameters
strString to convert to a double precision floating point number.
Returns
double - result of the conversion
M_FUNC int MToInt ( const char *  str)

Convert a character string to an integer number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct integer number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
int - result of the conversion
int MToInt ( const MByteString str)
inline

Convert a character string to an integer number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct integer number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
int - result of the conversion
M_FUNC int MToInt ( const wchar_t *  str)

Convert a character string to an integer number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct integer number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
int - result of the conversion
int MToInt ( const MWideString str)
inline

Convert a character string to an integer number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct integer number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
int - result of the conversion
M_FUNC Mint64 MToInt64 ( const char *  str)

Convert a character string to a 64-bit number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct 64-bit number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
Mint64 - result of the conversion
Mint64 MToInt64 ( const MByteString str)
inline

Convert a character string to a 64-bit number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct 64-bit number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
Mint64 - result of the conversion
M_FUNC Mint64 MToInt64 ( const wchar_t *  str)

Convert a character string to a 64-bit number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct 64-bit number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
Mint64 - result of the conversion
Mint64 MToInt64 ( const MWideString str)
inline

Convert a character string to a 64-bit number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct 64-bit number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
Mint64 - result of the conversion
Muint16 MToLittleEndianUINT16 ( unsigned  val)
inline

Convert a two-byte value to a little endian value.

On SUN SPARK and the like, this service swaps the bytes, while on Intel x86, i64, ARM, and the other little endian architectures it does nothing.

void MToLittleEndianUINT16 ( unsigned  val,
void *  twoBytes 
)
inline

Convert a two-byte value to a little endian value denoted by a given pointer.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

Muint32 MToLittleEndianUINT24 ( Muint32  val)
inline

Convert a 32 byte unsigned integer value to a little endian value which is 24 bits long.

For the alignment reasons, the value through which this operation is handled is Muint32.

void MToLittleEndianUINT32 ( unsigned  val,
void *  fourBytes 
)
inline

Convert a four-byte value to a little endian value denoted by a given pointer.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

void MToLittleEndianUINT64 ( Muint64  val,
void *  eightBytes 
)
inline

Convert an eight-byte value to a little endian value denoted by a given pointer.

On SUN SPARK and the like, this service does nothing, while on Intel x86, i64, ARM, and the other little endian architectures it swaps the bytes.

long MToLong ( const char *  str)
inline

Convert a character string to a long number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct long number, a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
long - result of the conversion
long MToLong ( const MByteString str)
inline

Convert a character string to a long number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct long number, a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
long - result of the conversion
long MToLong ( const wchar_t *  str)
inline

Convert a character string to a long number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct long number, a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
long - result of the conversion
long MToLong ( const MWideString str)
inline

Convert a character string to a long number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct long number, a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
long - result of the conversion
M_FUNC MStdString MToStdString ( Mint64  value)

Convert the long value to a standard string.

Memory exceptions can be thrown in case no memory is available, otherwise any long value can be represented as a string.

M_FUNC MStdString MToStdString ( Muint64  value)

Convert the unsigned long value to a standard string.

Memory exceptions can be thrown in case no memory is available, otherwise any unsigned long value can be represented as a string.

M_FUNC MStdString MToStdString ( int  value)

Convert the long value to a string standard string.

Memory exceptions can be thrown in case no memory is available, otherwise any integer value can be represented as a string.

M_FUNC MStdString MToStdString ( unsigned  value)

Convert the unsigned long value to a standard string.

Memory exceptions can be thrown in case no memory is available, otherwise any unsigned value can be represented as a string.

MStdString MToStdString ( long  value)
inline

Convert the long value to a standard string.

Memory exceptions can be thrown in case no memory is available, otherwise any long value can be represented as a string.

MStdString MToStdString ( unsigned long  value)
inline

Convert the unsigned long value to a standard string.

Memory exceptions can be thrown in case no memory is available, otherwise any unsigned long value can be represented as a string.

M_FUNC MStdString MToStdString ( double  value,
bool  shortestFormat = false,
unsigned  precision = 14 
)

Convert the double precision floating point value to string.

Memory exceptions can be thrown in case no memory is available, otherwise any double precision floating point value can be represented as a string.

Parameters
valueThe number to convert.
shortestFormatIf false, ".0" will always be appended to whole numbers, this is the default. If true, if the number is whole, it will not have a decimal separator followed by zero.
precisionPrecision of the number representation. The value 14, default, guarantees absence of rounding artefacts. Precision 17 is the maximum, and the result number can look like 1.00000000000000001. Precisions above 17 are equivalent to 17.
const MStdString& MToStdString ( const MByteString s)
inline

Convert the byte string value to a string.

Memory exceptions can be thrown in case no memory is available. In case of UNICODE, the conversion can yield many errors due to multibyte to UNICODE transformation.

M_FUNC MStdString MToStdString ( const wchar_t *  buff,
size_t  size 
)

Convert the constant character pointer to the standard ANSI string according to the current locale.

Convert the constant wide character pointer and size to the standard string, whether that is a UNICODE or plain character string.

Memory exceptions can be thrown in case no memory is available. The conversion can yield many errors due to multibyte to UNICODE transformation.

M_FUNC MStdString MToStdString ( const MWideString )

Convert the standard wide string to the standard ASCII string according to the current locale.

Memory exceptions can be thrown in case no memory is available. In case certain characters are invalid in the current locale, the result string could be unreadable.

M_FUNC MStdString MToStdString ( const char *  )

Convert the constant character pointer to the standard string, whether that is a UNICODE or plain character string.

If the given character pointer is NULL, an empty string is returned.

M_FUNC MStdString MToStdString ( const wchar_t *  )

Convert the constant wide character pointer to the standard string, whether that is a UNICODE or plain character string.

If the given character pointer is NULL, an empty string is returned.

M_FUNC Muint64 MToUInt64 ( const char *  str)

Convert a character string to an unsigned 64-bit number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct 64-bit number, a conversion error is thrown.

Parameters
strString to convert to an unsigned 64-bit number.
Returns
Muint64 - result of the conversion
Muint64 MToUInt64 ( const MByteString str)
inline

Convert a character string to an unsigned 64-bit number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct 64-bit number, a conversion error is thrown.

Parameters
strString to convert to an unsigned 64-bit number.
Returns
Muint64 - result of the conversion
M_FUNC Muint64 MToUInt64 ( const wchar_t *  str)

Convert a character string to an unsigned 64-bit number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct 64-bit number, a conversion error is thrown.

Parameters
strString to convert to an unsigned 64-bit number.
Returns
Muint64 - result of the conversion
Muint64 MToUInt64 ( const MWideString str)
inline

Convert a character string to an unsigned 64-bit number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct 64-bit number, a conversion error is thrown.

Parameters
strString to convert to an unsigned 64-bit number.
Returns
Muint64 - result of the conversion
M_FUNC unsigned MToUnsigned ( const char *  str)

Convert a character string to unsigned number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct unsigned number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
unsigned - result of the conversion
unsigned MToUnsigned ( const MByteString str)
inline

Convert a character string to unsigned number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct unsigned number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
unsigned - result of the conversion
M_FUNC unsigned MToUnsigned ( const wchar_t *  str)

Convert a character string to unsigned number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct unsigned number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
unsigned - result of the conversion
unsigned MToUnsigned ( const MWideString str)
inline

Convert a character string to unsigned number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct unsigned number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
unsigned - result of the conversion
unsigned long MToUnsignedLong ( const char *  str)
inline

Convert a character string to unsigned long number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct unsigned long number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
unsigned long - result of the conversion
unsigned long MToUnsignedLong ( const MByteString str)
inline

Convert a character string to unsigned long number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct unsigned long number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
unsigned long - result of the conversion
unsigned long MToUnsignedLong ( const wchar_t *  str)
inline

Convert a character string to unsigned long number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct unsigned long number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
unsigned long - result of the conversion
unsigned long MToUnsignedLong ( const MWideString str)
inline

Convert a character string to unsigned long number.

If the string starts with 0x, the number is considered to be hexadecimal. If the string does not represent a correct unsigned long number a conversion error is thrown.

Parameters
strString to convert to a number.
Returns
unsigned long - result of the conversion
M_FUNC MWideString MToWideString ( const char *  str)

Convert the zero terminated constant character pointer to the standard wide string according to the current locale.

Memory exceptions can be thrown in case no memory is available. The conversion can yield many errors due to multibyte to UNICODE transformation.

M_FUNC MWideString MToWideString ( const wchar_t *  str)

Convert the zero terminated constant wide character pointer to the standard ANSI string according to the current locale.

Memory exceptions can be thrown in case no memory is available. The conversion can yield many errors due to multibyte to UNICODE transformation.

M_FUNC MWideString MToWideString ( const char *  buff,
size_t  size 
)

Convert the constant character pointer to the standard wide string according to the current locale.

Memory exceptions can be thrown in case no memory is available. The conversion can yield many errors due to multibyte to UNICODE transformation.

M_FUNC MWideString MToWideString ( const MStdString )

Convert the standard ASCII string to the standard wide string according to the current locale.

Memory exceptions can be thrown in case no memory is available. The conversion can yield many errors due to multibyte to UNICODE transformation.

Variable Documentation

const MErrorEnum::Type M_ERR_BAD_GUID_FORMAT = static_cast<MErrorEnum::Type>(0x8004089E)

Format of GUID is bad.

  • Text: "Bad GUID format"
const MErrorEnum::Type M_ERR_SERVICE_S1_DOES_NOT_HAVE_D2_PARAMETERS = static_cast<MErrorEnum::Type>(0x80040808)

Text: "Service '%s' does not have %d parameters".

English-only software error

const MErrorEnum::Type M_ERR_UNEXPECTED_CHARACTER_C1 = static_cast<MErrorEnum::Type>(0x80040430)

Text: "Unexpected character '%c'" Text: "Unexpected character with code 0x%X".

English-only software error