AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
aui::core

Main central library. More...

Topics#

 Signal-slot
 Signal-slots is an object messaging mechanism that creates seamless relations between objects.
 
 Useful macros
 A set of functionality that introduces non-standard syntax which seems like the language features.
 
 IO streams
 Input-output streams.
 
 Reflection
 Basic reflection capabilities.
 
 aui::jni
 C++/Java bridge.
 
 Useful templates
 AUI template library.
 
 Property System
 Property System is a data binding mechanism based on signal-slot system.
 

Detailed Description#

Some additional features:

Classes#

class  AAbstractSignal
 Base class for signal. More...
 
struct  ABoxFields
 Represents a rectangle fields. Useful for margin and padding around AViews. More...
 
class  AByteBuffer
 std::vector-like growing array for byte storage. More...
 
class  AByteBufferView
 Acts like std::string_view but for AByteBuffer. More...
 
class  AChar
 Represents a single 32-bit char. More...
 
class  AColor
 Represents a 4-component floating point color (RGBA). More...
 
struct  AColorHSV
 Represents a 3-component floating point color (HSV). More...
 
class  ADeque< StoredType, Allocator >
 A std::deque with AUI extensions. More...
 
class  AException
 Abstract AUI exception. More...
 
class  AFatalException
 An exception that thrown when non-c++ unhandled error occurs (i.e. access violation). More...
 
class  ABaseMap< KeyType, ValueType, Parent >
 Base class for maps with AUI extensions. More...
 
class  AMap< KeyType, ValueType, Predicate, Allocator >
 A std::map with AUI extensions. More...
 
class  AUnorderedMap< KeyType, ValueType, Hasher, Comparer, Allocator >
 A std::unordered_map with AUI extensions. More...
 
class  AObject
 A base object class. More...
 
class  AQueue< StoredType >
 A std::queue with AUI extensions. More...
 
class  ASet< KeyType, Comparator, Allocator >
 A std::set with AUI extensions. More...
 
class  ASmallVector< StoredType, StaticVectorSize, Allocator >
 Vector-like container consisting of few elements on stack and switches to dynamic allocation vector if needed. More...
 
class  AStaticVector< StoredType, MaxSize >
 Vector-like container up to maxSize elements inplace. More...
 
class  AString
 Represents a Unicode character string. More...
 
class  AStringVector
 An AVector with string-related functions. More...
 
class  ATimer
 Async timer. More...
 
class  AUuid
 Implements universally unique identifier (UUID) More...
 
class  AVector< StoredType, Allocator >
 A std::vector with AUI extensions. More...
 
class  IStringable
 Object that can be converted to string. More...
 
struct  ALineSegment< T >
 2D line segment. More...
 
struct  ARect< T >
 Axis aligned 2D rectangle. More...
 
class  AI18n
 Provides i18n (internationalization) support. More...
 
class  ALanguageCode
 Represents a language code in ISO 639-1, for example, en-US or ru-RU. More...
 
class  ADynamicPipe
 An asynchronous buffer that converts an IInputStream to IOutputStream (and otherwise). More...
 
class  APipe
 A thread safe buffer that converts an IInputStream to IOutputStream (and otherwise). More...
 
class  ALogger
 A logger class. More...
 
class  APerformanceFrame
 Defines beginning and ending of window frame by RAII. More...
 
class  APerformanceSection
 Defines performance profiling named (and colored) span within RAII range. More...
 
class  AProcess
 Retrieves information about processes. More...
 
class  AStacktrace
 Stacktrace consisting of a collection of stack function frames. More...
 
class  AAsyncHolder
 Holds a set of futures keeping them valid. More...
 
class  AComplexFutureOperation< T >
 Helper class to construct AFuture values. More...
 
class  AConditionVariable
 Represents a condition variable. More...
 
class  ACutoffSignal
 One-shot event communication. More...
 
class  AEventLoop
 Default event loop implementation. More...
 
class  AFuture< T >
 Represents a value that will be available at some point in the future. More...
 
struct  AMutex
 Basic syscall-based synchronization primitive. More...
 
struct  ARecursiveMutex
 Like AMutex but can handle multiple locks for one thread (recursive). More...
 
struct  ASharedMutex
 Like AMutex but has shared lock type (in addition to basic lock which is unique locking) implementing RW synchronization. More...
 
