Site Logo

maxdz Software GmbH

en | de
Home

Products

mdz_ansi_alg

mdz_ansi_16

mdz_ui

mdz_xml

mdz_string

mdz_vector

mdzWebSiteGenerator

mdzTennisTracker

Shop

Legals

Contacts

mdz_vector Overview and Reference

mdz_vector - very lightweight, versatile and speedy C vector library. Source code of library is highly-portable, conforms to ANSI C 89/90 Standard. Builds for Win32/Win64, Linux, FreeBSD, Android, macOS are available.

Please refer to mdz_vector Wiki for API details.

mdz_vector Advantages

1. Very high portability: the whole code conforms to ANSI C 89/90 Standard. Multithreading/asynchronous part is POSIX compatible (under UNIX/Linux).

2. Very little dependencies: basically, mdz_vector functions are only dependent on standard C-library memory-management/access functions. Multithreading part is dependent on POSIX pthreads API (under UNIX/Linux) and old process control/synchronization API (from Windows 2000). It means you can use library in your code without any further dependencies except standard platform libraries/APIs.

3. Very fast: comparison tables are coming soon...

4. Flexibilty: nearly all functions contain not only "left position" but also "right position" parameters to limit processed area from right. Vector contains more functions than according STL, boost or glib analogs have.

5. Extended error-checking: all functions preserve internal error-code pointing the problem. It is possible to use strict error-checking (when all preserved error-codes should be MDZ_ERROR_NONE) or "relaxed"-checking - when only returned mdz_false will indicate error.

6. Extended control: vector does only explicit operations. It means for example, when "insert" function is called - it will return error if there is not enough capacity in vector. No implicit reservations will be made.

7. Attached usage: vector should not necessarily use dynamically-allocated memory - which may be not available on your embedded system (or if malloc()/free() are forbidden to use in you safety-critical software). Just attach vector/data to your statically-allocated memory and use all vector functionality.

8. Asynchronous execution: almost all functions can be executed asynchronously.


mdz_vector API Reference

Asynchronous execution

Many functions of mdz_vector accept parameters for asynchronous execution.
The only relevant parameter is:

- struct mdz_asyncData* pAsyncData - pointer to shared async data for asynchronous call, or NULL if call should be synchronous

Fields of struct mdz_asyncData* are following:

TypeParameterDescription
void* m_pStringPointer to string instance
mdz_bool m_bFinishedmdz_true if the call is completely finished. Otherwise mdz_false (if interrupted/cancelled)
size_t m_nResultResult of call. Invalid if call is not completely finished (m_bFinished is mdz_false)
void* m_pDataAdditional data returned by call (if any). Invalid if call is not completely finished (m_bFinished is mdz_false)
mdz_bool m_bCancelShould be set by client in mdz_true during call execution, to cancel the call. Otherwise mdz_false
pthread_t / HANDLE m_hThreadHandle to thread on which the call is executed. May be used by client for wait operations
Software Development. Strive for the Impossible to achieve Excellence.
Copyright Ⓒ 2017 - 2025 maxdz Software GmbH. All rights reserved.
Site content is generated using mdzWebSiteGenerator