HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SYS_StreamUtil.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: SYS_StreamUtil.h (SYS Library, C++)
7
*
8
* COMMENTS: Utilities for dealing streams
9
*/
10
11
#ifndef __SYS_STREAMUTIL_H_INCLUDED__
12
#define __SYS_STREAMUTIL_H_INCLUDED__
13
14
#include "
SYS_API.h
"
15
#include <iostream>
16
17
/// SYS_AutoPrecision allows one to temporarily change a stream's precision
18
/// for the life of this object.
19
class
SYS_API
SYS_AutoPrecision
20
{
21
public
:
22
explicit
SYS_AutoPrecision
(std::ostream &os,
int
new_precision)
23
: myStream(os)
24
, myOldPrecision(os.
precision
(new_precision))
25
{
26
}
27
~SYS_AutoPrecision
()
28
{
29
(
void
) myStream.precision(myOldPrecision);
// restore
30
}
31
32
private
:
33
std::ostream & myStream;
34
std::streamsize myOldPrecision;
35
};
36
37
#endif // __SYS_STREAMUTIL_H_INCLUDED__
void
void
Definition:
png.h:1083
SYS_AutoPrecision::SYS_AutoPrecision
SYS_AutoPrecision(std::ostream &os, int new_precision)
Definition:
SYS_StreamUtil.h:22
SYS_AutoPrecision::~SYS_AutoPrecision
~SYS_AutoPrecision()
Definition:
SYS_StreamUtil.h:27
SYS_AutoPrecision
Definition:
SYS_StreamUtil.h:19
precision
GLenum GLint GLint * precision
Definition:
glcorearb.h:1925
SYS_API
#define SYS_API
Definition:
SYS_API.h:11
SYS_API.h
SYS
SYS_StreamUtil.h
Generated on Sun Nov 17 2024 03:03:31 for HDK by
1.8.6