How eprosima/fast-cdr works
Fast-CDR is a C++ serialization library offering standard CDR and a faster variant. A caller supplies values to the library’s serialization APIs and receives encoded data in a buffer; deserialization reads from that buffer back into values. The repository also exposes size calculation and XCDR-related facilities, including optional, external, and fixed-size string types. The README establishes the two serialization mechanisms; implementation relationships below are limited to connections supported by the supplied source index or excerpts.
Main entry points: Cdr.h CDR API · FastCdr.h Fast CDR API · FastBuffer.cpp Fast buffer · memory_helpers.hpp Memory helpers
Components 15
Serialization
- CDR codec
src/cpp/Cdr.cpp - Fast CDR codec
src/cpp/FastCdr.cpp - Size calculator
src/cpp/CdrSizeCalculator.cpp - CDR API
include/fastcdr/Cdr.h - Fast CDR API
include/fastcdr/FastCdr.h
Encoding support
- Encoding flags
include/fastcdr/CdrEncoding.hpp - CDR context
include/fastcdr/CdrContext.hpp - XCDR member IDs
include/fastcdr/xcdr/MemberId.hpp - XCDR optional
include/fastcdr/xcdr/optional.hpp - XCDR external
include/fastcdr/xcdr/external.hpp - Fixed strings
include/fastcdr/cdr/fixed_size_string.hpp
Runtime support
- Fast buffer
src/cpp/FastBuffer.cpp - Memory helpers
src/cpp/helpers/memory_helpers.hpp - Exceptions
include/fastcdr/exceptions/Exception.h
Other components
- Library caller
Connections 13
- Library caller → CDR API: uses API
README.md - Library caller → Fast CDR API: uses API
README.md - CDR API → Fast buffer: uses buffer
include/fastcdr/Cdr.h - Fast CDR API → Fast buffer: uses buffer
include/fastcdr/FastCdr.h - CDR codec → Memory helpers: uses helpers
src/cpp/Cdr.cpp - Fast CDR codec → Memory helpers: uses helpers
src/cpp/FastCdr.cpp - CDR API → CDR context: accepts context
include/fastcdr/Cdr.h - CDR API → Encoding flags: uses encoding
include/fastcdr/Cdr.h - CDR API → XCDR member IDs: uses member IDs
include/fastcdr/Cdr.h - CDR API → XCDR optional: supports optional
include/fastcdr/Cdr.h - CDR API → XCDR external: supports external
include/fastcdr/Cdr.h - CDR API → Fixed strings: supports strings
include/fastcdr/Cdr.h - CDR API → Exceptions: may throw
include/fastcdr/Cdr.h