001/****************************************************************************
002 * Copyright/Copyleft:
003 *
004 * For this source the LGPL Lesser General Public License,
005 * published by the Free Software Foundation is valid.
006 * It means:
007 * 1) You can use this source without any restriction for any desired purpose.
008 * 2) You can redistribute copies of this source to everybody.
009 * 3) Every user of this source, also the user of redistribute copies
010 *    with or without payment, must accept this license for further using.
011 * 4) But the LPGL ist not appropriate for a whole software product,
012 *    if this source is only a part of them. It means, the user
013 *    must publish this part of source,
014 *    but don't need to publish the whole source of the own product.
015 * 5) You can study and modify (improve) this source
016 *    for own using or for redistribution, but you have to license the
017 *    modified sources likewise under this LGPL Lesser General Public License.
018 *    You mustn't delete this Copyright/Copyleft inscription in this source file.
019 *
020 * @author JcHartmut: hartmut.schorrig@vishia.de
021 * @version 2008-04-06  (year-month-day)
022 * list of changes:
023 * 2008-04-06 JcHartmut: some correction
024 * 2008-03-15 JcHartmut: creation
025 *
026 ****************************************************************************/
027package org.vishia.java2C;
028
029import java.util.TreeMap;
030
031
032/**This class represents the index of all java classes for Translation.
033 * A singleton instance is created at start of translation.
034 * It is filled successively if a new class is detected while executing the first pass of translation, the generation of header.
035 * It is used for the second pass, the generation of C-file.
036 */
037public class AllData
038{
039  /**List of known types. */
040  final TreeMap<String, ClassData> classes = new TreeMap<String, ClassData>();
041
042  void add( String sClassName, ClassData clazz){ classes.put(sClassName, clazz); }
043
044  ClassData get(String sClassName){ return classes.get(sClassName); }
045
046}