Debian Codegraph @

src/framework/System/Information/Software/CSdl.cpp

raw symbols SCIP
1 /***************************************************************************
2 CSdl.cpp - description
3 -------------------
4 begin : November 1st, 2009
5 copyright : (C) 2009 by Duong Khang NGUYEN
6 email : neoneurone @ gmail com
7
8 $Id: CSdl.cpp 426 2009-11-22 17:42:38Z neoneurone $
9 ***************************************************************************/
10
11 /***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * any later version. *
17 * *
18 ***************************************************************************/
19
20 // Framework headers
21 #include "CSdl.h" // System::Sdl class
22 #include "System/CString.h" // System::String class
23
24 // libsdl headers
25 #include "SDL.h" // SDL_Version, SDL_Linked_Version, SDL_VERSION macro
26
27 SPF_NAMESPACE_BEGIN(System)
28 SPF_NAMESPACE_NESTED_BEGIN(Information, Software)
29
30
31 /*=====================================================================*/
32 Sdl::Sdl() {}
33
34
35 Sdl::~Sdl() {}
36
37
38 String Sdl::ToString() const
39 {
40 return String("System::Information::Software::Sdl");
41 }
42
43
44 /*=====================================================================*/
45 const String Sdl::GetCompiletimeVersion()
46 {
47 SDL_version lsVersion;
48 SDL_VERSION(&lsVersion);
49
50 String lsStringVersion;
51 lsStringVersion << (short)lsVersion.major << "." << (short)lsVersion.minor << "." << (short)lsVersion.patch;
52
53 return lsStringVersion;
54 }
55
56
57 const String Sdl::GetRuntimeVersion()
58 {
59 const SDL_version* lpVersion = SDL_Linked_Version();
60 //assert(lpVersion != NULL);
61
62 String lsStringVersion;
63 lsStringVersion << (short)lpVersion->major << "." << (short)lpVersion->minor << "." << (short)lpVersion->patch;
64
65 return lsStringVersion;
66 }
67
68
69 /*=====================================================================*/
70
71
72 SPF_NAMESPACE_NESTED_END
73 SPF_NAMESPACE_END