Main Page · Modules · All Classes · Class Hierarchy
MPElement.cpp
1 /*
2  * This file is part of the AiBO+ project
3  *
4  * Copyright (C) 2005-2016 Csaba Kertész (csaba.kertesz@gmail.com)
5  *
6  * AiBO+ is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * AiBO+ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
19  *
20  */
21 
22 #include "MPElement.hpp"
23 
24 #include "MPSessionMemory.hpp"
25 
26 QPointer<MPSessionMemory> MPElement::SessionMemory = nullptr;
27 
28 MPElement::MPElement(MS::ElementType element_type, bool dedicated_thread) : MSElement(element_type, dedicated_thread)
29 {
30 }
31 
32 
33 void MPElement::SetSessionMemory(MPSessionMemory& session_memory)
34 {
35  SessionMemory = &session_memory;
36 }
37 
38 
39 MPSessionMemory* MPElement::GetSessionMemory()
40 {
41  return SessionMemory;
42 }
MPElement(MS::ElementType element_type, bool dedicated_thread=false)
Class constructor.
Definition: MPElement.cpp:28
Basic ancestor class of the elements.
Definition: MSElement.hpp:65
static QPointer< MPSessionMemory > SessionMemory
Session memory.
Definition: MPElement.hpp:52
Session memory element.