libdas2
das2 core C utilities
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Functions
datum.h File Reference
#include <das2/value.h>
#include <das2/units.h>

Go to the source code of this file.

Data Structures

struct  das_datum
 A value and it's units. More...
 

Functions

bool das_datum_fromStr (das_datum *pThis, const char *sStr)
 Initialize a numeric datum from a value and units string. More...
 
bool das_datum_fromDbl (das_datum *pThis, double value, das_units units)
 Create a datum from a double value and units. More...
 
bool das_datum_wrapStr (das_datum *pTHis, const char *sStr, das_units units)
 Wrap an external string as a datum. More...
 
bool das_datum_byteSeq (das_datum *pThis, das_byteseq seq, das_units units)
 Wrap an external unknown type pointer as a datum. More...
 
char * das_datum_toStr (const das_datum *pThis, char *sStr, size_t uLen, int nFracDigits)
 Write a UTF-8 string representation of a datum to a buffer. More...
 
char * das_datum_toStrValOnly (const das_datum *pThis, char *sStr, size_t uLen, int nFracDigits)
 Same as das_datum_toStr, but never print the units. More...
 
double das_datum_toDbl (const das_datum *pThis)
 Get a datum value as a double. More...