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 is 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 Hartmut Schorrig: hartmut.schorrig@vishia.de, www.vishia.org 021 * @version 0.93 2011-01-05 (year-month-day) 022 *******************************************************************************/ 023package org.vishia.java2C; 024import java.util.List; 025import java.util.Map; 026 027import org.vishia.mainCmd.Report; 028 029 030/**Interface to access to getted values of a input cfg file. 031 */ 032public interface ConfigSrcPathPkg_ifc 033{ 034 /**Sub-interface to get values from a prefix/suffix-set. */ 035 public interface Set 036 { 037 /**Gets the path and maybe a file prefix. Return "" if it isn't given in input.cfg. */ 038 String getFilePrefix(); 039 /**Gets the suffix for files. Return null if it isn't given in input.cfg. Than the prefix contains the whole filename. */ 040 String getFileSuffix(); 041 /**Gets the prefix for names. Return "" if it isn't given in input.cfg. */ 042 String getNamePrefix(); 043 /**Gets the suffix for names. Return null if it isn't given in input.cfg. Than the prefix contains the whole classname*/ 044 String getNameSuffix(); 045 /**Gets the input path. */ 046 String getInputPath(); 047 048 String getStcFile(); 049 050 } 051 052 /**Returns the list of all pathes parsed with 053 * <pre> 054 * stcPath::=<?>{ <\"\"?stcPath>| <* :;?stcPath> ? : }. 055 * </pre> 056 */ 057 List<String> getStcPathes(); 058 059 /**Returns the list of all pathes parsed with 060 * <pre> 061 * srcPath::=<?>{ <\"\"?srcPath>| <* :;?srcPath> ? : }. 062 * </pre> 063 */ 064 List<String> getSrcPathes(); 065 066 /**Returns the list of all sources to translate. 067 * A member of the list is either a Java file with package from the pkg root with <code>/</code> at separator, 068 * at example <code>org/vishia/util/StringPart.java</code> 069 * or it is a package with <code>/</code> as separator and on end, 070 * at example <code>org/vishia/util/</code>. 071 */ 072 List<String> getSrcToTranslate(); 073 074 /**Returns the Set of path, prefix and postfix for a given package path. 075 * @return If the package path isn't found, returns null. 076 */ 077 Set getCPathPrePostfixForPackage(String javaPackagePath); 078 079 void reportConfig(Report report, int reportLevel); 080 081 public java.util.Set<Map.Entry<String, ConfigSrcPathPkg_ifc.Set>> getListPackageReplacements(); 082 083 084 085 /* @param prefixCFile The prefix to build the C class name and the C file name. 086 * The part after the last slash <code>/</code> is the prefix for class names. 087 * The prefix should ended with slash if the file name has no prefix, 088 * but a path to store the to create *.c and *.h files are given. 089 * The prefix may contain <code>""</code>. 090 * @param suffixCFile The suffix to build the C class name and the C file name. 091 */ 092 093 094}