Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
blob: 7106fa5acf9ca1d26814a809e8adc3e6f2d3aca8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
   core/extension.cc
   This file is part of the Osirion project and is distributed under
   the terms of the GNU General Public License version 2
*/

#include "core/extension.h"

namespace core
{

Extension::Extension(Type type, Entity *entity)
{
	extension_entity = entity;
	extension_type = type;

	if (entity)
		entity->entity_extension[(size_t) type] = this;
}

Extension::~Extension()
{
	if (extension_entity)
		extension_entity->entity_extension[(size_t) extension_type] = 0;
}


} // namespace core