Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
AutoPtr.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
6
#ifndef _SKYFIRE_AUTO_PTR_H
7
#define _SKYFIRE_AUTO_PTR_H
8
9
#include <memory>
10
11
namespace
Skyfire
12
{
13
14
template
<
class
Po
int
er,
class
Lock>
15
class
AutoPtr
:
public
std::shared_ptr<Pointer>
16
{
17
typedef
std::shared_ptr<Pointer>
Base
;
18
19
public
:
20
AutoPtr
() :
Base
() { }
21
22
AutoPtr
(Pointer* x) :
Base
(x) { }
23
24
operator
bool()
const
25
{
26
return
Base::get() != NULL;
27
}
28
29
bool
operator !
()
const
30
{
31
return
Base::get() == NULL;
32
}
33
34
bool
null
()
const
35
{
36
return
Base::get() == NULL;
37
}
38
};
39
40
}
// namespace Skyfire
41
42
#endif
Skyfire::AutoPtr::AutoPtr
AutoPtr(Pointer *x)
Definition
AutoPtr.h:22
Skyfire::AutoPtr::operator!
bool operator!() const
Definition
AutoPtr.h:29
Skyfire::AutoPtr::AutoPtr
AutoPtr()
Definition
AutoPtr.h:20
Skyfire::AutoPtr::Base
std::shared_ptr< Pointer > Base
Definition
AutoPtr.h:17
Skyfire::AutoPtr::null
bool null() const
Definition
AutoPtr.h:34
Skyfire
Definition
AuthPatchTransfer.h:12
src
server
shared
AutoPtr.h
Generated on
for Project SkyFire Core by
1.17.0