sc::TranslateData(3)
okay so bestie, welcome to sc::TranslateData(3) from the MPQC manual. itβs giving generic data translation with a whole buffet of overloads, so grab a strawberry π and letβs get into it.
πΈ NAME πΈ
sc::TranslateData β Generic data translation.
β¨ SYNOPSIS β¨
first, include the header, no cap:
#include <translate.h>
Inherited by sc::TranslateDataByteSwap.
π Public Member Functions π
hereβs the full public-member-function lineup, copied exactly so no signature gets lost in the group chat:
virtual char format_code ()
virtual void to_native (char *, int n)
virtual void to_external (char *, int n)
virtual void to_native (short *, int n)
virtual void to_external (short *, int n)
virtual void to_native (unsigned int *, int n)
virtual void to_external (unsigned int *, int n)
virtual void to_native (int *, int n)
virtual void to_external (int *, int n)
virtual void to_native (long *, int n)
virtual void to_external (long *, int n)
virtual void to_native (float *, int n)
virtual void to_external (float *, int n)
virtual void to_native (double *, int n)
virtual void to_external (double *, int n)
virtual void to_native (char *target, const void *source, int n)
virtual void to_external (void *target, const char *source, int n)
virtual void to_native (short *, const void *, int n)
virtual void to_external (void *, const short *, int n)
virtual void to_native (unsigned int *, const void *, int n)
virtual void to_external (void *, const unsigned int *, int n)
virtual void to_native (int *, const void *, int n)
virtual void to_external (void *, const int *, int n)
virtual void to_native (long *, const void *, int n)
virtual void to_external (void *, const long *, int n)
virtual void to_native (float *, const void *, int n)
virtual void to_external (void *, const float *, int n)
virtual void to_native (double *, const void *, int n)
virtual void to_external (void *, const double *, int n)
lowkey important: the source only gives extra one-line descriptions for a few of these. for the rest, itβs just the signature β so Iβm not inventing behavior, okay? π«Ά
the ones with extra prose in the source:
virtual char format_code ()β hands you back a code for the type of format used for the external data. very format-code, very demure β¨virtual void to_native (char *, int n)β translates to native format in-place. yes bestie, in-place πvirtual void to_external (char *, int n)β translates to external format in-place. same in-place energy, opposite direction π¦virtual void to_native (char *target, const void *source, int n)β translates to native format. target and source are right there in the signature, iconic πvirtual void to_external (void *target, const char *source, int n)β translates to external format. again: target, source,n, we love a complete set πΈ
π Static Public Member Functions π
static TranslateData * vctor (char code)β a virtual constructor that chooses a specialization based on the format code. itβs giving βpick your fighterβ but for formats π
π Detailed Description π
Generic data translation.
thatβs the whole vibe. this class is literally about generic data translation, and the page is not gonna pretend otherwise π
π Member Function Documentation π
the source repeats these four with [virtual] and a note about reimplementation. here they are, exact signatures and all:
virtual void sc::TranslateData::to_external (char *, int n) [virtual]
Translates to external format in-place. Similar routines exist for all the basic types.
Reimplemented in sc::TranslateDataByteSwap.
virtual void sc::TranslateData::to_external (void * target, const char * source, int n) [virtual]
Translates to external format. Similar routines exist for all the basic types.
Reimplemented in sc::TranslateDataByteSwap.
virtual void sc::TranslateData::to_native (char *, int n) [virtual]
Translates to native format in-place. Similar routines exist for all the basic types.
Reimplemented in sc::TranslateDataByteSwap.
virtual void sc::TranslateData::to_native (char * target, const void * source, int n) [virtual]
Translates to native format. Similar routines exist for all the basic types.
Reimplemented in sc::TranslateDataByteSwap.
π«Ά Author π«Ά
Generated automatically by Doxygen for MPQC from the source code. yes, the robots wrote it β weβre just making it cute π
and thatβs the whole page, bestie. this was sc::TranslateData(3) from MPQC, version 2.3.1, dated Sun Oct 4 2020. mwah π
π¦ where this page comes from
- ubuntu jammy: libsc-doc 2.3.1-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms