How to use the qface.idl.profile.EFeature function in qface

To help you get started, we’ve selected a few qface examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Pelagicore / qface / qface / idl / listener.py View on Github external
def check_support(self, feature, report=True):
        if feature not in self.lang_features and report:
            click.secho('Unsuported language feature: {}'.format(EFeature.IMPORT), fg='red')
            return False
        return True
github Pelagicore / qface / qface / idl / profile.py View on Github external
EXTEND_INTERFACE = 'extend_interface'
    IMPORT = 'import'
    MAPS = 'maps'
    DEFAULT_VALUES = 'default_values'


class EProfile(Enum):
    MICRO = 'micro'
    ADVANCED = 'advanced'
    FULL = 'full'


_profiles = {
    EProfile.MICRO: set(),
    EProfile.ADVANCED: set([
        EFeature.EXTEND_INTERFACE,
        EFeature.IMPORT,
        EFeature.MAPS,
        EFeature.DEFAULT_VALUES
    ]),
    EProfile.FULL: set(EFeature)
}


def get_features(name):
    return _profiles.get(name, set())
github Pelagicore / qface / qface / idl / profile.py View on Github external
class EProfile(Enum):
    MICRO = 'micro'
    ADVANCED = 'advanced'
    FULL = 'full'


_profiles = {
    EProfile.MICRO: set(),
    EProfile.ADVANCED: set([
        EFeature.EXTEND_INTERFACE,
        EFeature.IMPORT,
        EFeature.MAPS,
        EFeature.DEFAULT_VALUES
    ]),
    EProfile.FULL: set(EFeature)
}


def get_features(name):
    return _profiles.get(name, set())
github Pelagicore / qface / qface / idl / profile.py View on Github external
IMPORT = 'import'
    MAPS = 'maps'
    DEFAULT_VALUES = 'default_values'


class EProfile(Enum):
    MICRO = 'micro'
    ADVANCED = 'advanced'
    FULL = 'full'


_profiles = {
    EProfile.MICRO: set(),
    EProfile.ADVANCED: set([
        EFeature.EXTEND_INTERFACE,
        EFeature.IMPORT,
        EFeature.MAPS,
        EFeature.DEFAULT_VALUES
    ]),
    EProfile.FULL: set(EFeature)
}


def get_features(name):
    return _profiles.get(name, set())
github Pelagicore / qface / qface / idl / profile.py View on Github external
DEFAULT_VALUES = 'default_values'


class EProfile(Enum):
    MICRO = 'micro'
    ADVANCED = 'advanced'
    FULL = 'full'


_profiles = {
    EProfile.MICRO: set(),
    EProfile.ADVANCED: set([
        EFeature.EXTEND_INTERFACE,
        EFeature.IMPORT,
        EFeature.MAPS,
        EFeature.DEFAULT_VALUES
    ]),
    EProfile.FULL: set(EFeature)
}


def get_features(name):
    return _profiles.get(name, set())
github Pelagicore / qface / qface / idl / profile.py View on Github external
MAPS = 'maps'
    DEFAULT_VALUES = 'default_values'


class EProfile(Enum):
    MICRO = 'micro'
    ADVANCED = 'advanced'
    FULL = 'full'


_profiles = {
    EProfile.MICRO: set(),
    EProfile.ADVANCED: set([
        EFeature.EXTEND_INTERFACE,
        EFeature.IMPORT,
        EFeature.MAPS,
        EFeature.DEFAULT_VALUES
    ]),
    EProfile.FULL: set(EFeature)
}


def get_features(name):
    return _profiles.get(name, set())
github Pelagicore / qface / qface / idl / listener.py View on Github external
type.is_primitive = True
                type.name = ctxSymbol.name.text
            elif ctx.typeSymbol().complexTypeSymbol():
                # type:TParser.ComplexTypeSymbolContext
                ctxSymbol = ctx.typeSymbol().complexTypeSymbol()
                type.is_complex = True
                type.name = ctxSymbol.name.text
            elif ctx.typeSymbol().listTypeSymbol():
                # type:TParser.ListTypeSymbolContext
                ctxSymbol = ctx.typeSymbol().listTypeSymbol()
                type.is_list = True
                type.name = 'list'
                type.nested = TypeSymbol("", type)
                self.parse_type(ctxSymbol, type.nested)
            elif ctx.typeSymbol().mapTypeSymbol():
                self.check_support(EFeature.MAPS)
                # type:TParser.ListTypeSymbolContext
                ctxSymbol = ctx.typeSymbol().mapTypeSymbol()
                type.is_map = True
                type.name = 'map'
                type.nested = TypeSymbol("", type)
                self.parse_type(ctxSymbol, type.nested)
            elif ctx.typeSymbol().modelTypeSymbol():
                # type:TParser.ModelTypeSymbolContext
                ctxSymbol = ctx.typeSymbol().modelTypeSymbol()
                type.is_model = True
                type.name = 'model'
                type.nested = TypeSymbol("", type)
                self.parse_type(ctxSymbol, type.nested)
        if not type.module.checkType(type):
            log.warn('Unknown type: {0}. Missing import?'.format(type.name))