aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/PostBuildLint_ConfigurationType.h
blob: 710547b85898f0cc1660287e4ab77b5cb0d90f81 (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
30
31
32
33
34
35
36
#pragma once
#pragma once
#include <string>

namespace vcpkg::PostBuildLint
{
    struct ConfigurationType
    {
        enum class BackingEnum
        {
            NULLVALUE = 0,
            DEBUG = 1,
            RELEASE = 2
        };

        constexpr ConfigurationType() : backing_enum(BackingEnum::NULLVALUE) {}
        constexpr explicit ConfigurationType(BackingEnum backing_enum) : backing_enum(backing_enum) { }
        constexpr operator BackingEnum() const { return backing_enum; }

        const std::string& to_string() const;

    private:
        BackingEnum backing_enum;
    };

    namespace ConfigurationTypeC
    {
        static constexpr const char* ENUM_NAME = "vcpkg::PostBuildLint::ConfigurationType";

        static constexpr ConfigurationType NULLVALUE(ConfigurationType::BackingEnum::NULLVALUE);
        static constexpr ConfigurationType DEBUG(ConfigurationType::BackingEnum::DEBUG);
        static constexpr ConfigurationType RELEASE(ConfigurationType::BackingEnum::RELEASE);

        static constexpr std::array<ConfigurationType, 2> VALUES = { DEBUG, RELEASE };
    }
}