From fb123f93f9f5ce42c8e5785d2f8e0edaf951740e Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Wed, 26 Mar 2014 19:21:20 +0000 Subject: Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2. --- src/VBox/Main/glue/constants-python.xsl | 205 ++++++++++++++++++++------------ 1 file changed, 132 insertions(+), 73 deletions(-) (limited to 'src/VBox/Main/glue/constants-python.xsl') diff --git a/src/VBox/Main/glue/constants-python.xsl b/src/VBox/Main/glue/constants-python.xsl index df18f43b..3795d25e 100644 --- a/src/VBox/Main/glue/constants-python.xsl +++ b/src/VBox/Main/glue/constants-python.xsl @@ -8,7 +8,7 @@ XSLT stylesheet that generates VirtualBox_constants.py from VirtualBox.xidl. - Copyright (C) 2009 Oracle Corporation + Copyright (C) 2009-2013 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; @@ -26,79 +26,138 @@ indent="no"/> -# Copyright (C) Oracle Corporation -# -# This file is part of VirtualBox Open Source Edition (OSE), as -# available from http://www.virtualbox.org. This file is free software; -# you can redistribute it and/or modify it under the terms of the GNU -# General Public License (GPL) as published by the Free Software -# Foundation, in version 2 as it comes in the "COPYING" file of the -# VirtualBox OSE distribution. VirtualBox OSE is distributed in the -# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. -# -# This file is autogenerated from VirtualBox.xidl, DO NOT EDIT! -# - +# -*- coding: utf-8 -*- + +""" +VirtualBox COM/XPCOM constants. + +This file is autogenerated from VirtualBox.xidl, DO NOT EDIT! +""" + +__copyright__ = \ +""" +Copyright (C) 2009-2013 Oracle Corporation + +This file is part of VirtualBox Open Source Edition (OSE), as +available from http://www.virtualbox.org. This file is free software; +you can redistribute it and/or modify it under the terms of the GNU +General Public License (GPL) as published by the Free Software +Foundation, in version 2 as it comes in the "COPYING" file of the +VirtualBox OSE distribution. VirtualBox OSE is distributed in the +hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +""" + +__version__ = "$Revision: 87223 $"; + + + class VirtualBoxReflectionInfo: - def __init__(self, isSym): - self.isSym = isSym - - _Values = { - '':{ - '':, - }, - - } - - _ValuesSym = { - '':{ - '': '', - }, - - } - - _ValuesFlat = { - - - - - '_':, - - , - } - - _ValuesFlatSym = { - - - - - - - - '': '', - - , - } - - def __getattr__(self,attr): - if self.isSym: - v = self._ValuesFlatSym.get(attr) - else: - v = self._ValuesFlat.get(attr) - if v is not None: - return v - else: - raise AttributeError - - def all_values(self,enum_name): - if self.isSym: - vals = self._ValuesSym.get(enum_name) - else: - vals = self._Values.get(enum_name) - if vals is not None: - return vals - else: - return {} + """ + Enum constants for the various python styles. + """ + + def __init__(self, fIsSym): + self.__fIsSym = fIsSym + __dValues = { + + + + ' ': { + + + ' + ': + , + + + }, + + + } + + __dValuesSym = { + + + ' ': { + + + ' ': ' + + ', + + + }, + + + } + + __dValuesFlat = { + + + + + + + ' _ + ': + , + + + + # Result constants: + + + ' ': + , + + + } + + __dValuesFlatSym = { + + + + + + + + + + ' ': + ' ', + + + + # Result constants: + + + ' ': + '', + + + } + + def __getattr__(self, sAttrName): + if self.__fIsSym: + oValue = self.__dValuesFlatSym.get(sAttrName) + else: + oValue = self.__dValuesFlat.get(sAttrName) + if oValue is None: + raise AttributeError + return oValue + + def all_values(self, sEnumName): + """ Returns a dictionary with all the value names for a given enum type. """ + if self.__fIsSym: + dValues = self.__dValuesSym.get(sEnumName) + else: + dValues = self.__dValues.get(sEnumName) + if dValues is None: + dValues = {} + return dValues + + + -- cgit v1.2.1