summaryrefslogtreecommitdiff
path: root/qface/idl/profile.py
blob: 4b376c96f198866416abda5e6042ed7567e8bf88 (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
# Copyright (c) Pelagicore AB 2016

from enum import Enum


class EFeature(Enum):
    CONST_PROPERTY = 'const_property'
    EXTEND_INTERFACE = 'extend_interface'


class EProfile(Enum):
    BASIC = 'basic'
    ADVANCED = 'advanced'
    ALL = 'advanced'


class Profile:
    def __init__(self, features=set()):
        self.features = features

    @staticmethod
    def get_profile(cls, name):
        if name is EProfile.BASIC:
            return Profile(features=[
            ])
        if name is EProfile.ADVANCED:
            return Profile(features=[
                EFeature.CONST_PROPERTY,
                EFeature.EXTEND_INTERFACE
            ])
        if name is EProfile.ALL:
            return Profile(features=[
            ])
        return []