aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/PostBuildLint_ConfigurationType.h
blob: 61f56c0d541a8d2926ee805560dae30beb721327 (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};
    }
}