Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
GridReference.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5#ifndef SF_GRIDREFERENCE_H
6#define SF_GRIDREFERENCE_H
7
9
10template<class OBJECT>
11class GridRefManager;
12
13template<class OBJECT>
14class GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
15{
16protected:
18 {
19 // called from link()
20 this->getTarget()->insertFirst(this);
21 this->getTarget()->incSize();
22 }
24 {
25 // called from unlink()
26 if (this->isValid()) this->getTarget()->decSize();
27 }
29 {
30 // called from invalidate()
31 this->getTarget()->decSize();
32 }
33public:
34 GridReference() : Reference<GridRefManager<OBJECT>, OBJECT>() { }
35 ~GridReference() { this->unlink(); }
37};
38#endif
GridReference * next()
void sourceObjectDestroyLink()
void targetObjectBuildLink()
void targetObjectDestroyLink()
GridRefManager< OBJECT > * getTarget() const
Definition Reference.h:81