VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
unitFormatter.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: unitFormatter.h,v $ $Revision: 1.4 $ $State: Exp $
7 *******************************************************************************/
8 
9 #pragma once
10 
11 #include <vlutil/vlString.h>
12 #include <matrix/vlVector.h>
13 
14 #include "tdbutil/tdbUtilDefines.h"
15 
16 // Set the global translation function to handle your own custom translations
17 typedef DtString (*DtTranslatorFunction)(const char* text, const char* module);
18 
19 DT_DLL_tdbutil DtString trUtf8(const char* text, const char* module);
21 
22 // Pretty formatting for back-end tasks and sets
23 
25 {
26 public:
27  virtual DtString formatSourceToDisplay(const DtVector& val) const;
28  virtual DtString formatSourceToDisplay(double val, const DtString& unitDisplay,
29  const DtString& source, DtString& unitLabel) const;
30 };
31 
33 
34 // Assumes that DtVector is in geocentric
35 DT_DLL_tdbutil DtString formatSourceToDisplay(const DtVector& val);
36 
37 // value must be in source units as defined in tdbUnits.h
38 DT_DLL_tdbutil DtString formatSourceToDisplay(double val, const DtString& unitDisplay,
39  const DtString& source, DtString& unitLabel);
DT_DLL_tdbutil void setTranslatorFunction(DtTranslatorFunction)
DT_DLL_tdbutil DtString trUtf8(const char *text, const char *module)
const char * source
Definition: lz4.h:442
DT_DLL_tdbutil DtString formatSourceToDisplay(const DtVector &val)
DtString(* DtTranslatorFunction)(const char *text, const char *module)
Definition: unitFormatter.h:17
#define DT_DLL_tdbutil
Definition: tdbUtilDefines.h:23
DT_DLL_tdbutil DtUnitFormatter * setUnitFormatter(DtUnitFormatter *)
Definition: unitFormatter.h:24

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)