class  AMutexWrapper< T >
 Wraps the object with mutex, providing thread-safety layer and a runtime check. More...
 
class  AAbstractThread
 Represents an abstract thread. Not all threads are created through AThread - these are interfaced with AAbstractThread. More...
 
class  AThread
 Represents a user-defined thread. More...
 
class  AFutureSet< T >
 Manages multiple futures. More...
 
struct  aui::any_view< T >
 RTTI-wrapped range. More...
 
class  AUrl
 Uniform Resource Locator implementation. More...
 
class  ACleanup
 Cleanup helper. More...
 
class  ACommandLineArgs
 Simple command line arguments parser. More...
 
class  AEvaluationLoopException
 Indicates an evaluation loop. More...
 
class  AFieldObservable< T >
 Stores a value and observes it's changes, notifying observers. More...
 
class  AFieldSignalEmitter< T >
 Stores a value and observes it's changes, emitting a signal. More...
 
class  AFunctionQueue
 Thread-safe implementation of function queue. More...
 
struct  AImplementationManager< Base, Implementations >
 Helps with picking implementation specified in template arguments which does not throw an exception in tryAllUntilSuccess. More...
 
class  AMessageQueue< Mutex, Args >
 Universal thread-safe message (callback) queue implementation. More...
 
class  AScheduler
 Basic scheduler used for timers. More...
 
class  ASharedRaiiHelper
 Shared completion marker for multithreaded callback-based future handling. More...
 
struct  AStringLiteral< chars >
 Compile-time string literal. More...
 
class  AWatchdog
 Watchdog helper class. More...
 
class  AComBase< Child, Base >
 Helper class implementing COM AddRef Release, and QueryInterface. More...
 
class  AComPtr< T >
 Takes care of AddRef and Release() reference counting mechanism of COM objects. More...
 

Macros#

#define AUI_ENUM_FLAG(name)
 Make a bitfield-style enum class.
 

Typedefs#

template<typename T>
using APoint2D = glm::vec<2, T>
 2D point.
 

Variables#

template<typename enum_t>
constexpr auto aui::enumerate::ALL_VALUES
 constexpr std::array of all possible enum values is the order they've been passed to AUI_ENUM_VALUES.
 

Macro Definition Documentation#

◆ AUI_ENUM_FLAG#

#define AUI_ENUM_FLAG ( name)
Value:
                            enum class name: int; \
                            constexpr inline name operator|(name a, name b) {return static_cast<name>(static_cast<int>(a) | static_cast<int>(b));} \
                            constexpr inline name operator&(name a, name b) {return static_cast<name>(static_cast<int>(a) & static_cast<int>(b));} \
                            constexpr inline name operator^(name a, name b) {return static_cast<name>(static_cast<int>(a) ^ static_cast<int>(b));} \
                            constexpr inline name operator|=(name& a, name b) {return a = static_cast<name>(static_cast<int>(a) | static_cast<int>(b));} \
                            constexpr inline name operator&=(name& a, name b) {return a = static_cast<name>(static_cast<int>(a) & static_cast<int>(b));} \
                            constexpr inline name operator^=(name& a, name b) {return a = static_cast<name>(static_cast<int>(a) ^ static_cast<int>(b));} \
                            constexpr inline name operator~(const name& a) {return static_cast<name>(~static_cast<int>(a));} \
                            constexpr inline bool operator!(const name& a) {return a == static_cast<name>(0);}                                     \
                                                                   \
                            constexpr inline bool operator&&(const name& a, bool v) {return static_cast<int>(a) && v;}                                     \
                            constexpr inline bool operator||(const name& a, bool v) {return static_cast<int>(a) || v;}                                     \
\
                            enum class name: int
NotSelector< L > operator!(L l)
Makes a logical "NOT" selector.
Definition NotSelector.h:52
AString name(T *v)
Runtime reflection based on typeid.
Definition AReflect.h:29
Examples
/home/runner/work/aui/aui/aui.json/src/AUI/Json/Conversion.h, and examples/app/minesweeper/src/FieldCell.h.

Function Documentation#

◆ args()#

API_AUI_CORE const ACommandLineArgs & aui::args ( )
noexcept
Returns
Arguments passed to program.
Examples
/home/runner/work/aui/aui/aui.json/src/AUI/Json/Conversion.h.

◆ AUI_ENUM_FLAG() [1/2]#

