Gamedev Framework (gf)  0.5.0
A C++11 framework for 2D games
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
gf::Library Class Reference

A class to represent the library. More...

#include <gf/Library.h>

Classes

struct  Version
 Information about version. More...
 

Public Types

enum  Dependency {
  Boost,
  SimpleDirectMediaLayer,
  FreeType
}
 Depedencies of gf. More...
 

Public Member Functions

 Library ()
 Default constructor. More...
 
 Library (const Library &)=delete
 Deleted copy constructor. More...
 
Libraryoperator= (const Library &)=delete
 Deleted copy assignment. More...
 
 Library (Library &&)
 Move constructor. More...
 
Libraryoperator= (Library &&)
 Move assignment. More...
 
 ~Library ()
 Destructor. More...
 

Static Public Member Functions

static Version getVersion ()
 Get the version of the gf library. More...
 
static std::tuple< Version, VersiongetDependencyVersion (Dependency dep)
 Get the version information about the library dependencies. More...
 

Detailed Description

A class to represent the library.

This class is used to initialize the library (especially SDL). Normally, you do not have to care about it if you use a gf::Window or a gf::Monitor as the library is automatically initialized with these classes.

Internally, the class uses reference couting to avoid multiple initializations.

Member Enumeration Documentation

◆ Dependency

Depedencies of gf.

Enumerator
Boost 

Boost.

SimpleDirectMediaLayer 

SDL.

FreeType 

FreeType.

Constructor & Destructor Documentation

◆ Library() [1/3]

gf::Library::Library ( )

Default constructor.

This function initialize the library

◆ Library() [2/3]

gf::Library::Library ( const Library )
delete

Deleted copy constructor.

◆ Library() [3/3]

gf::Library::Library ( Library &&  )

Move constructor.

◆ ~Library()

gf::Library::~Library ( )

Destructor.

This function quits the library

Member Function Documentation

◆ getDependencyVersion()

static std::tuple<Version, Version> gf::Library::getDependencyVersion ( Dependency  dep)
static

Get the version information about the library dependencies.

Returns
A tuple with the compiled version and the linked version

◆ getVersion()

static Version gf::Library::getVersion ( )
static

Get the version of the gf library.

Returns
The version of the gf library

◆ operator=() [1/2]

Library& gf::Library::operator= ( const Library )
delete

Deleted copy assignment.

◆ operator=() [2/2]

Library& gf::Library::operator= ( Library &&  )

Move assignment.