VR-Forces Developer's Guide
Home
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
tdbutil
unitFormatter.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2005 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);
20
DT_DLL_tdbutil
void
setTranslatorFunction
(
DtTranslatorFunction
);
21
22
// Pretty formatting for back-end tasks and sets
23
24
class
DT_DLL_tdbutil
DtUnitFormatter
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
32
DT_DLL_tdbutil
DtUnitFormatter
*
setUnitFormatter
(
DtUnitFormatter
*);
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);
setTranslatorFunction
DT_DLL_tdbutil void setTranslatorFunction(DtTranslatorFunction)
trUtf8
DT_DLL_tdbutil DtString trUtf8(const char *text, const char *module)
DtVector
source
const char * source
Definition:
lz4.h:442
formatSourceToDisplay
DT_DLL_tdbutil DtString formatSourceToDisplay(const DtVector &val)
tdbUtilDefines.h
DtTranslatorFunction
DtString(* DtTranslatorFunction)(const char *text, const char *module)
Definition:
unitFormatter.h:17
DT_DLL_tdbutil
#define DT_DLL_tdbutil
Definition:
tdbUtilDefines.h:23
DtString
setUnitFormatter
DT_DLL_tdbutil DtUnitFormatter * setUnitFormatter(DtUnitFormatter *)
DtUnitFormatter
Definition:
unitFormatter.h:24
Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (
www.mak.com
)