-
Notifications
You must be signed in to change notification settings - Fork 1
/
weather-extension.hpp
40 lines (30 loc) · 1.13 KB
/
weather-extension.hpp
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
30
31
32
33
34
35
36
37
38
39
40
#pragma once
/*
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*
* The original code is copyright (c) 2022, open.mp team and contributors.
*/
// Required for most of open.mp.
#include <sdk.hpp>
// This is the private implementation of the public interface. We must know the interface.
#include "interface.hpp"
// Import open.mp structures that aren't ABI safe.
using namespace Impl;
// `final` so we don't need virtual destructors. Also because we know it isn't inherited.
class WeatherExtension final
// This class is an implementation of the publicly shared `IWeatherExtension` interface.
: public IWeatherExtension
{
private:
IWeatherRegion* region_;
public:
// Implementations of the various methods from the public API.
IWeatherRegion* getWeatherRegion() override;
void setWeatherRegion(IWeatherRegion* region) override;
// Required extension methods.
void freeExtension() override;
void reset() override;
// Component-private methods (internal methods) go here.
};