VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrfobjcore
objectConsolePrinter.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2014 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
8
10
11
#pragma once
12
13
#include "
vrfobjcore/vrfobjcoreDefines.h
"
14
#include "
vrfutil/outputChannelManager.h
"
15
#include <
vrfutil/rwTranslatableStringObject.h
>
16
17
class
DtVrfObject
;
18
class
DtTranslatableStream
;
19
24
class
DT_DLL_vrfobjcore
DtTranslatableOutputStreamBuffer
:
public
DtOutputStreamBuffer
25
{
26
public
:
27
enum
TranslationStep
28
{
29
None
,
30
String
,
31
Argument
32
};
33
34
DtTranslatableOutputStreamBuffer
();
35
virtual
~
DtTranslatableOutputStreamBuffer
();
36
static
DtString
moduleFrom(
const
DtString
& source,
DtString
& module);
37
38
static
DtOutputStreamBuffer* creator();
39
40
protected
:
41
virtual
std::basic_ios< char >::int_type overflow( std::basic_ios< char >::int_type c );
42
virtual
std::streamsize xsputn(
const
char
*_Ptr, std::streamsize _Count);
43
44
protected
:
45
TranslationStep
myIsTranslating
;
46
DtString
myModule
;
47
DtRwTranslatableStringObject
myTranslation
;
48
};
49
50
class
DT_DLL_vrfobjcore
DtTranslatableOutputStream
51
:
public
DtChannelSpecificOutputStream
52
{
53
54
public
:
55
56
//Constructor takes a pointer to a variable to use to check against a
57
//global threshold. Each DtOutputStreamBuffer needs to also have a
58
//unique DtOutputStreamBuffer which should be created before
59
//the DtOutputStream that uses it is created.
60
DtTranslatableOutputStream
(DtOutputStreamBuffer *b,
61
int
&globalThresholdRef,
62
int
threshold = 1,
63
DtPrinter
*dflt_printer = 0,
64
const
std::string& prefix =
""
);
65
66
virtual
~
DtTranslatableOutputStream
();
67
69
virtual
void
operator()(
const
char
*s, ...);
70
71
static
DtChannelSpecificOutputStream
*
creator
(
72
DtOutputStreamBuffer *b,
73
int
&globalThresholdRef,
74
int
threshold = 1,
75
DtPrinter
*dflt_printer = 0,
76
const
std::string& prefix =
""
);
77
};
78
81
class
DT_DLL_vrfobjcore
DtObjectConsoleNetworkPrinter
:
public
DtPrinter
82
{
83
private
:
85
DtObjectConsoleNetworkPrinter
();
86
87
public
:
88
DtObjectConsoleNetworkPrinter
(
DtVrfObject
* vrfObj);
89
90
virtual
void
write(
const
std::string &str,
int
notify_level,
bool
sync);
91
92
protected
:
93
DtVrfObject
*
myVrfObject
;
94
};
95
99
class
DT_DLL_vrfobjcore
DtObjectConsoleVrlinkPrinter
:
public
DtPrinter
100
{
101
private
:
103
DtObjectConsoleVrlinkPrinter
();
104
105
public
:
106
DtObjectConsoleVrlinkPrinter
(
DtVrfObject
* vrfObj);
107
113
virtual
void
write(
const
std::string& str,
int
notify_level,
bool
sync);
114
115
protected
:
116
DtVrfObject
*
myVrfObject
;
117
};
118
119
DT_DLL_vrfobjcore
DtOutputStream&
operator<<
(DtOutputStream& str,
const
DtTranslatableStream
&);
Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)