Samples

 

Subsystem ASYNCH

·        AsynchCallback – Using the default asynch device with a callback function

·        AsynchDevice – Creating your own asynch device

·        AsynchFile – Mixing the asynch and generic file interfaces

·        AsynchPolling – Using the default asynch device in polling mode

·        AsynchStream – Working with the asynchronous stream

·        DynamicStream – Working with the dynamic stream

 

Subsystem BIGFILE

·        BigFile - Using the bigfile object in code after it was generated by the big file cruncher

 

Subsystem COMM

·        HostInfo – Getting network information with hostinfo object

·        Socket – Using Gear’s multiplatform socket object

 

Subsystem COMPRESSION

·        Bitstream – Using the low-level bitstream interface

·        HuffmanTree – Constructing your own Huffman tree

·        StringCompressor – Using the string compression tool

·        ZLib – Using the low-level ZLib compression (preferable to use with zlib device, see DeviceManager)

 

Subsystem CONSOLE

·        ConsoleOut – Changing hooks and printing with Gear’s console output function

 

Subsystem CONTAINER

·        BitVector – Modifying a bit vector’s content and printing it to output

·        CircularBuffer – Managing data in a circular buffer

·        DList – Using Gear’s embedded double linked list

·        Algorithms – Overview of Gear’s algorithms on containers (ForEach, Sort and Unique)

·        Algorithms 2 – Overview of Gear’s algorithms on containers (Mismatch, Transform, Count, CountIf, Fill, Copy)

·        ContainerInterface – Implementing your own container interface, managing memory allocation and assertion

·        MBufs – Attaching data to MBufs and linking them

 

Subsystem CORE

·        Assert – replacing Gear’s default assertion function

·        Endian – swapping bytes by casting and in more complex structures

·        Error – working with Gear’s error codes

·        Functor – Creating your own Gear-compatible functors and using the default binding functor

·        Intrinsic – Simple operation on bits

·        Notifiers – Using Gear’s dynamic notifier

·        Platform – Overview of platform specific macros to get information on hardware

·        StatCounter – Statistic counter to use in debug (code will disappear in release)

·        StopWatch – usage of Gear’s stopwatch, usually to measure performance

·        SwapByte – Swapping bytes manually (as opposed to automatic swapping with Gear’s endian casting)

·        Tagmarker – Overview of Gear’s tag marker, used to track information on memory allocation

·        Time – Tracking time using milliseconds and microseconds

 

Subsystem DBGHELP

·        CallStackTrace – Enumerating the modules and functions relevant to the call stack

·        DbgTool – Useful macros for debug-specific code and conditional breakpoints

·        Demangler – Demangling symbols on different compilers

·        MapFileReader – Interpreting the debug map file

·        DebugSymbols – Using Gear’s symbol database to better understand debugging info

 

Subsystem DEVICE

·        BlockdiskDevice – Creating your own block disk device

·        DeviceManager – Managing registered devices, using device names, creating and opening files

·        DeviceAlias – Creating aliases for device names (including file names) that are used often

·        MemFileDevice – Creating and using a device that emulates a file in memory

 

Subsystem LOGGING

·        GenericLogger – Using Gear’s logger, useful for logging debug information

·        MemoryLogger – Logging memory allocations

 

Subsystem MATH

·        CollisionDetection – Collision detection between a plane, a straight line and a rectangular prism

·        Hash – Using the different hashing methods implemented in Gear

·        MathBaseType – Demonstration of the more obscure math functions

·        Matrix – Operations on matrixes (inverse, determinant…)

·        Quaternion – Operations on quaternions (rotation with quaternion)

·        Vector – Operations on vectors

 

Subsystem MEMORY

·        MemAlloc – Allocating and de-allocating with a marker (GEAR_GET_MARKER macro)

·        MemAlloc 2 – Creating your allocators and getting information on them (Fixed Allocator and DL Malloc)

·        MemAuto – Using the GEAR_AUTO_... macros to reduce amount of code in a given class

·        MemDebug – Tracing leaks and overflow

·        MemHook – Using a memory hook to change allocation methods for a given object

·        MemInterface – Creating your own memory allocator using Gear’s interface

·        MemoryBlockProvider – Allocating memory blocks and treat them as a single bigger memory allocation

·        MemPageMarker -  Getting info on allocator used and memory allocated for objects

·        ObjectPool – Allocating object from a pool, reducing overhead

 

Subsystem PATTERN

·        ClassFactory – Instantiation of a class using its literal name and a placeholder in the memory buffer

·        ClassFactory 2 – Same as ClassFactory but with templates

·        DynamicType – Declaring a dynamic type root and using the derivation tests

·        RefCountedPtr – Managing object destruction with a reference counting pointer

·        Singleton – Declaration and instantiation of a singleton object

 

Subsystem SERIALIZATION

·        BinarySerializer – Serialization data in a file (binary content)

·        ContainerSerialization – Setting a device for a serializer and using operator << to serialize containers

·        GearStringSerialization – Serializing strings

·        ObjectSerialization – Implementing serialization in your own objects

·        TextSerializer – Serialization data in a file (text content)

 

Subsystem STREAM

·        StdStream – Using the I/O stream to write and read from a file

 

Subsystem STRING

·        GearString – Different GEAR methods for string creation and manipulation

·        Str – Different GEAR methods for string manipulation

·        StringTagDb – Adding a string in a database and refer it by its hash value

·        Tokenizer – Using point of references (tokens) to manipulate string separations

 

Subsystem THREAD

·        AdaptiveLock – Using Gear’s adaptive lock (Spin/Sleep lock) (blocking locks, semaphores are almost identical)

·        Autolock – Using Gear’s Autolock (usually the best way)

·        ConditionVariables – Using Gear’s Condition Variable

·        Events – Using Gear’s Events

·        RWLock – Managing Readers and Writers on data, like different engines having to manipulate it

·        TLS (thread local storage)  - Using a common index to access thread-specific data

 

Subsystem TRAITS

·        IsDerived – Template trait to find out if an object is derived from another

·        RemovePointer – Removes pointer from an object and returns the object itself (but does not dereference)

·        TypeConverters – Specific type casting