forked from microsoft/cppgraphqlgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeroData.h
More file actions
31 lines (19 loc) · 670 Bytes
/
HeroData.h
File metadata and controls
31 lines (19 loc) · 670 Bytes
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#ifndef HERODATA_H
#define HERODATA_H
#include <memory>
#include <variant>
namespace graphql::learn {
class Droid;
class Human;
using SharedHero = std::variant<std::shared_ptr<Human>, std::shared_ptr<Droid>>;
using WeakHero = std::variant<std::weak_ptr<Human>, std::weak_ptr<Droid>>;
namespace object {
class Character;
} // namespace object
std::shared_ptr<object::Character> make_hero(const SharedHero& hero) noexcept;
std::shared_ptr<object::Character> make_hero(const WeakHero& hero) noexcept;
} // namespace graphql::learn
#endif // HERODATA_H