example_main.h
Go to the documentation of this file.
1 /*
2  * OpenSplice DDS
3  *
4  * This software and documentation are Copyright 2006 to 2013 PrismTech
5  * Limited and its licensees. All rights reserved. See file:
6  *
7  * $OSPL_HOME/LICENSE
8  *
9  * for full copyright notice and license terms.
10  *
11  */
12 
13 #ifndef OSPL_MAIN
14 #define OSPL_MAIN main
15 #ifdef WINCE
16 #include "os_stdlib.h"
17 int main (int argc, char* argv[]);
18 int WINAPI WinMain
19  (HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR lpCmdLine, int nCmdShow)
20 {
21  int argc;
22  char *argv[256];
23  argc = os_mainparams (lpCmdLine, argv);
24  return main (argc, argv);
25 }
26 #endif /* WINCE */
27 #endif /* ! OSPL_MAIN */
28 
29 #ifdef WINCE
30 #ifdef __cplusplus
31 /* The WinCE coredll.lib/dll doesn't have symbols for ostream operator << for
32 non string/char types. These examples use std::cout/cerr with all sorts so
33 without the below you would need to link/load onto the target the MSVCRT lib/dlls
34 to run them.
35 If you are already already loading these extra libraries then you may wish to
36 define the below to remove this workaround instead... */
37 #ifndef OSPL_WINCE_HAS_MSVCRT
38 std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int my_int)
39 {
40  char my_buffer[23];
41  _itoa(my_int, my_buffer, 10);
42  return *this << my_buffer;
43 }
44 std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned int my_int)
45 {
46  char my_buffer[23];
47  _itoa(my_int, my_buffer, 10);
48  return *this << my_buffer;
49 }
50 std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(long my_long)
51 {
52  char my_buffer[23];
53  _itoa(my_long, my_buffer, 10);
54  return *this << my_buffer;
55 }
56 std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned long my_long)
57 {
58  char my_buffer[23];
59  _itoa(my_long, my_buffer, 10);
60  return *this << my_buffer;
61 }
62 std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(float my_float)
63 {
64  char my_buffer[23];
65  sprintf(my_buffer, "%f", my_float);
66  return *this << my_buffer;
67 }
68 std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(const void* my_pointer)
69 {
70  char my_buffer[23];
71  sprintf(my_buffer, "%p", my_pointer);
72  return *this << my_buffer;
73 }
74 std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(bool my_bool)
75 {
76  return *this << (my_bool ? "true" : "false");
77 }
78 #endif /* ! OSPL_WINCE_HAS_MSVCRT */
79 #endif /* __cplusplus */
80 #endif /* WINCE */
int main()
Definition: pub.cpp:63


opensplice_dds_broker
Author(s):
autogenerated on Mon Jun 10 2019 14:02:23