MAK RTIspy API Documentation for HLA 1516
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
examples
simpleDDM
simpleDDMStringUtil.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2006 MaK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: simpleDDMStringUtil.h,v $ $Revision: 1.1 $ $State: Exp $
7
******************************************************************************/
8
9
#ifndef stringUtil_H_
10
#define stringUtil_H_
11
12
// Utility for converting strings between narrow and wide formats
13
14
#include <string>
15
#include <sstream>
16
17
std::wstring
DtToWString
(
const
char
* in_val);
18
std::string
DtToString
(
const
std::wstring &in_val);
19
std::string
usage
();
20
21
22
// Convert narrow C string to wide string
23
inline
std::wstring
DtToWString
(
const
char
* in_val)
24
{
25
std::wstring temp;
26
while
(*in_val !=
'\0'
)
27
temp += *in_val++;
28
return
temp;
29
}
30
31
// Convert narrow string to wide string
32
inline
std::string
DtToString
(
const
std::wstring &in_val)
33
{
34
std::string temp;
35
std::wstring::const_iterator b = in_val.begin();
36
const
std::wstring::const_iterator e = in_val.end();
37
while
(b != e)
38
{
39
temp +=
static_cast<
char
>
(*b);
40
++b;
41
}
42
return
temp;
43
}
44
45
46
47
inline
std::string
usage
()
48
{
49
std::ostringstream ostr;
50
ostr <<
"Usage:\n"
51
52
<< std::setw( 20 ) <<
" -fedFile "
53
<<
"specify the Fed file name \n"
54
<< std::setw ( 32 ) <<
" "
<<
"1.3 Default: (MAKSimpleDDM.fed) \n"
55
<< std::setw ( 32 ) <<
" "
<<
"1516 Default: (MAKSimpleDDM.xml) \n"
56
<<
"\nSubscriber parameters\n"
57
58
<< std::setw( 20 ) <<
" -maxSubscribe "
59
<<
"Simple DDM uses just one extent and dimension, \n"
60
<< std::setw( 32 ) <<
" "
<<
"this is the subscribers upper range \n"
61
<< std::setw( 32 ) <<
" "
<<
"(in seconds)\n"
62
63
<< std::setw( 20 ) <<
" -minSubscribe "
64
<<
"Simple DDM uses just one extent and dimension, \n"
65
<< std::setw( 32 ) <<
" "
<<
"this is the subscriber's lower range \n"
66
<< std::setw( 32 ) <<
" "
<<
"(in seconds)\n"
67
68
<< std::setw( 20 ) <<
" -maxSubscribeH "
69
<<
"Simple DDM uses just one extent and dimension, \n"
70
<< std::setw( 32 ) <<
" "
<<
"this is the subscribers upper range\n"
71
<< std::setw( 32 ) <<
" "
<<
"(in hours)\n"
72
73
<< std::setw( 20 ) <<
" -minSubscribeH "
74
<<
"Simple DDM uses just one extent and dimension, \n"
75
<< std::setw( 32 ) <<
" "
<<
"this the subscriber's lower range \n"
76
<< std::setw( 32 ) <<
" "
<<
"(in hours)\n"
77
78
<< std::setw( 20 ) <<
" -scopeAdvisories "
79
<<
"Whether or not the user wants to receive \n"
80
<< std::setw( 32 ) <<
" "
<<
"scoping advisory notices (0 || 1)\n"
81
82
83
<<
"\nPublisher parameters\n"
84
85
<< std::setw( 20 ) <<
" -isPublisher "
86
<<
"Whether the application should as publisher or \n"
87
<< std::setw( 32 ) <<
" "
<<
"subscriber. (default 0)\n"
88
89
<< std::setw( 20 ) <<
" -clockWise "
90
<<
"Whether the object moves in CW or CCW direction \n"
91
<< std::setw( 32 ) <<
" "
<<
"1 = CW (default)\n"
92
93
<< std::setw( 20 ) <<
" -increment "
94
<<
"Increment that the publisher will advance by in seconds\n"
95
<< std::setw( 32 ) <<
" "
<<
"modified by multiplier\n"
96
97
<< std::setw( 20 ) <<
" -multiplier "
98
<<
"Multiplier for both advancement upon the extent\n"
99
<< std::setw( 32 ) <<
" "
<<
"and lookahead on the extent\n"
100
101
<< std::setw( 20 ) <<
" -wait "
102
<<
"Time interval (in milliseconds) to wait inbetween each update cycle.\n"
103
104
<< std::setw( 20 ) <<
" -range "
105
<<
"Lookahead multiplier that the listening range \n"
106
<< std::setw( 32 ) <<
" "
<<
"will subscribe to\n"
107
108
<< std::setw( 20 ) <<
" -sendRangeTolerance "
109
<<
" Describes a percentage of the sending range, \n"
110
<< std::setw( 32 ) <<
" "
<<
"how close the sender can get to the \n"
111
<< std::setw( 32 ) <<
" "
<<
"extents of the sending range before \n"
112
<< std::setw( 32 ) <<
" "
<<
"the Lower and Upper Bound of the \n"
113
<< std::setw( 32 ) <<
" "
<<
"sender are re-sent\n"
114
115
<< std::setw( 20 ) <<
" -timeZone"
116
<<
" Sets the UTC zone of the publisher \n"
117
<< std::setw( 32 ) <<
" "
<<
"Acceptable Values are from 0 .. 23 \n"
118
<< std::setw( 32 ) <<
" "
<<
" Default value is 0, representing GMT\n"
119
120
<< std::setw( 20 ) <<
" -printUpdate "
121
<<
"When GUI is disabled, prints a dot for each update to better\n"
122
<< std::setw( 32 ) <<
" "
<<
"distinguish bounds changes\n"
123
124
125
<<
"\nDisplay Options \n"
126
<< std::setw( 20 ) <<
" -displayRegion "
127
<<
"Whether or not there is distinction in shading \n"
128
<< std::setw( 32 ) <<
" "
<<
"in extent of a region and the entire \n"
129
<< std::setw( 32 ) <<
" "
<<
"dimension (0 || 1)\n"
130
131
#ifdef SIMPLEDDMGUI
132
<< std::setw( 20 ) <<
" -useGUI "
133
<<
"Whether the application should run in GUI or \n"
134
<< std::setw( 32 ) <<
" "
<<
"console mode. \n"
135
#endif
136
<< std::endl;
137
138
return
ostr.str();
139
}
140
141
#endif
142
143
144
Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (
www.mak.com
)