AUI_ENUM_FLAG ( ASide )
See also
ASides

◆ AUI_ENUM_FLAG() [2/2]#

AUI_ENUM_FLAG ( ASubProcessExecutionFlags )

Merges stdin and stdout streams in a child process

If set, child and parent processes have the same stdout stream

If set, child and parent processes have the same stderr stream

If set, child process starts in "detached" way; i.e, when this process dies, child won't.

On *nix systems, the process started with DETACHED flag is daemonized (i.e., reparented to process with pid 1) using double fork technique.

◆ bitmapToImage()#

API_AUI_VIEWS AImage aui::win32::bitmapToImage ( HBITMAP hbitmap)
Windows-specific
This API is available on Windows (operating system) only.

◆ contains() [1/2]#

template<typename Container>
bool aui::container::contains ( const Container & c,
const typename Container::const_reference value )
nodiscardnoexcept
Returns
true if container contains an element, false otherwise.

◆ contains() [2/2]#

template<typename Iterator>
bool aui::container::contains ( Iterator begin,
Iterator end,
const typename std::iterator_traits< Iterator >::value_type & value )
nodiscardnoexcept
Returns
true if container contains an element, false otherwise.

◆ fromWchar()#

AString aui::win32::fromWchar ( std::wstring_view string)
inline
Windows-specific
This API is available on Windows (operating system) only.

◆ iconToImage()#

API_AUI_VIEWS AImage aui::win32::iconToImage ( HICON hIcon)
Windows-specific
This API is available on Windows (operating system) only.

◆ importPlugin()#

API_AUI_CORE void aui::importPlugin ( const AString & name)
Parameters
nameplugin name

◆ importPluginPath()#

API_AUI_CORE void aui::importPluginPath ( const APath & path)
Parameters
pathplugin path

◆ index_of()#

template<typename Container>
AOptional< size_t > aui::container::index_of ( const Container & c,
const typename Container::const_reference value )
nodiscardnoexcept
Parameters
ccontainer to perform on.
valueelement to find.
Returns
index of the specified element. If element is not found, std::nullopt is returned.

◆ indexOf()#

template<typename Container>
AOptional< size_t > aui::indexOf ( const Container & c,
const typename Container::const_reference value )
nodiscardnoexcept
Parameters
ccontainer to perform on.
valueelement to find.
Returns
index of the specified element. If element is not found, std::nullopt is returned.

◆ is_subset()#

template<typename LContainer, typename RContainer>
bool aui::container::is_subset ( LContainer & l,
RContainer & r )
nodiscardnoexcept
Returns
true if r container is a subset of l container, false otherwise.

◆ operator""_format()#

AStringFormatHelper operator""_format ( const char * str,
size_t len )
inline
"Hello {}!"_format("world") // -> "Hello world!"
"test {:.2}"_format(1.2f)   // -> "test 1.2"

◆ remove_at()#

template<typename Container>
void aui::container::remove_at ( Container & c,
size_t index )
noexcept
Sneaky assertions
index points to the existing element.
Parameters
ccontainer to perform on.
indexindex of the element.

◆ remove_first()#

template<typename Container>
AOptional< std::size_t > aui::container::remove_first ( Container & container,
typename Container::const_reference value )
noexcept
Returns
If the item is removed, it's index returned.

◆ toWchar() [1/2]#

wchar_t * aui::win32::toWchar ( AString & string)
inline
Windows-specific
This API is available on Windows (operating system) only.

◆ toWchar() [2/2]#

const wchar_t * aui::win32::toWchar ( const AString & string)
inline
Windows-specific
This API is available on Windows (operating system) only.

◆ toWcharView()#

std::wstring_view aui::win32::toWcharView ( const AString & string)
inline
Windows-specific
This API is available on Windows (operating system) only.

Variable Documentation#

◆ ALL_VALUES#

template<typename enum_t>
auto aui::enumerate::ALL_VALUES
inlineconstexpr
Initial value:
= []<auto... values>(typename AEnumerate<enum_t>::template Values<values...>) {
        constexpr enum_t ITEMS[] = {values...};
        return std::to_array(ITEMS);
Enum trait to transform enum to name, name to enum, list all enums and vise versa.
Definition AEnumerate.h:79
Definition AEnumerate.h:159
See also
AUI_ENUM_VALUES