YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
DatabaseStream.hxx
Go to the documentation of this file.
1
#ifndef YAPOG_DATABASESTREAM_HXX
2
# define YAPOG_DATABASESTREAM_HXX
3
4
# include "
YAPOG/System/Error/DatabaseException.hpp
"
5
6
namespace
yap
7
{
8
template
<
typename
T>
9
inline
void
DatabaseStream::WriteData
(
const
T& data)
10
{
11
try
12
{
13
pgStream_
<< data;
14
}
15
catch
(
pgs::pg_excpt
& e)
16
{
17
throw
DatabaseException
(e.
full_error_txt
());
18
}
19
}
20
21
template
<
typename
T>
22
inline
T
DatabaseStream::ReadData
()
23
{
24
T data;
25
pgStream_
>> data;
26
return
data;
27
}
28
}
// namespace yap
29
30
#endif // YAPOG_DATABASESTREAM_HXX
YAPOG
include
YAPOG
Database
DatabaseStream.hxx
Generated on Mon Sep 17 2012 22:24:22 for YAPOG by
1.8.1.1