Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  mapping.py

  Sprache: Python
 

# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

'''Maps each node type to an implementation class.
When adding a new node type, you add to this mapping.
'''

from __future__ import print_function

from grit import exception

from grit.node import empty
from grit.node import include
from grit.node import message
from grit.node import misc
from grit.node import node_io
from grit.node import structure
from grit.node import variant


_ELEMENT_TO_CLASS = {
  'identifiers'   : empty.IdentifiersNode,
  'includes'      : empty.IncludesNode,
  'messages'      : empty.MessagesNode,
  'outputs'       : empty.OutputsNode,
  'structures'    : empty.StructuresNode,
  'translations'  : empty.TranslationsNode,
  'include'       : include.IncludeNode,
  'emit'          : node_io.EmitNode,
  'file'          : node_io.FileNode,
  'output'        : node_io.OutputNode,
  'ex'            : message.ExNode,
  'message'       : message.MessageNode,
  'ph'            : message.PhNode,
  'else'          : misc.ElseNode,
  'grit'          : misc.GritNode,
  'identifier'    : misc.IdentifierNode,
  'if'            : misc.IfNode,
  'part'          : misc.PartNode,
  'release'       : misc.ReleaseNode,
  'then'          : misc.ThenNode,
  'structure'     : structure.StructureNode,
  'skeleton'      : variant.SkeletonNode,
}


def ElementToClass(name, typeattr):
  '''Maps an element to a class that handles the element.

  Args:
    name: 'element' (the name of the element)
    typeattr: 'type' (the value of the type attribute, if present, else None)

  Return:
    type
  '''
  if name not in _ELEMENT_TO_CLASS:
    raise exception.UnknownElement()
  return _ELEMENT_TO_CLASS[name]

Messung V0.5 in Prozent
C=91 H=100 G=95

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik