das2C
das core C utilities (v3)
Loading...
Searching...
No Matches
form_pos.h
Go to the documentation of this file.
1/* Copyright (C) 2026 Chris Piker <chris-piker@uiowa.edu>
2 *
3 * Author: C. Piker, via Claude Opus 5
4 *
5 * This file is part of das2C, the Core Das2 C Library.
6 *
7 * Das2C is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Lesser General Public License version 2.1 as published
9 * by the Free Software Foundation.
10 *
11 * Das2C is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * version 2.1 along with das2C; if not, see <http://www.gnu.org/licenses/>.
18 */
19
77#ifndef _das_form_pos_h_
78#define _das_form_pos_h_
79
80#include <das3/form.h>
81#include <das3/form_vec.h>
82
83#ifdef __cplusplus
84extern "C" {
85#endif
86
87/* Component systems: a position may use all six DAS_VSYS_* codes, including
88 the ellipsoidal detic and graphic that a free vector refuses. The codes and
89 their lookups -- das_vsys_toStr(), das_vsys_symbol(), das_vsys_isEllipsoidal()
90 and the rest -- are in form_vec.h, included above so that position code
91 needs only this header. */
92
93/* Exported so that its address can be compared. Client code uses the
94 DAS_FORM_POS macro below and has no reason to name this directly. */
95DAS_API extern const DasForm_VTbl das_form_pos_vtbl;
96
100#define DAS_FORM_POS (&das_form_pos_vtbl)
101
114DAS_API DasForm* new_DasFormPos(
115 const char* sBody, const char* sFrame, const char* sSurface,
116 bool bFixed, ubyte uSysType, const ubyte* pDirs
117);
118
121DAS_API const char* DasFormPos_body(const DasForm* pThis);
122
124DAS_API const char* DasFormPos_frame(const DasForm* pThis);
125
128DAS_API const char* DasFormPos_surface(const DasForm* pThis);
129
131DAS_API ubyte DasFormPos_sysType(const DasForm* pThis);
132
135DAS_API bool DasFormPos_fixed(const DasForm* pThis);
136
140DAS_API const ubyte* DasFormPos_dirs(const DasForm* pThis);
141
142/* For a component's display symbol -- "λ", "φ", "h" -- use DasVar_compSym(),
143 which works for every kind of composite value and not just this one. */
144
145/* To read a position datum's components use das_datum_toDoubles(). It returns
146 them in storage order and leaves any slot it does not fill untouched, so set
147 those from das_vsys_default() in form_vec.h when a stream sends fewer
148 components than its system defines. */
149
150#ifdef __cplusplus
151}
152#endif
153
154#endif /* _das_form_pos_h_ */
What a variable's values (i.e.
A frame-tagged geometric vector.