Initial
authorEbersold <aebersol@n3150.home>
Mon, 20 Dec 2021 19:48:53 +0000 (20:48 +0100)
committerEbersold <aebersol@n3150.home>
Mon, 20 Dec 2021 19:48:53 +0000 (20:48 +0100)
138 files changed:
CMakeLists.txt [new file with mode: 0644]
README.txt [new file with mode: 0644]
doc/antcc.xsd [new file with mode: 0644]
doc/doxygen_antcc.cfg [new file with mode: 0644]
examples/SwSwInt.xml [new file with mode: 0644]
examples/basic_build.xml [new file with mode: 0644]
examples/build.xml [new file with mode: 0644]
examples/buildFUS.xml [new file with mode: 0644]
examples/buildTrn.xml [new file with mode: 0644]
examples/build_unitest_project.xsl [new file with mode: 0644]
examples/build_unittesting.xml [new file with mode: 0644]
examples/envReport.xml [new file with mode: 0644]
examples/regress.xml [new file with mode: 0644]
examples/regress_FIT.xml [new file with mode: 0644]
examples/regress_SEN_FUNC_compact.xml [new file with mode: 0644]
examples/regress_SEN_FUNC_remote.xml [new file with mode: 0644]
examples/regress_compact.xml [new file with mode: 0644]
examples/test.properties [new file with mode: 0644]
examples/unittesting.xml [new file with mode: 0644]
main.cpp [new file with mode: 0644]
src/CMakeLists.txt [new file with mode: 0644]
src/antcc/antcc.cpp [new file with mode: 0644]
src/antcc/antcc.h [new file with mode: 0644]
src/antcc/common.h [new file with mode: 0644]
src/antcc/config.h.cmake [new file with mode: 0644]
src/app/antcc.h [new file with mode: 0644]
src/core/executor.cpp [new file with mode: 0644]
src/core/executor.h [new file with mode: 0644]
src/core/graph.cpp [new file with mode: 0644]
src/core/graph.h [new file with mode: 0644]
src/core/observer.cpp [new file with mode: 0644]
src/core/observer.h [new file with mode: 0644]
src/location.h [new file with mode: 0644]
src/logger.cpp [new file with mode: 0644]
src/logger.h [new file with mode: 0644]
src/os/CMakeLists.txt [new file with mode: 0644]
src/os/directory.cpp [new file with mode: 0644]
src/os/directory.h [new file with mode: 0644]
src/os/execute.cpp [new file with mode: 0644]
src/os/execute.h [new file with mode: 0644]
src/os/file.cpp [new file with mode: 0644]
src/os/file.h [new file with mode: 0644]
src/os/os.h [new file with mode: 0644]
src/os/path.cpp [new file with mode: 0644]
src/os/path.h [new file with mode: 0644]
src/project.cpp [new file with mode: 0644]
src/project.h [new file with mode: 0644]
src/projectComponent.cpp [new file with mode: 0644]
src/projectComponent.h [new file with mode: 0644]
src/properties/CMakeLists.txt [new file with mode: 0644]
src/properties/property_file.cpp [new file with mode: 0644]
src/properties/property_file.h [new file with mode: 0644]
src/properties/reference.l [new file with mode: 0644]
src/properties/reference.y [new file with mode: 0644]
src/properties/reference_parser.cpp [new file with mode: 0644]
src/properties/reference_parser.h [new file with mode: 0644]
src/target.cpp [new file with mode: 0644]
src/target.h [new file with mode: 0644]
src/tasks/CMakeLists.txt [new file with mode: 0644]
src/tasks/ITaskContainer.h [new file with mode: 0644]
src/tasks/antcall.cpp [new file with mode: 0644]
src/tasks/antcall.h [new file with mode: 0644]
src/tasks/aregister.cpp [new file with mode: 0644]
src/tasks/condition/CMakeLists.txt [new file with mode: 0644]
src/tasks/condition/ICondition.h [new file with mode: 0644]
src/tasks/condition/and.cpp [new file with mode: 0644]
src/tasks/condition/and.h [new file with mode: 0644]
src/tasks/condition/condition.h [new file with mode: 0644]
src/tasks/condition/conditionBase.h [new file with mode: 0644]
src/tasks/condition/contains.h [new file with mode: 0644]
src/tasks/condition/equals.h [new file with mode: 0644]
src/tasks/condition/isFailure.h [new file with mode: 0644]
src/tasks/condition/isFalse.h [new file with mode: 0644]
src/tasks/condition/isSet.cpp [new file with mode: 0644]
src/tasks/condition/isSet.h [new file with mode: 0644]
src/tasks/condition/not.cpp [new file with mode: 0644]
src/tasks/condition/not.h [new file with mode: 0644]
src/tasks/condition/or.cpp [new file with mode: 0644]
src/tasks/condition/or.h [new file with mode: 0644]
src/tasks/conditionTask.cpp [new file with mode: 0644]
src/tasks/conditionTask.h [new file with mode: 0644]
src/tasks/description.cpp [new file with mode: 0644]
src/tasks/description.h [new file with mode: 0644]
src/tasks/echo.cpp [new file with mode: 0644]
src/tasks/echo.h [new file with mode: 0644]
src/tasks/echoproperties.cpp [new file with mode: 0644]
src/tasks/echoproperties.h [new file with mode: 0644]
src/tasks/exec.cpp [new file with mode: 0644]
src/tasks/exec.h [new file with mode: 0644]
src/tasks/fail.cpp [new file with mode: 0644]
src/tasks/fail.h [new file with mode: 0644]
src/tasks/fileop.cpp [new file with mode: 0644]
src/tasks/fileop.h [new file with mode: 0644]
src/tasks/ifelse.cpp [new file with mode: 0644]
src/tasks/ifelse.h [new file with mode: 0644]
src/tasks/import.cpp [new file with mode: 0644]
src/tasks/import.h [new file with mode: 0644]
src/tasks/loadfile.cpp [new file with mode: 0644]
src/tasks/loadfile.h [new file with mode: 0644]
src/tasks/loadproperties.cpp [new file with mode: 0644]
src/tasks/loadproperties.h [new file with mode: 0644]
src/tasks/macrodef.cpp [new file with mode: 0644]
src/tasks/macrodef.h [new file with mode: 0644]
src/tasks/property.cpp [new file with mode: 0644]
src/tasks/property.h [new file with mode: 0644]
src/tasks/sleep.cpp [new file with mode: 0644]
src/tasks/sleep.h [new file with mode: 0644]
src/tasks/ssh/sshBase.h [new file with mode: 0644]
src/tasks/ssh/sshExec.h [new file with mode: 0644]
src/tasks/ssh/sshScp.h [new file with mode: 0644]
src/tasks/subant.cpp [new file with mode: 0644]
src/tasks/subant.h [new file with mode: 0644]
src/tasks/task.h [new file with mode: 0644]
src/tasks/taskContainer.cpp [new file with mode: 0644]
src/tasks/taskContainer.h [new file with mode: 0644]
src/tasks/taskdef.cpp [new file with mode: 0644]
src/tasks/taskdef.h [new file with mode: 0644]
src/tasks/xslt.cpp [new file with mode: 0644]
src/tasks/xslt.h [new file with mode: 0644]
src/types/datatype.h [new file with mode: 0644]
src/types/dregister.cpp [new file with mode: 0644]
src/types/fileset.cpp [new file with mode: 0644]
src/types/fileset.h [new file with mode: 0644]
src/types/include.cpp [new file with mode: 0644]
src/types/include.h [new file with mode: 0644]
src/xml/CMakeLists.txt [new file with mode: 0644]
src/xml/parser/CMakeLists.txt [new file with mode: 0644]
src/xml/parser/ant_element_factory.cpp [new file with mode: 0644]
src/xml/parser/ant_element_factory.h [new file with mode: 0644]
src/xml/parser/ant_elements.cpp [new file with mode: 0644]
src/xml/parser/ant_elements.h [new file with mode: 0644]
src/xml/parser/ant_elements_parser.cpp [new file with mode: 0644]
src/xml/parser/ant_elements_parser.h [new file with mode: 0644]
src/xml/parser/ant_elements_parser_root.cpp [new file with mode: 0644]
src/xml/parser/document.cpp [new file with mode: 0644]
src/xml/parser/document.h [new file with mode: 0644]
src/xml/parser/parser_base.h [new file with mode: 0644]
src/xml/parser/parsers.h.inc [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..892f77c
--- /dev/null
@@ -0,0 +1,122 @@
+cmake_minimum_required(VERSION 3.1.3)
+
+IF (POLICY CMP0048)
+       #CMAKE_POLICY(SET CMP0048 NEW)
+ENDIF()
+PROJECT(antcc )
+#PROJECT(antcc VERSION 1.0.0 LANGUAGES C)
+
+IF(NOT CMAKE_BUILD_TYPE)
+  SET(CMAKE_BUILD_TYPE "Debug")
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
+IF(WIN32)
+  # For win32 the build process is very different
+  SET(ANTCC_GPL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../gpl")
+  # expat
+  SET(EXPAT_INCLUDE_DIR "c:/Tools/Expat 2.2.10/Source/lib" CACHE STRING "Expat include dir")
+  SET(EXPAT_LIBRARY "c:/Tools/Expat 2.2.10/Source/B64r/libexpat.lib" CACHE STRING "Expat library")
+  INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR})
+ELSE(WIN32)
+  FIND_PACKAGE(EXPAT REQUIRED)
+ENDIF(WIN32)
+
+
+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
+
+SUBDIRS(rules  src utils)
+
+INCLUDE_DIRECTORIES("${antcc_SOURCE_DIR}")
+INCLUDE_DIRECTORIES("${antcc_SOURCE_DIR}/src")
+INCLUDE_DIRECTORIES("${antcc_BINARY_DIR}")
+INCLUDE_DIRECTORIES("${antcc_BINARY_DIR}/src")
+
+
+
+
+ADD_EXECUTABLE(antcc main.cpp)
+
+TARGET_LINK_LIBRARIES(antcc libantcc_parser libantcc_os libantcc propertylib ${EXPAT_LIBRARY} ltdl)
+
+
+OPTION(ANTCC_WITH_BOOST "Build antcc with boost dependency" OFF)
+OPTION(ANTCC_WITH_AEB   "Build antcc with aeb shared pointer" ON)
+
+OPTION(ANTCC_OPTION_DEBUG_PARSER "Debug traces for parser " OFF)
+OPTION(ANTCC_OPTION_DEBUG_PARSER_CPLX_ATTR "Debug Attribute function in ComplexElementParser" OFF)
+OPTION(ANTCC_OPTION_DEBUG_PARSER_CHARS "  Debug traces for parser   Character entry" OFF)
+OPTION(ANTCC_OPTION_DEBUG_PARSER_PROJECT  "Debug traces for project parser"   OFF)
+OPTION(ANTCC_OPTION_DEBUG_PARSER_TARGET   "Debug traces for target  parser"   OFF)
+OPTION(ANTCC_OPTION_DEBUG_PARSER_TASK     "Debug traces for target  parser"   OFF)
+OPTION(ANTCC_OPTION_DEBUG_PARSER_TYPE     "Debug traces for target  parser"   OFF)
+OPTION(ANTCC_OPTION_INSTALL               "Build antcc docs" OFF)
+
+OPTION(ANTCC_BUILD_TESTS "Build antcc tests" OFF)
+OPTION(ANTCC_BUILD_DOCS  "Build antcc docs" OFF)
+
+# new way
+CONFIGURE_FILE(${antcc_SOURCE_DIR}/src/antcc/config.h.cmake
+       ${antcc_BINARY_DIR}/src/antcc/config.h)
+
+##
+## Install
+##
+MACRO(ANTCC_INSTALL)
+  IF (ANTCC_OPTION_INSTALL)
+    INSTALL(${ARGN})
+  ENDIF()
+ENDMACRO()
+
+ANTCC_INSTALL(TARGETS antcc EXPORT antcc 
+       RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+       LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+       ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR}
+       )
+
+##
+## CPack
+##
+SET(CPACK_SOURCE_GENERATOR '')
+
+SET(CPACK_OUTPUT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackConfig.cmake" )
+
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Antcc build tool")
+SET(CPACK_PACKAGE_VENDOR "Aeb")
+#SET(CPACK_PACKAGE_DESCRIPTION_FILE "")
+#SET(CPACK_RESOURCE_FILE_LICENSE "")
+SET(CPACK_PACKAGE_VERSION_MAJOR "1")
+SET(CPACK_PACKAGE_VERSION_MINOR "0")
+SET(CPACK_PACKAGE_VERSION_PATCH "0")
+
+SET(CPACK_PACKAGE_FILE_NAME "Antcc")
+#SET(CPACK_PACKAGE_NAME "Antcc")
+SET(PACKAGE_NAME "Antcc")
+SET(PACKAGE_TARNAME "${PACKAGE_NAME}")
+
+INCLUDE(CMakePackageConfigHelpers)
+
+IF(WIN32)
+  SET(CPACK_GENERATOR ZIP)
+ELSE()
+  SET(CPACK_GENERATOR TGZ)
+ENDIF()
+INCLUDE(CPack)
+
+##
+## Configuration Status
+##
+MESSAGE(STATUS "==============================================================")
+MESSAGE(STATUS "")
+MESSAGE(STATUS "Configuration")
+MESSAGE(STATUS "  Prefix ................. ${CMAKE_INSTALL_PREFIX}")
+MESSAGE(STATUS "    Bin  ................. ${CMAKE_INSTALL_BINDIR}")
+MESSAGE(STATUS "    Lib  ................. ${CMAKE_INSTALL_LIBDIR}")
+MESSAGE(STATUS "  Build type ............. ${CMAKE_BUILD_TYPE}")
+MESSAGE(STATUS "  Build Tests ............ ${ANTCC_BUILD_TESTS}")
+MESSAGE(STATUS "  Build Docs ............. ${ANTCC_BUILD_DOCS}")
+MESSAGE(STATUS "  Install files .......... ${ANTCC_OPTION_INSTALL}")
+MESSAGE(STATUS "")
+MESSAGE(STATUS "  Features")
+MESSAGE(STATUS "    Use boost ............ ${ANTCC_WITH_BOOST}")
+MESSAGE(STATUS "    Use aeb .............. ${ANTCC_WITH_AEB}")
+MESSAGE(STATUS "==============================================================")
diff --git a/README.txt b/README.txt
new file mode 100644 (file)
index 0000000..088980e
--- /dev/null
@@ -0,0 +1,70 @@
+
+1) INTRODUCTION
+---------------
+Antcc is a c++ written version of the original ant project. The initial goal is to have a lite version
+of ant that can run on small systems like raspeberry pi and so on. The idea is to have a less ressource
+consuming tool. Therefore, all java likes and tags are removed. We only keep the most used and required
+features. 
+Antcc is not a remplacement for make. it completes it by providing a uniform way to launch preparation 
+and maintenance activities.
+
+1.1) supported tasks
+--------------------
+ echo,fail,antcall,exec,if,else,property,copy,move,delete
+ ,target,echoproperties,available,
+
+
+2) BUILD REQUIREMENTS
+---------------------
+
+2.1) Linux Systems
+------------------
+  * cmake         required
+  * libexpat-dev
+  * libxml
+  * libxslt  
+  * libcurl
+  * libssh
+  * libltdl  
+
+2.2) Windows Systems
+--------------------
+  * cmake require
+  * lib expat 2.2.10 for win found on the net
+
+  * libxml2 
+  * libiconv required for libxml2
+  * libzlib  required for libxml2
+     cd {somewhere}\
+     > git clone https://github.com/kiyolee/libiconv-win-build.git
+     > git clone https://github.com/kiyolee/zlib-win-build.git
+     > git clone https://github.com/kiyolee/libxml2-win-build.git
+  
+  * libltdl  for dynamic loading of components
+  * libcurl ?
+
+
+101020: Progress
+-------
+-> Still missing elementes : xslt,include,fileset,available,redirector,errormapper,sleep
+-> I think I'll let java aside. Not interested for small systems.
+
+191013: progress so far
+------
+-> Missing tasks : taskdef, echo,contains, 
+-> Missing types so far : fileset, fiterchain,
+
+So far I'm able to parse the XML file and build the object tree. very basic.
+One check is to count the number of targets
+
+
+191002: Idea
+-----------
+-> The idea is to have something similar to ant but written in C++
+-> Keep it as simple as possible so it can be maintained
+-> I want it to run on windows and Linux
+-> I also want a better property interpreter than ant.
+   * properties are context specialized
+   * properties are classified Subject / Metaclass / property (name / value)
+-> I also want a lite graphical user interface to edit the build rules
+-> All rules are stored in XML file as ant.
diff --git a/doc/antcc.xsd b/doc/antcc.xsd
new file mode 100644 (file)
index 0000000..be01a0c
--- /dev/null
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema targetNamespace="http://www.telapi.com"
+    xmlns:tapi="http://www.telapi.com"
+    xmlns="http://www.telapi.com"
+    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+    elementFormDefault="qualified">
+
+    <!-- File operation tags-->
+    <xs:complexType name="mkdir">
+    <xs:annotation>
+    </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="copy">
+    <xs:annotation>
+    </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="move">
+    <xs:annotation>
+    </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="delete">
+    <xs:annotation>
+    </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="basename">
+    <xs:annotation>
+    </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="dirname">
+    <xs:annotation>
+    </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    <xs:complexType name="available">
+    <xs:annotation>
+    </xs:annotation>
+        <xs:attribute name="file">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="type">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="property">
+            <xs:annotation>
+              <xs:documentation>
+                Sets this property to true if file exitsts. The type attributes
+                specifies if the the file is a directory of a file.
+              </xs:documentation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+
+    <!-- -->
+    <xs:complexType name="property">
+    <xs:annotation>
+    </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="value">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="file">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="location">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="environment">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="prefix">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    
+    <xs:complexType name="exec">
+        <xs:annotation>
+        </xs:annotation>
+        <xs:sequence >
+            <xs:element name="arg">
+            </xs:element>
+        </xs:sequence>
+    </xs:complexType>
+    
+    <xs:complexType name="fail">
+        <xs:annotation>
+       </xs:annotation>
+        <xs:attribute name="unless">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="message">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+
+    <xs:complexType name="echo">
+        <xs:annotation>
+        </xs:annotation>
+    </xs:complexType>
+
+    <xs:complexType name="sleep">
+        <xs:annotation>
+        </xs:annotation>
+    </xs:complexType>
+
+    <xs:complexType name="antcall">
+        <xs:annotation>
+        </xs:annotation>
+        <xs:attribute name="target">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    
+    <xs:complexType name="macrodef">
+        <xs:annotation>
+        </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    
+    <xs:complexType name="taskdef">
+        <xs:annotation>
+        </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+    
+    <xs:complexType name="task">
+        <xs:annotation>
+            <xs:documentation>
+            </xs:documentation>
+        </xs:annotation>
+    </xs:complexType>
+    
+    <xs:complexType name="target">
+        <xs:annotation>
+        </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="depends">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+
+    <xs:complexType name="project">
+        <xs:annotation>
+        </xs:annotation>
+        <xs:attribute name="name">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="default">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+        <xs:attribute name="basedir">
+            <xs:annotation>
+            </xs:annotation>
+        </xs:attribute>
+    </xs:complexType>
+</xs:schema>
diff --git a/doc/doxygen_antcc.cfg b/doc/doxygen_antcc.cfg
new file mode 100644 (file)
index 0000000..f5bc250
--- /dev/null
@@ -0,0 +1,2494 @@
+# Doxyfile 1.8.13
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "AntCC"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         = 1.0.0
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          = "On Demand Integration Tool"
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = doc/api
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES    = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 0.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS   = 0
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO, these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES, upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR          = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = src src/tasks src/os src/properties src/types src/xml/parser
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
+
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.idl \
+                         *.ddl \
+                         *.odl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.cs \
+                         *.d \
+                         *.php \
+                         *.php4 \
+                         *.php5 \
+                         *.phtml \
+                         *.inc \
+                         *.m \
+                         *.markdown \
+                         *.md \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.pyw \
+                         *.f90 \
+                         *.f95 \
+                         *.f03 \
+                         *.f08 \
+                         *.f \
+                         *.for \
+                         *.tcl \
+                         *.vhd \
+                         *.vhdl \
+                         *.ucf \
+                         *.qsf
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = *.cpp
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
+# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
+# cost of reduced performance. This can be particularly helpful with template
+# rich C++ code for which doxygen's built-in parser lacks the necessary type
+# information.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse-libclang=ON option for CMake.
+# The default value is: NO.
+
+CLANG_ASSISTED_PARSING = NO
+
+# If clang assisted parsing is enabled you can provide the compiler with command
+# line options that you would normally use when invoking the compiler. Note that
+# the include paths will already be set by doxygen for the files and directories
+# specified with INPUT and INCLUDE_PATH.
+# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
+
+CLANG_OPTIONS          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list). For an example see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP        = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE        = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR             =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
+# program listings (including syntax highlighting and cross-referencing
+# information) to the DOCBOOK output. Note that enabling this will significantly
+# increase the size of the DOCBOOK output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_PROGRAMLISTING = NO
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: YES.
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font in the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
+# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
+# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file. If left blank, it is assumed
+# PlantUML is not used or called during a preprocessing step. Doxygen will
+# generate a warning when it encounters a \startuml command in this case and
+# will not generate output for the diagram.
+
+PLANTUML_JAR_PATH      =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE      =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH  =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
diff --git a/examples/SwSwInt.xml b/examples/SwSwInt.xml
new file mode 100644 (file)
index 0000000..ae4faa9
--- /dev/null
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<components>\r
+<component name="CommandHandling_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_1::CommandHandling_SWINT::CommandHandlingTest"/>\r
+  <path src="src\SWINT\SW_Integral_1\CommandHandling_SWINT"/>\r
+  <build name="CommandHandlingTest"/>\r
+</component>\r
+<component name="CommunicationHandling_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_1::CommunicationHandling_SWINT::CommunicationHandlingTest"/>\r
+  <path src="src\SWINT\SW_Integral_1\CommunicationHandling_SWINT"/>\r
+  <build name="CommunicationHandlingTest"/>\r
+</component>\r
+<component name="Identification_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_1::Identification_SWINT::IdentificationTest"/>\r
+  <path src="src\SWINT\SW_Integral_1\Identification_SWINT"/>\r
+  <build name="IdentificationTest"/>\r
+</component>\r
+<component name="ParameterHandling_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_1::ParameterHandling_SWINT::ParameterHandlingTest"/>\r
+  <path src="src\SWINT\SW_Integral_1\ParameterHandling_SWINT"/>\r
+  <build name="ParameterHandlingTest"/>\r
+</component>\r
+<component name="PersistingParameters_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_1::PersistingParameters_SWINT::PersistingParametersTest"/>\r
+  <path src="src\SWINT\SW_Integral_1\PersistingParameters_SWINT"/>\r
+  <build name="PersistingParametersTest"/>\r
+</component>\r
+<component name="PowerUp_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_1::PowerUp_SWINT::PowerUpTest"/>\r
+  <path src="src\SWINT\SW_Integral_1\PowerUp_SWINT"/>\r
+  <build name="PowerUpTest"/>\r
+</component>\r
+<component name="Scheduling_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_1::Scheduling_SWINT::SchedulingTest"/>\r
+  <path src="src\SWINT\SW_Integral_1\Scheduling_SWINT"/>\r
+  <build name="SchedulingTest"/>\r
+</component>\r
+<component name="TransmitterInterface_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_1::TransmitterInterface_SWINT::TransmitterInterfaceTest"/>\r
+  <path src="src\SWINT\SW_Integral_1\TransmitterInterface_SWINT"/>\r
+  <build name="TransmitterInterfaceTest"/>\r
+</component>\r
+<component name="Calibration_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::Calibration_SWINT::CalibrationTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\Calibration_SWINT"/>\r
+  <build name="CalibrationTest"/>\r
+</component>\r
+<component name="ClampOnParameterization_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::ClampOnParameterization_SWINT::ClampOnParameterizationTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\ClampOnParameterization_SWINT"/>\r
+  <build name="ClampOnParameterizationTest"/>\r
+</component>\r
+<component name="Compensations_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::Compensations_SWINT::CompensationsTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\Compensations_SWINT"/>\r
+  <build name="CompensationsTest"/>\r
+</component>\r
+<component name="CurrentInputs_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::CurrentInputs_SWINT::CurrentInputsTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\CurrentInputs_SWINT"/>\r
+  <build name="CurrentInputsTest"/>\r
+</component>\r
+<component name="ErrorHandling_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::ErrorHandling_SWINT::ErrorHandlingTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\ErrorHandling_SWINT"/>\r
+  <build name="ErrorHandlingTest"/>\r
+</component>\r
+<component name="FlowProfileCompensation_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::FlowProfileCompensation_SWINT::FlowProfileCompensationTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\FlowProfileCompensation_SWINT"/>\r
+  <build name="FlowProfileCompensationTest"/>\r
+</component>\r
+<component name="FrequencySearch_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::FrequencySearch_SWINT::FrequencySearchTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\FrequencySearch_SWINT"/>\r
+  <build name="FrequencySearchTest"/>\r
+</component>\r
+<component name="LiquidentLookupTable_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::LiquidentLookupTable_SWINT::LiquidentLookupTableTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\LiquidentLookupTable_SWINT"/>\r
+  <build name="LiquidentLookupTableTest"/>\r
+</component>\r
+<component name="MultipointCalibration_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::MultipointCalibration_SWINT::MultipointCalibrationTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\MultipointCalibration_SWINT"/>\r
+  <build name="MultipointCalibrationTest"/>\r
+</component>\r
+<component name="OilProcessValues_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::OilProcessValues_SWINT::OilProcessValuesTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\OilProcessValues_SWINT"/>\r
+  <build name="OilProcessValuesTest"/>\r
+</component>\r
+<component name="PathControl_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::PathControl_SWINT::PathControlTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\PathControl_SWINT"/>\r
+  <build name="PathControlTest"/>\r
+</component>\r
+<component name="PCBTemperature_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::PCBTemperature_SWINT::PCBTemperatureTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\PCBTemperature_SWINT"/>\r
+  <build name="PCBTemperatureTest"/>\r
+</component>\r
+<component name="ProcessValueSimulation_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::ProcessValueSimulation_SWINT::ProcessValueSimulationTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\ProcessValueSimulation_SWINT"/>\r
+  <build name="ProcessValueSimulationTest"/>\r
+</component>\r
+<component name="RTDInputs_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::RTDInputs_SWINT::RTDInputsTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\RTDInputs_SWINT"/>\r
+  <build name="RTDInputsTest"/>\r
+</component>\r
+<component name="SIF_DspFpgaIfDiagnostics_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SIF_DspFpgaIfDiagnostics_SWINT::SIFDspFpgaIfDiagnosticsTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SIF_DspFpgaIfDiagnostics_SWINT"/>\r
+  <build name="SIF_DspFpgaIfDiagnosticsTest"/>\r
+</component>\r
+<component name="SIF_MemoryCheck_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SIF_MemoryCheck_SWINT::SIFMemoryCheckTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SIF_MemoryCheck_SWINT"/>\r
+  <build name="SIF_MemoryCheckTest"/>\r
+</component>\r
+<component name="SIF_ParameterIntegrity_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SIF_ParameterIntegrity_SWINT::SIFParameterIntegrityTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SIF_ParameterIntegrity_SWINT"/>\r
+  <build name="SIF_ParameterIntegrityTest"/>\r
+</component>\r
+<component name="SIF_StackOverflow_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SIF_StackOverflow_SWINT::SIF_StackOverflowTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SIF_StackOverflow_SWINT"/>\r
+  <build name="SIF_StackOverflowTest"/>\r
+</component>\r
+<component name="SIF_TemporalProgramFlowControl_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SIF_TemporalProgramFlowControl_SWINT::SIFTemporalProgramFlowControlTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SIF_TemporalProgramFlowControl_SWINT"/>\r
+  <build name="SIF_TemporalProgramFlowControlTest"/>\r
+</component>\r
+<component name="SIF_TTAlgorithmCheck_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SIF_TTAlgorithmCheck_SWINT::SIFTTAlgorithmCheckTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SIF_TTAlgorithmCheck_SWINT"/>\r
+  <build name="SIF_TTAlgorithmCheckTest"/>\r
+</component>\r
+<component name="SignalDisplay_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SignalDisplay_SWINT::SignalDisplayTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SignalDisplay_SWINT"/>\r
+  <build name="SignalDisplayTest"/>\r
+</component>\r
+<component name="SignalSearch_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SignalSearch_SWINT::SignalSearchTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SignalSearch_SWINT"/>\r
+  <build name="SignalSearchTest"/>\r
+</component>\r
+<component name="SpacingIndexingMethod_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SpacingIndexingMethod_SWINT::SpacingIndexingMethodTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SpacingIndexingMethod_SWINT"/>\r
+  <build name="SpacingIndexingMethodTest"/>\r
+</component>\r
+<component name="StandardProcessValues_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::StandardProcessValues_SWINT::StandardProcessValuesTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\StandardProcessValues_SWINT"/>\r
+  <build name="StandardProcessValuesTest"/>\r
+</component>\r
+<component name="SystemVoltageMonitor_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::SystemVoltageMonitor_SWINT::SystemVoltageMonitorTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\SystemVoltageMonitor_SWINT"/>\r
+  <build name="SystemVoltageMonitorTest"/>\r
+</component>\r
+<component name="TransitTimeOperation_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::TransitTimeOperation_SWINT::TransitTimeOperationTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\TransitTimeOperation_SWINT"/>\r
+  <build name="TransitTimeOperationTest"/>\r
+</component>\r
+<component name="WarrantyPointers_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::WarrantyPointers_SWINT::WarrantyPointersTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\WarrantyPointers_SWINT"/>\r
+  <build name="WarrantyPointersTest"/>\r
+</component>\r
+<component name="ZeroOffsetAdjustment_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Integral_2::ZeroOffsetAdjustment_SWINT::ZeroOffsetAdjustmentTest"/>\r
+  <path src="src\SWINT\SW_Integral_2\ZeroOffsetAdjustment_SWINT"/>\r
+  <build name="ZeroOffsetAdjustmentTest"/>\r
+</component>\r
+<component name="DiagnosticsAlarmLimits_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Release_1_1::DiagnosticsAlarmLimits_SWINT::DiagnosticsAlarmLimitsTest"/>\r
+  <path src="src\SWINT\SW_Release_1_1\DiagnosticsAlarmLimits_SWINT"/>\r
+  <build name="DiagnosticsAlarmLimitsTest"/>\r
+</component>\r
+<component name="GasProcessValues_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Release_1_1::GasProcessValues_SWINT::GasProcessValuesTest"/>\r
+  <path src="src\SWINT\SW_Release_1_1\GasProcessValues_SWINT"/>\r
+  <build name="GasProcessValuesTest"/>\r
+</component>\r
+<component name="MultipointCalibration_1_1_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Release_1_1::MultipointCalibration_1_1_SWINT::MultipointCalibration_1_1_Test"/>\r
+  <path src="src\SWINT\SW_Release_1_1\MultipointCalibration_1_1_SWINT"/>\r
+  <build name="MultipointCalibration_1_1Test"/>\r
+</component>\r
+<component name="RateOfChange_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Release_1_1::RateOfChange_SWINT::RateOfChangeTest"/>\r
+  <path src="src\SWINT\SW_Release_1_1\RateOfChange_SWINT"/>\r
+  <build name="RateOfChangeTest"/>\r
+</component>\r
+<component name="ScraperPigDetection_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Release_1_1::ScraperPigDetection_SWINT::ScraperPigDetectionTest"/>\r
+  <path src="src\SWINT\SW_Release_1_1\ScraperPigDetection_SWINT"/>\r
+  <build name="ScraperPigDetectionTest"/>\r
+</component>\r
+<component name="SIF_CompareFlowrate_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Release_1_1::SIF_CompareFlowrate_SWINT::SIF_CompareFlowrateTest"/>\r
+  <path src="src\SWINT\SW_Release_1_1\SIF_CompareFlowrate_SWINT"/>\r
+  <build name="SIF_CompareFlowrateTest"/>\r
+</component>\r
+<component name="SIF_VolumeFlowCheck_SWINT" maxScriptErr="0" maxCheckFail="0" maxCheckWarn="0" maxSeqFail="0">\r
+  <class name="SW_SW_Integration::Test::SW_Release_1_1::SIF_VolumeFlowCheck_SWINT::SIF_VolumeFlowCheckTest"/>\r
+  <path src="src\SWINT\SW_Release_1_1\SIF_VolumeFlowCheck_SWINT"/>\r
+  <build name="SIF_VolumeFlowCheckTest"/>\r
+</component>\r
+</components>\r
diff --git a/examples/basic_build.xml b/examples/basic_build.xml
new file mode 100644 (file)
index 0000000..98482b5
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- 
+<project name="Build" default="all" basedir=".">
+    -->
+<project name="Build" default="all" >
+
+  <description>
+Basic example to test if I can run a basic test. 
+  </description>
+       <taskdef name="xslt" lib="./src/tasks/libantcc_xslt.so"/>
+  <property name="compile.cc" value="gcc" />
+  <property name="test.dir" value="testDir" />
+  <target name="all" depends="pre,build">
+      <exec executable="ls " resultproperty="ls_result" >
+      </exec>
+      <echo message="message is  ${ls_result}"/>
+      <if name="ls_result" value="0">
+          <echo message="ls_result test value 0 is  ${ls_result}  very good" />
+      </if>
+  </target>
+
+  <target name="build" depends="pre">
+          <echo message="message build" />
+  </target>
+  
+  
+  <target name="pre" >
+      <echo message="message pre" />
+      <available property="order.xsl.present" file="order.xsl"/>
+    <xslt in="test.xml" out="result.xml" style="order.xsl"/>
+    <mkdir dir="${test.dir}"/>
+    <copy file="regress.xml" todir="${test.dir}"/>
+    <move file="${test.dir}/regress.xml" tofile="${test.dir}/regressio.xml.move"/>
+  </target>
+
+  <target name="clean" >
+    <delete dir="${test.dir}"/>
+  </target>
+</project>
diff --git a/examples/build.xml b/examples/build.xml
new file mode 100644 (file)
index 0000000..f9ab094
--- /dev/null
@@ -0,0 +1,965 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<!-- Build.xml for the NOG_MassDigital_TRN -->\r
+<project name="GeneralScript" default="build">\r
+    <!-- Definitions of the dynamc view with config_spec of job -->\r
+    <property name="setcs.viewname" value="z003aess_sgd0012c_md4_cs_BMdv"/>\r
+    <property name="setcs.vobname" value="FCxxx_FrontEnd"/>\r
+    <property name="setcs.globalpath" value="\\dksgd0012app.ad001.siemens.net\CC_VIEWS\AD001\Z003AESS\z003aess_sgd0012c_md4_cs_BMdv.vws"/>\r
+    <property name="setcs.rootpath" value="M:/z003aess_sgd0012c_md4_cs_BMdv"/>\r
+    <property name="" value="C:/CCHOME/sgd0022c_z003aess_cint_bmv/FCxxx_FrontEnd/tools/cruisecontrol/generalBuildFiles"/>\r
+    <property name="update.dir" value="${updatedir}"/>\r
+    <property name="artifacts.dir" value="${modeldir}/artifacts"/>\r
+    <property name="buildlog.dir" value="${modeldir}/buildlog"/>\r
+    <!-- The directory where the source is generated -->\r
+    <property name="srcGen.dir" value="${srcdir}"/>\r
+    <property name="srcGen.make" value="${makefile}"/>\r
+    <property name="srcGen.elf" value="${elffile}"/>\r
+    <property name="trace32.host" value="127.0.0.1"/>\r
+    <property name="trace32.timeout" value="300"/>\r
+    <property name="trace32.ADInstallFolder" value="C:/Tools/ANALOG~1/VISUAL~1.0"/>\r
+    <property name="COMPortToFitSensor" value="9"/>\r
+    <property name="build.type" value="BUILD"/>\r
+    <property name="test.type" value="${build.type}"/>\r
+       <property name="VisualDspHome.dir" value="C:/Tools/ANALOG~1/VISUAL~1.5"/>\r
+       <property name="RhapsodyHome.dir" value="C:/Tools/Rhapsody/7.6.1"/>\r
+       <property name="CantataHome.dir" value="C:/Tools/QA_systems/cantata"/>\r
+\r
+    <property name="ant.XmlLogger.stylesheet.uri" value="/dashboard/log.xsl"/>\r
+\r
+       <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpath="${ant.home}/lib/AntelopeTasks_3.2.19.jar"/>\r
+       <taskdef name="xslt" lib="./src/tasks/libantcc_xslt.so"/>\r
+\r
+    <target name="all" depends="artifacts.clean,generate,metric,lint,build,test"/>\r
+\r
+    <target name="swint_gen" depends="bootstrap,clean,generate,build,test"/>\r
+\r
+    <target name="swint_rel" depends="bootstrap,clean,build,test"/>\r
+\r
+    <target name="fit_rel" depends="bootstrap,clean,fit_clear_eeprom,build,fit_install, fit.test"/>\r
+\r
+    <target name="trn_fit_rel" depends="bootstrap,clean,trn_build,trn_fit_install, trn_fit.test"/>\r
+\r
+    <target name="reloadCfgFile" depends="prep">\r
+        <echo message="ReloadCfg is cruiscontrol specific and java !!! "/>\r
+<!--\r
+        <java classname="ReloadCfg" classpath="${buildFilesFolder}/ReloadCfg"/>\r
+-->\r
+    </target>\r
+\r
+    <target name="artifacts.clean" depends="prep">\r
+        <delete dir="${artifacts}" quiet="true" verbose="false"/>\r
+    </target>\r
+\r
+    <target name="lint" depends="prep">\r
+        <fail unless="srcdir" message="Error: srcdir not set."/>\r
+        <fail unless="makefile" message="Error: makefile not set."/>\r
+        <fail unless="viewpath" message="Error: viewpath not set."/>\r
+        <fail unless="gnutools.dir" message="Error: gnutools.dir not set."/>\r
+        <fail unless="artifacts" message="Error: artifacts not set."/>\r
+        <exec dir="${viewpath}/${srcdir}" executable="${gnutools.dir}/make.exe" failonerror="false">\r
+            <arg line="-f ${makefile} lint.xml"/>\r
+        </exec>\r
+        <copy file="${viewpath}/${srcdir}/lint.xml" todir="${artifacts}" overwrite="true" failonerror="false" verbose="true"/>\r
+    </target>\r
+\r
+    <target name="metric" >\r
+        <echo message="Understand license is lost -- instead so manual metrics calculation update in '${viewpath}\${setcs.vobname}\doc\InWork\01_Planning\MASSSEN\02 - Planning\SW Component Release Matrix.'"/>\r
+    </target>\r
+    <!-- understand license got lost so removed to make build run ()code metrics now needs to be calculated manually) excell sheets in doc\InWork\01_Planning\MASSSEN\02 - Planning\SW Component Release Matrix\r
+    <target name="metric.prepare" depends="prep">\r
+        <fail unless="srcdir" message="Error: srcdir not set."/>\r
+        <property name="und" value="C:\Program Files\STI\bin\pc-win32\und.exe"/>\r
+        <property name="und.perl" value="C:\Program Files\STI\bin\pc-win32\maintain_uperl.exe"/>\r
+    </target>\r
+\r
+    <target name="metric" depends="metric.prepare">\r
+        <exec dir="${artifacts}" executable="${und}" failonerror="false" failifexecutionfails="true">\r
+            <arg line="-db metric.udb"/>\r
+            <arg line="-languages C++"/>\r
+            <arg line="-create"/>\r
+            <arg line="-addDir ${viewpath}/${srcdir}"/>\r
+            <arg line="-analyzeAll"/>\r
+        </exec>\r
+        <exec dir="${artifacts}" executable="${und.perl}" failonerror="false" failifexecutionfails="true">\r
+            <arg line="&quot;${buildFilesFolder}/metric.pl&quot;"/>\r
+            <arg line="-d metric.udb"/>\r
+            <arg line="-f metric.xml"/>\r
+        </exec>\r
+        <xslt in="${artifacts}/metric.xml" out="${artifacts}/metric.html" style="${artifacts}/../webapps/dashboard/metric.xslt"/>\r
+    </target>\r
+    -->\r
+\r
+    <target name="test.compareSource" depends="prep">\r
+        <exec dir="${viewpath}/${srcdir}" executable="ccperl.exe" failifexecutionfails="true" output="${artifacts}/CompareResult.xml" vmlauncher="false">\r
+            <arg line="${buildFilesFolder}/compare.pl"/>\r
+        </exec>\r
+        <!--<xslt in="${artifacts}/CompareResult.xml" out="${artifacts}/TestResult2.xml" style="${mergeWithTestResult.xslt}"/>\r
+        <move file="${artifacts}/TestResult2.xml" tofile="${artifacts}/TestResult.xml" overwrite="true"/> -->\r
+    </target>\r
+    \r
+    <target name="fit.codeChanges" depends="prep">\r
+        <exec dir="${viewpath}/${srcdir}" executable="${buildFilesFolder}/fitCompare.bat" failifexecutionfails="true" vmlauncher="false">\r
+            <arg line="${viewpath}/${srcdir}/../../.."/>\r
+            <arg line="${swint.label}"/>\r
+            <arg line="${reference.label}"/>\r
+            <arg line="${artifacts}"/>\r
+        </exec>\r
+        <xslt in="${artifacts}/fitCompare.xml" out="${artifacts}/TestResult2.xml" style="${mergeWithTestResult.xslt}"/>\r
+        <move file="${artifacts}/TestResult2.xml" tofile="${artifacts}/TestResult.xml" overwrite="true"/>\r
+    </target>    \r
+    \r
+    <target name="trn_fit.codeChanges" depends="prep">\r
+        <exec dir="${viewpath}/${srcdir}" executable="${buildFilesFolder}/fitCompare.bat" failifexecutionfails="true" vmlauncher="false">\r
+            <arg line="${viewpath}/${srcdir}"/>\r
+            <arg line="${swint.label}"/>\r
+            <arg line="${reference.label}"/>\r
+            <arg line="${artifacts}"/>\r
+        </exec>\r
+        <xslt in="${artifacts}/fitCompare.xml" out="${artifacts}/TestResult2.xml" style="${mergeWithTestResult.xslt}"/>\r
+        <move file="${artifacts}/TestResult2.xml" tofile="${artifacts}/TestResult.xml" overwrite="true"/>\r
+    </target>    \r
+\r
+    <target name="ModelConsistencyCheck" depends="prep">\r
+        <echo message="Checking model"/>\r
+        <exec dir="${artifacts}" executable="ccperl.exe" failonerror="false" failifexecutionfails="false" resultproperty="generate_result" outputproperty="log_gen_output">\r
+            <!-- Script to execute -->\r
+            <arg line="${buildFilesFolder}/CheckModel.pl"/>\r
+            <!--Rhapsody project-->\r
+            <arg line="${viewpath}/${generate.rpy}"/>\r
+            <!--Component-->\r
+            <arg line="${generate.component}"/>\r
+        </exec>\r
+        <if name="generate_result" value="0">\r
+            <echo message="${log_gen_output}"/>\r
+            <echo message="Checking ${generate.rpy}. Successfull result (Returned: ${generate_result})"/>\r
+            <else>\r
+                <if name="generate_result" value="1">\r
+                    <echo message="${log_gen_output}"/>\r
+                    <echo message="Generating ${generate.rpy}. WARNING: Warnings pressent (Returned: ${generate_result})"/>\r
+                    <else>\r
+                        <if name="generate_result" value="2">\r
+                            <echo message="${log_gen_output}"/>\r
+                            <fail status="${generate_result}" message="Checking ${generate.rpy}. ERROR: Errors pressent (Returned: ${generate_result})"/>\r
+                            <else>\r
+                                <echo message="${log_gen_output}"/>\r
+                                <fail status="${generate_result}" message="Checking ${generate.rpy}. ERROR: Catastrophic result (missing script file?)"/>\r
+                            </else>\r
+                        </if>\r
+                    </else>\r
+                </if>\r
+            </else>\r
+        </if>\r
+    </target>\r
+    <!-- The build -->\r
+\r
+    <target name="clean.rebuild" depends="clearcase.sync,prepare,clearcase.update,copy.artifacts"/>\r
+    <!-- The clean.rebuild task will clean (delete) all files, make an update via ClearCase and rebuild -->\r
+\r
+    <target name="clean.rebuild.cfg_file" depends="clearcase.sync,prepare,clearcase.update"/>\r
+\r
+    <target name="clean.rebuild.cfg_file.test" depends="prepare,clearcase.sync,clearcase.update,copy.artifacts,test"/>\r
+\r
+    <target name="clean.rebuild.cfg_file.test.nocov" depends="prepare,clearcase.sync,clearcase.update,copy.artifacts,test.nocov"/>\r
+    <!-- The clean.rebuild.test task will clean (delete) all files, make an update via ClearCase, rebuild and test -->\r
+\r
+    <target name="clean.rebuild.test" depends="clean.all,prepare,clearcase.sync,clearcase.update,copy.artifacts,test"/>\r
+\r
+    <target name="clean.rebuild.test.nocov" depends="clean.all,prepare,clearcase.sync,clearcase.update,copy.artifacts,test.nocov"/>\r
+    <!--target name="clean.rebuild.test" depends="test" /-->\r
+    <!-- The prepare task will make the needed directories for building- and artifacts files -->\r
+\r
+    <target name="prepare">\r
+        <mkdir dir="${artifacts.dir}"/>\r
+        <mkdir dir="${buildlog.dir}"/>\r
+    </target>\r
+    <!-- The clean.all task will delete all files and directories except the build.xml file (we are running this file!) -->\r
+\r
+    <target name="clean.all">\r
+        <delete dir="${srcGen.dir}"/>\r
+        <delete dir="${artifacts.dir}"/>\r
+        <delete dir="${buildlog.dir}"/>\r
+        <delete dir="${update.dir}" includeemptydirs="true"/>\r
+    </target>\r
+    <!-- The copy.artifacts task will do the copying of all files and directories generated and used during source code build -->\r
+\r
+    <target name="copy.artifacts">\r
+        <copy todir="${artifacts.dir}" flatten="true">\r
+            <fileset dir="${srcGen.dir}">\r
+                <include name="**/*.elf"/>\r
+                <include name="**/*.bin"/>\r
+                <include name="**/*.hex"/>\r
+                <include name="**/*.dxe"/>\r
+                <include name="**/*.ldr"/>\r
+                <include name="**/map.xml"/>\r
+            </fileset>\r
+        </copy>\r
+    </target>\r
+\r
+    <target name="distclean" depends="clearcase.sync"/>\r
+    <!-- This task will synchronize the snapshot view with the clearcase server (ie. deletes every non-versionized files) -->\r
+\r
+    <target name="clearcase.sync" depends="prep">\r
+    <!--\r
+    <echo message="*** Deleting all files not under version control ***" />\r
+    <exec dir="${viewpath}" executable="ccperl.exe" failonerror="false" failifexecutionfails="false" resultproperty="sync_result" outputproperty="sync_output" vmlauncher="false">\r
+      <arg value="${buildFilesFolder}/synchronize.pl" />\r
+      <arg value="-pristine=tools/cruisecontrol" />\r
+    </exec>\r
+    <echo message="** ClearCase synchronization done ***" />\r
+    <echo message="${sync_output}" />\r
+    -->\r
+    </target>\r
+    <!-- The update task will call cleartool to do an update of the model directory (main latest) -->\r
+\r
+    <target name="clearcase.update" depends="prep">\r
+        <exec dir="${viewpath}" executable="cleartool.exe" failonerror="false" failifexecutionfails="false" resultproperty="update_result" output="cleartoolupdate.txt">\r
+            <arg value="update"/>\r
+            <arg value="${viewpath}"/>\r
+        </exec>\r
+        <echo message="ClearCase update done"/>\r
+    </target>\r
+\r
+    <target name="cruisecontrol.update" depends="prep">\r
+        <exec dir="${buildFilesFolder}" executable="cleartool.exe" failonerror="false" failifexecutionfails="false" resultproperty="update_result" output="cleartoolupdate.txt">\r
+            <arg line="update ../."/>\r
+        </exec>\r
+        <echo message="Update of cruisecontrol config files done"/>\r
+    </target>\r
+\r
+    <target name="props">\r
+        <echoproperties/>\r
+    </target>\r
+    <!-- The update task will call cleartool set the config_spec and do an update -->\r
+\r
+    <target name="clearcase.setcs">\r
+        <exec executable="pwd" failonerror="false" failifexecutionfails="false" outputproperty="buildFilesFolder"/>\r
+        <exec executable="cleartool.exe" failifexecutionfails="true" outputproperty="rmview_out" vmlauncher="false">\r
+            <arg line="rmview -force -tag ${setcs.viewname}"/>\r
+        </exec>\r
+        <echo message="${rmview_out}"/>\r
+        <exec executable="cleartool.exe" failifexecutionfails="true" outputproperty="mkview_out" vmlauncher="false">\r
+            <arg line="mkview -nsh -tag ${setcs.viewname} ${setcs.globalpath}"/>\r
+            \r
+        </exec>\r
+        <echo message="${mkview_out}"/>\r
+        <exec executable="cleartool.exe" failifexecutionfails="true" outputproperty="mount_out" vmlauncher="false">\r
+            <arg line="mount \${setcs.vobname}"/>\r
+        </exec>\r
+        <if name="swint.label" exists="true">\r
+            <exec dir="${setcs.rootpath}" executable="ccperl.exe" failifexecutionfails="true" outputproperty="setcs_out" vmlauncher="false">\r
+                <arg line="${buildFilesFolder}/setConfigSpec.pl"/>\r
+                <arg line="-swint_label=&quot;${swint.label}&quot;"/>\r
+                <arg line="-config_spec=&quot;${config_spec}&quot;"/>\r
+            </exec>\r
+        <else>\r
+            <!-- <exec dir="${setcs.rootpath}" executable="ccperl.exe" failifexecutionfails="true" outputproperty="setcs_out" vmlauncher="false">\r
+                <arg line="${buildFilesFolder}/setConfigSpec.pl"/>\r
+                <arg line="-config_spec=&quot;${config_spec}&quot;"/>\r
+            </exec>-->\r
+             <loadfile property="genericconfigspec"\r
+                srcFile="${buildFilesFolder}/ConfigSpec.txt"/>\r
+            <echo message="Config spec from file: ${genericconfigspec}"/>\r
+            <exec dir="${setcs.rootpath}" executable="ccperl.exe" failifexecutionfails="true" outputproperty="setcs_out" vmlauncher="false">\r
+                <arg line="${buildFilesFolder}/setConfigSpec.pl"/>\r
+                <arg line="-config_spec=&quot;${genericconfigspec}&quot;"/>\r
+            </exec>\r
+        </else>\r
+        </if>\r
+        <echo message="${setcs_out}"/>\r
+        <property name="viewpath" value="${setcs.rootpath}"/>\r
+    </target>\r
+\r
+    <target name="bootstrap" depends="clearcase.setcs,clearcase.sync"/>\r
+\r
+    <target name="pwd">\r
+        <echo message="Cur dir"/>\r
+        <exec executable="pwd" failonerror="false" failifexecutionfails="false"/>\r
+    </target>\r
+\r
+    <target name="clean" depends="prep">\r
+        <delete dir="${artifacts}" quiet="true" includeemptydirs="true"/>\r
+        <mkdir dir="${artifacts}"/>\r
+    </target>\r
+\r
+    <target name="prep">\r
+        <exec executable="pwd" failonerror="false" failifexecutionfails="false" outputproperty="buildFilesFolder"/>\r
+        <if name="viewpath" exists="False">\r
+            <echo message="viewpath undefined, calling ${buildFilesFolder}\viewpath.pl"/>\r
+            <exec dir="${buildFilesFolder}" executable="ccperl.exe" failifexecutionfails="false" outputproperty="viewpath">\r
+                <arg line="viewpath.pl"/>\r
+            </exec>\r
+        </if>\r
+        <exec dir="${viewpath}" executable="ccperl.exe" failonerror="false" failifexecutionfails="false" outputproperty="cc_label">\r
+            <arg line="${buildFilesFolder}/getLabel.pl"/>\r
+        </exec>\r
+        <dirname property="cruisecontrol.dir" file="${buildFilesFolder}"/>\r
+        <dirname property="tools.dir" file="${cruisecontrol.dir}"/>\r
+        <property name="toolshome.dir" value="C:/Tools"/>\r
+        <property name="gnutools.dir" value="${toolshome.dir}/GnuWin32/2007-12-03/bin"/>\r
+        <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+        <property name="buildlogs" value="${artifacts}/buildlogs"/>\r
+        <property name="cantata.resultfile" value="${artifacts}/TestResult.bin"/>\r
+        <echo message="ViewPath: ${viewpath}"/>\r
+        <echo message="buildFilesFolder: ${buildFilesFolder}"/>\r
+        <echo message="Artifacts directory: ${artifacts}"/>\r
+        <echo message="GNU tools: ${gnutools.dir}"/>\r
+        <echo message="Label: ${cc_label}"/>\r
+        <echo message="Hardware Compatibiltity: ${hardwareCompatibility}"/>\r
+        <mkdir dir="${buildlogs}"/>\r
+        <mkdir dir="${artifacts}/artifacts"/>\r
+        <mkdir dir="${artifacts}/Convert"/>\r
+        <copy todir="${artifacts}/Convert" >  \r
+            <fileset dir="${buildFilesFolder}/Convert" includes="**"/>  \r
+        </copy> \r
+        <copy file="${buildFilesFolder}/convert.bat" todir="${artifacts}" overwrite="true" failonerror="false" verbose="true"/>\r
+        <exec dir="${viewpath}" executable="ccperl.exe" failonerror="false" output="${artifacts}/configspec.xml">\r
+            <arg line="${buildFilesFolder}/getCs.pl"/>\r
+        </exec>\r
+        <property name="mergeWithTestResult.xslt" value="${buildFilesFolder}/../Styles/mergeWithTestResult.xslt"/>\r
+        <echoproperties format="xml" destfile="${artifacts}/properties.xml"/>\r
+    </target>\r
+\r
+\r
+    <target name="trn_build" depends="prep">\r
+        <fail unless="srcdir" message="Error: srcdir not set."/>\r
+        <fail unless="makefile" message="Error: makefile not set."/>\r
+        <delete file="${binfile}" failonerror="false"/>\r
+        <echo message="Version: ${versionString}"/>\r
+        <if name="versionString" exists="true">\r
+            <exec dir="${viewpath}/${srcdir}" executable="${gnutools.dir}/make.exe" failonerror="false" resultproperty="make_result" outputproperty="log_make_output">\r
+                <arg line="-f ${makefile} build"/>\r
+                <arg line="BUILDLABEL=&quot;&quot;${cc_label}&quot;&quot;"/>\r
+                <arg line="BUILDVERSION=&quot;&quot;${versionString}&quot;&quot;"/>\r
+            </exec>\r
+            <else>\r
+                <exec dir="${viewpath}/${srcdir}" executable="${gnutools.dir}/make.exe" failonerror="false" resultproperty="make_result" outputproperty="log_make_output">\r
+                    <arg line="-f ${makefile} build"/>\r
+                    <arg line="BUILDLABEL=&quot;&quot;${cc_label}&quot;&quot;"/>\r
+                </exec>\r
+            </else>\r
+        </if>\r
+        <echo message="${log_make_output}"/>\r
+        <if name="make_result" value="0">\r
+            <echo message="Make completed successfully"/>\r
+            <if name="corruptBinary" value="true">\r
+                <echo message="** Corrupt binary for test - this is intentional"/>\r
+                <exec dir="${viewpath}/${srcdir}" executable="${buildFilesFolder}/../../CorruptBinForFIT/release/CorruptBinForFIT.exe" failonerror="false" resultproperty="fwmaker_result" >\r
+                    <arg line="${viewpath}/${srcdir}/trnFirmware.bin"/>\r
+                </exec>\r
+            </if>\r
+            <else>\r
+                <fail status="${make_result}" message="Make failed with error code ${make_result}"/>\r
+            </else>\r
+        </if>\r
+        <copy file="${viewpath}/${srcdir}/${binfile}" todir="${artifacts}" overwrite="true" failonerror="false" verbose="true"/>\r
+    </target>\r
+    \r
+    <target name="build" depends="prep">\r
+        <fail unless="srcdir" message="Error: srcdir not set."/>\r
+        <fail unless="makefile" message="Error: makefile not set."/>\r
+        <fail unless="elffile" message="Error: elffile not set."/>\r
+        <basename property="elffile.basename" file="${elffile}" suffix=".dxe"/>\r
+        <property name="elffile.fullpath" value="${viewpath}/${srcdir}/${elffile}"/>\r
+        <property name="ldrfile" value="${elffile.basename}_16.ldr"/>\r
+        <property name="ldrfile.fullpath" value="${viewpath}/${srcdir}/${ldrfile}"/>\r
+        <property name="hexfile" value="${elffile.basename}.hex"/>\r
+        <property name="binfile" value="${elffile.basename}.bin"/>\r
+        <delete file="${elffile.fullpath}" failonerror="false"/>\r
+        <if name="versionString" exists="true">\r
+            <echo message="Version: ${versionString}"/>\r
+            <if name="hardwareCompatibility" exists="true">\r
+                <exec dir="${viewpath}/${srcdir}" executable="${gnutools.dir}/make.exe" failonerror="false" resultproperty="make_result" outputproperty="log_make_output">\r
+                    <arg line="-f ${makefile} build"/>\r
+                    <arg line="BUILDLABEL=&quot;&quot;${cc_label}&quot;&quot;"/>\r
+                    <arg line="BUILDVERSION=&quot;&quot;${versionString}&quot;&quot;"/>\r
+                    <arg line="BUILDHWCOMPATIBILITY=${hardwareCompatibility}"/>\r
+                </exec>\r
+                <else>\r
+                    <exec dir="${viewpath}/${srcdir}" executable="${gnutools.dir}/make.exe" failonerror="false" resultproperty="make_result" outputproperty="log_make_output">\r
+                        <arg line="-f ${makefile} build"/>\r
+                        <arg line="BUILDLABEL=&quot;&quot;${cc_label}&quot;&quot;"/>\r
+                        <arg line="BUILDVERSION=&quot;&quot;${versionString}&quot;&quot;"/>\r
+                    </exec>\r
+                </else>\r
+            </if>\r
+            <else>\r
+                <if name="hardwareCompatibility" exists="true">\r
+                    <exec dir="${viewpath}/${srcdir}" executable="${gnutools.dir}/make.exe" failonerror="false" resultproperty="make_result" outputproperty="log_make_output">\r
+                        <arg line="-f ${makefile} build"/>\r
+                        <arg line="BUILDLABEL=&quot;&quot;${cc_label}&quot;&quot;"/>\r
+                        <arg line="BUILDHWCOMPATIBILITY=${hardwareCompatibility}"/>\r
+                    </exec>\r
+                    <else>\r
+                        <exec dir="${viewpath}/${srcdir}" executable="${gnutools.dir}/make.exe" failonerror="false" resultproperty="make_result" outputproperty="log_make_output">\r
+                            <arg line="-f ${makefile} build"/>\r
+                            <arg line="BUILDLABEL=&quot;&quot;${cc_label}&quot;&quot;"/>\r
+                        </exec>\r
+                    </else>\r
+                </if>\r
+            </else>\r
+        </if>\r
+        <echo message="${log_make_output}"/>\r
+        <if name="make_result" value="0">\r
+            <echo message="Make completed successfully"/>\r
+            <else>\r
+                <fail status="${make_result}" message="Make failed with error code ${make_result}"/>\r
+            </else>\r
+        </if>\r
+        <available file="${ldrfile.fullpath}" property="ldrfile.exists"/>\r
+        <if name="ldrfile.exists" exists="true">\r
+            <copy file="${ldrfile.fullpath}" tofile="${artifacts}/tmp.hex" overwrite="true" failonerror="false" verbose="true"/>\r
+            <exec dir="${artifacts}" executable="${buildFilesFolder}/hex2bin.exe" failonerror="false">\r
+                <arg line="tmp.hex"/>\r
+            </exec>\r
+            <if name="corruptBinary" value="true">\r
+                <echo message="** Corrupt binary for test - this is intentional"/>\r
+                <exec dir="${artifacts}" executable="${buildFilesFolder}/../../CorruptBinForFIT/release/CorruptBinForFIT.exe" failonerror="false" resultproperty="fwmaker_result" >\r
+                    <arg line="${artifacts}/tmp.bin"/>\r
+                </exec>\r
+            </if>\r
+            <exec dir="${artifacts}" executable="${buildFilesFolder}/fwmaker.exe" failonerror="false" resultproperty="fwmaker_result" >\r
+                <arg line="-i tmp.bin -o ${binfile}"/>\r
+            </exec>\r
+            <if name="fwmaker_result" value="0">\r
+                <echo message="fwmaker succeeded"/>\r
+                <else>\r
+                    <echo message="fwmaker failed"/>\r
+                </else>\r
+            </if>\r
+            <delete file="tmp.bin" failonerror="false"/>\r
+            <delete file="tmp.hex" failonerror="false"/>\r
+        </if>\r
+        <copy file="${elffile.fullpath}" todir="${artifacts}" overwrite="true" failonerror="false" verbose="true"/>\r
+        <copy file="${viewpath}/${srcdir}/map.xml" todir="${artifacts}" overwrite="true" failonerror="false" verbose="true"/>\r
+        <copy file="${viewpath}/${srcdir}/XRef.xml" todir="${artifacts}" overwrite="true" failonerror="false" verbose="true"/>\r
+        <copy todir="${artifacts}" flatten="true" overwrite="true" failonerror="false" verbose="true">\r
+            <fileset dir="${viewpath}/${srcdir}/">\r
+                <include name="*.ldr"/>\r
+            </fileset>\r
+        </copy>\r
+    </target>\r
+    \r
+    <target name="fit_powercycle">\r
+        <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../../massSenFirmwareUpdate/powerUnitControl/release/PowerUnitControl.exe" failonerror="false" failifexecutionfails="true"/> \r
+    </target>\r
+    \r
+    <target name="fit_trn_powercycle">\r
+        <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../../massTrnFirmwareUpdate/powerUnitControl/release/PowerUnitControl.exe" failonerror="false" failifexecutionfails="true"/> \r
+    </target>\r
+    \r
+    <target name="fit_trn_configure">\r
+        <echo message="** Configuring transmitter **"/>\r
+        <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../../massTrnFirmwareUpdate/factoryConfigure/fitConfigure/fitConfig/fitConfig.exe" failonerror="false" failifexecutionfails="true">\r
+            <arg line="11 19200"/>\r
+        </exec>    \r
+    </target>        \r
+    \r
+    <target name="fit_create_clear_eeprom_ldr">\r
+        <property name="clearEeprom" value="ClearEeprom.dxe"/>\r
+        <basename property="clearEeprom.basename" file="${clearEeprom}" suffix=".dxe"/>\r
+        <property name="clearEeprom.fullpath" value="${buildFilesFolder}/${clearEeprom}"/>\r
+        <property name="clearEeprom.ldrfile" value="${clearEeprom.basename}_16.ldr"/>\r
+        <property name="clearEeprom.ldrfile.fullpath" value="${buildFilesFolder}/${clearEeprom.ldrfile}"/>\r
+        <property name="clearEeprom.hexfile" value="${clearEeprom.basename}.hex"/>\r
+        <property name="clearEeprom.binfile" value="${clearEeprom.basename}.bin"/>\r
+        <!--<delete file="${clearEeprom.fullpath}" failonerror="false"/>-->\r
+\r
+        <exec dir="${buildFilesFolder}" executable="${VisualDspHome.dir}/elfloader.exe" failonerror="false" resultproperty="make_result" outputproperty="log_make_output">\r
+            <arg line="${clearEeprom} -b Flash -f HEX -Width 16 -o ${clearEeprom.ldrfile} -si-revision 0.5 -proc ADSP-BF533"/>\r
+        </exec>\r
+\r
+        <available file="${clearEeprom.fullpath}" property="clearEeprom.ldrfile.exists"/>\r
+        <if name="clearEeprom.ldrfile.exists" exists="true">\r
+            <property name="tmp.dir" value="${buildFilesFolder}/clearEepromTemp"/>\r
+            <mkdir dir="${tmp.dir}" />\r
+            <copy file="${clearEeprom.ldrfile.fullpath}" tofile="${tmp.dir}/tmp.hex" overwrite="true" failonerror="false" verbose="true"/>\r
+            <exec dir="${tmp.dir}" executable="${buildFilesFolder}/hex2bin.exe" failonerror="false">\r
+                <arg line="tmp.hex"/>\r
+            </exec>\r
+            <exec dir="${tmp.dir}" executable="${buildFilesFolder}/fwmaker.exe" failonerror="false">\r
+                <arg line="-i tmp.bin -o ${clearEeprom.binfile}"/>\r
+            </exec>\r
+            <exec dir="${tmp.dir}" executable="${buildFilesFolder}/srec_cat.exe" failonerror="false">\r
+                <arg line="${clearEeprom.binfile} -Binary -o ${clearEeprom.hexfile} -intel"/>\r
+            </exec>\r
+            <delete file="tmp.bin" failonerror="false"/>\r
+            <delete file="tmp.hex" failonerror="false"/>\r
+        </if>\r
+    </target>\r
+    \r
+    <target name="fit_clear_eeprom" depends="prep,fit_create_clear_eeprom_ldr">\r
+        <antcall target="fit_powercycle" inheritAll="true" inheritRefs="false"/>\r
+        <property name="tmp.dir" value="${buildFilesFolder}/clearEepromTemp"/>\r
+        <property name="clearEeprom" value="ClearEeprom.dxe"/>\r
+        <basename property="clearEeprom.basename" file="${clearEeprom}" suffix=".dxe"/>\r
+        <property name="clearEeprom.binfile" value="${clearEeprom.basename}.bin"/>\r
+        <property name="clearEeprom.binfile.fullpath" value="${tmp.dir}/${clearEeprom.binfile}"/>\r
+        <available file="${clearEeprom.binfile.fullpath}" type="file" property="clearEeprom.binfile.present"/>\r
+        <fail unless="clearEeprom.binfile.present" message="Binfile (${clearEeprom.binfile.fullpath}) not found"/>\r
+        \r
+        <fail unless="COMPortToFitSensor" message="COM Port to FIT Sensor is not set"/>\r
+\r
+        <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../../massSenFirmwareUpdate/fwupdater/delivery/fwupdater.exe" failonerror="false" failifexecutionfails="true">\r
+            <arg line="-c ${COMPortToFitSensor} -f ${clearEeprom.binfile.fullpath} "/>\r
+        </exec>    \r
+    </target>\r
+\r
+    <target name="fit_install">\r
+        <antcall target="fit_powercycle" inheritAll="true" inheritRefs="false"/>\r
+        <basename property="elffile.basename" file="${elffile}" suffix=".dxe"/>\r
+        <property name="binfile" value="${elffile.basename}.bin"/>\r
+        <property name="binfile.fullpath" value="${artifacts}/${binfile}"/>\r
+        <available file="${binfile.fullpath}" type="file" property="binfile.present"/>\r
+        <fail unless="binfile.present" message="Binfile (${binfile.fullpath}) not found"/>\r
+        \r
+        <fail unless="COMPortToFitSensor" message="COM Port to FIT Sensor is not set"/>\r
+\r
+        <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../../massSenFirmwareUpdate/fwupdater/delivery/fwupdater.exe" failonerror="false" failifexecutionfails="true">\r
+            <arg line="-c ${COMPortToFitSensor} -f ${binfile.fullpath} "/>\r
+        </exec>\r
+    </target>\r
+\r
+    <target name="trn_fit_install">\r
+        <available file="${viewpath}/${srcdir}/${binfile}" type="file" property="binfile.present"/>\r
+        <fail unless="binfile.present" message="Binfile (${binfile}) not found"/>\r
+        <echo message="${viewpath}/${srcdir}"/>\r
+        <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/flashTrn.bat" failonerror="false" failifexecutionfails="true">\r
+            <arg line="${viewpath}/${srcdir}"/>\r
+        </exec>\r
+        <antcall target="fit_trn_powercycle" inheritAll="true" inheritRefs="false"/>\r
+        <sleep milliseconds="25000"/>\r
+        <antcall target="fit_trn_configure" inheritAll="true" inheritRefs="false"/>\r
+        <sleep milliseconds="5000"/>\r
+        <antcall target="fit_trn_powercycle" inheritAll="true" inheritRefs="false"/>\r
+        <sleep milliseconds="25000"/>\r
+    </target>\r
+\r
+    <target name="generate.prepare" depends="prep">\r
+        <fail unless="generate.rpy" message="generate.rpy not set"/>\r
+        <fail unless="generate.component" message="generate.component not set"/>\r
+        <fail unless="generate.configuration" message="generate.configuration not set"/>\r
+        <if name="generate.dependencies" exists="false">\r
+            <property name="generate.dependencies"/>\r
+        </if>\r
+    </target>\r
+    <!-- The .bat file must return 0 on succes, 1 if warnigs are pressent and 2 if errors are pressent -->\r
+\r
+    <target name="generate" depends="generate.prepare">\r
+        <echo message="Generating components"/>\r
+        <exec dir="${artifacts}" executable="ccperl.exe" failonerror="false" failifexecutionfails="false" resultproperty="generate_result" outputproperty="log_gen_output">\r
+            <!-- Script to execute -->\r
+            <arg line="${buildFilesFolder}/GenerateComponents.pl"/>\r
+            <!--Rhapsody project-->\r
+            <arg line="${viewpath}\${generate.rpy}"/>\r
+            <!--Component-->\r
+            <arg line="${generate.component}"/>\r
+            <!--Configuration-->\r
+            <arg line="${generate.configuration}"/>\r
+            <!--Dependencies-->\r
+            <arg line="${generate.dependencies}"/>\r
+        </exec>\r
+        <if name="generate_result" value="0">\r
+            <echo message="${log_gen_output}"/>\r
+            <echo message="Generating ${generate.rpy}. Successfull result (Returned: ${generate_result})"/>\r
+            <else>\r
+                <if name="generate_result" value="1">\r
+                    <echo message="${log_gen_output}"/>\r
+                    <echo message="Generating ${generate.rpy}. WARNING: Warnings pressent (Returned: ${generate_result})"/>\r
+                    <else>\r
+                        <if name="generate_result" value="2">\r
+                            <echo message="${log_gen_output}"/>\r
+                            <fail status="${generate_result}" message="Generating ${generate.rpy}. ERROR: Errors pressent (Returned: ${generate_result})"/>\r
+                            <else>\r
+                                <echo message="${log_gen_output}"/>\r
+                                <fail status="${generate_result}" message="Generating ${generate.rpy}. ERROR: Catastrophic result (missing script file?)"/>\r
+                            </else>\r
+                        </if>\r
+                    </else>\r
+                </if>\r
+            </else>\r
+        </if>\r
+    </target>\r
+\r
+    <target name="documentation.generate.doc">\r
+        <delete file="${doc.output.file}"/>\r
+        <echo message="** generate documentation **"/>\r
+        <exec executable="${RhapsodyHome.dir}\reporterplus\reporter.exe" failonerror="true">\r
+            <arg line="/quiet:yes /model ${viewpath}/${generate.rpy} /template ${doc.template.file} /filetype doc /filename ${doc.output.file}"/>\r
+        </exec>\r
+        <echo message="** Set the label in the document **"/>\r
+        <exec executable="C:\UNIC\NOG_MassDigital_ToolsConfig\WordInsertLabel\WordInsertLabel\bin\Release\WordInsertLabel.exe" failonerror="true">\r
+            <arg line="${doc.output.file} $LABEL$ ${cc_label}"/>\r
+        </exec>\r
+    </target>\r
+\r
+    <target name="documentation.generate.html">\r
+        <mkdir dir="${doc.output.html.dir}"/>\r
+        <exec executable="${RhapsodyHome.dir}\reporterplus\reporter.exe" failonerror="true">\r
+            <arg line="/quiet:yes /model ${generate.rpy} /template ${doc.template.file} /filetype html /filename ${doc.output.html.dir}\index.html"/>\r
+        </exec>\r
+    </target>\r
+\r
+    <target name="test" depends="prep">\r
+        <if name="build.type" value="BUILD">\r
+            <echo message="** Build type set to BUILD, skipping test **"/>\r
+            <else>\r
+                <antcall target="-test"/>\r
+            </else>\r
+        </if>\r
+    </target>\r
+    \r
+    <target name="fit.test" depends="prep">\r
+        <if name="build.type" value="BUILD">\r
+            <echo message="** Build type set to BUILD, skipping test **"/>\r
+            <else>\r
+                <antcall target="-fit.test"/>\r
+            </else>\r
+        </if>\r
+    </target>\r
+    \r
+    <target name="trn_fit.test" depends="prep">\r
+        <if name="build.type" value="BUILD">\r
+            <echo message="** Build type set to BUILD, skipping test **"/>\r
+            <else>\r
+                <antcall target="-trn_fit.test"/>\r
+            </else>\r
+        </if>\r
+    </target>\r
+\r
+    <target name="-test" depends="download,test.execute,test.result.convertion,test.compareSource"/>\r
+\r
+    <target name="-fit.test" depends="fit.test.execute,fit.test.result.convertion,fit.codeChanges,test.documentation"/>\r
+    \r
+    <target name="-trn_fit.test" depends="fit.test.execute,fit.test.result.convertion,trn_fit.codeChanges,test.documentation"/>\r
+    \r
+    \r
+    <target name="test.nocov" depends="download,test.execute,test.result.convertion,test.copyResult,test.documentation,test.interpret.nocov"/>\r
+\r
+    <target name="download.prepare" depends="prep">\r
+        <fail unless="viewpath" message="Viewpath not set"/>\r
+        <fail unless="srcdir" message="srcdir not set"/>\r
+        <fail unless="elffile" message="elffile not set"/>\r
+        <fail unless="trace32.port" message="trace32.port not set"/>\r
+        <fail unless="trace32.host" message="trace32.host not set"/>\r
+        <fail unless="trace32.target" message="trace32.target not set"/>\r
+        <property name="elffile.fullpath" value="${viewpath}/${srcdir}/${elffile}"/>\r
+        <echo message="elffile.fullpath: ${elffile.fullpath}"/>\r
+        <available file="${elffile.fullpath}" type="file" property="elffile.present"/>\r
+        <fail unless="elffile.present" message="Elffile (${elffile.fullpath}) not found"/>\r
+    </target>\r
+\r
+    <target name="download" depends="download.prepare">\r
+        <echo message="** Downloading code to ${trace32.target} target **"/>\r
+        <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../t32prog/Release/t32prog.exe" failonerror="false" failifexecutionfails="true" resultproperty="download_result" outputproperty="download_output">\r
+            <arg line="-f${elffile.fullpath} -c -h${trace32.host} -p${trace32.port} -k${trace32.ADInstallFolder} -s${trace32.target}"/>\r
+        </exec>\r
+        <echo message="${download_output}"/>\r
+        <if name="download_result" value="0">\r
+            <echo message="** Download complete **"/>\r
+            <else>\r
+                <fail message="** Download error!!! **"/>\r
+            </else>\r
+        </if>\r
+    </target>\r
+\r
+    <target name="test.execute.prepare" depends="prep">\r
+        <fail unless="trace32.timeout" message="trace32.timeout not set"/>\r
+        <fail unless="viewpath" message="viewpath not set"/>\r
+        <fail unless="trace32.port" message="trace32.port not set"/>\r
+        <echo message="Cantata Result File: ${cantata.resultfile}"/>\r
+        <echo message="trace32.timeout: ${trace32.timeout}"/>\r
+        <echo message="trace32.port: ${trace32.port}"/>\r
+    </target>\r
+\r
+    <target name="test.execute" depends="test.execute.prepare">\r
+        <echo message="** Executing target application **"/>\r
+        <if name="test.client.exe" exists="false">\r
+            <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../t32prog/Release/t32prog.exe" failonerror="fail" resultproperty="test_result" outputproperty="test_output">\r
+                <arg line="-w${cantata.resultfile} -h${trace32.host} -t${trace32.timeout} -k${trace32.ADInstallFolder} -p${trace32.port}"/>\r
+            </exec>\r
+            <else>\r
+                <echo message="**** Starting the firmware **"/>\r
+                <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../t32prog/Release/t32prog.exe" failonerror="fail" resultproperty="test_result" outputproperty="test_output">\r
+                    <arg line="-a -w${cantata.resultfile} -h${trace32.host} -t${trace32.timeout} -k${trace32.ADInstallFolder} -p${trace32.port}"/>\r
+                </exec>\r
+                <echo message="**** Starting the test client **"/>\r
+                <exec dir="${viewpath}/${test.client.dir}" executable="${viewpath}/${test.client.dir}/${test.client.exe}" failifexecutionfails="true" failonerror="false" resultproperty="test_result" outputproperty="testClientOutput">\r
+                    <arg line="${test.client.cmdline}"/>\r
+                </exec>\r
+                <echo message="Test client output: ${testClientOutput}"/>\r
+                <echo message="**** Waiting for target to finish **"/>\r
+                <exec dir="${buildFilesFolder}" executable="${buildFilesFolder}/../t32prog/Release/t32prog.exe" failonerror="fail" resultproperty="test_result" outputproperty="test_output">\r
+                    <arg line="-b -w${cantata.resultfile} -h${trace32.host} -t${trace32.timeout} -k${trace32.ADInstallFolder} -p${trace32.port}"/>\r
+                </exec>\r
+            </else>\r
+        </if>\r
+        <echo message="${test_output}"/>\r
+        <if name="test_result" value="0">\r
+            <echo message="** Execution of target application finished **"/>\r
+            <else>\r
+                <fail message="** Test execution error!!!! **"/>\r
+            </else>\r
+        </if>\r
+    </target>\r
+\r
+    <target name="fit.test.execute">\r
+        <echo message="** Executing target application **"/>\r
+        <echo message="**** Starting the firmware **"/>\r
+        <echo message="**** Starting the test client **"/>\r
+        <exec dir="${viewpath}/${test.client.dir}" executable="${viewpath}/${test.client.dir}/${test.client.exe}" failifexecutionfails="true" failonerror="false" resultproperty="test_result" outputproperty="testClientOutput">\r
+            <arg line="${test.client.cmdline}"/>\r
+        </exec>\r
+        <echo message="Test client output: ${testClientOutput}"/>\r
+    </target>\r
+\r
+    <target name="test.result.convertion" depends="prep">\r
+        <fail unless="trace32.target" message="trace32.target not set"/>\r
+        <fail unless="test.type" message="test.type not set"/>\r
+        <echo message="** Creating environment report **"/>\r
+        <exec dir="${buildFilesFolder}" executable="ccperl.exe" failonerror="false" outputproperty="env_output">\r
+            <arg line="createEnvironmentReport.pl ${artifacts}/envReport.xml"/>\r
+        </exec>\r
+        <echo message="${env_output}"/>\r
+        <echo message="** Converting the binary test result **"/>\r
+        <exec dir="${artifacts}" executable="${artifacts}\convert.bat" failonerror="true" outputproperty="cppconvx_output">\r
+            <arg line="${cantata.resultfile}"/>\r
+        </exec>\r
+        <!--\r
+        <echo message="${cppconvx_output}"/>\r
+        <echo message="** Substituting description tags to xml tags **"/>\r
+        <exec dir="${artifacts}" executable="${buildFilesFolder}/subst_tags.bat" failonerror="true" outputproperty="cppconvx_output">\r
+            <arg line="${test.type} ${cc_label}"/>\r
+        </exec>\r
+        -->\r
+        \r
+        <!--\r
+    <echo message="** Substituting the xslt **" />\r
+    <if name="test.coverage" value="true">\r
+      <property name="reportXslt" value="http://nog0599d:8080/dashboard/TestReport.xslt" />\r
+      <else>\r
+        <property name="reportXslt" value="http://nog0599d:8080/dashboard/TestReportNoCov.xslt" />\r
+      </else>\r
+    </if>\r
+    <exec dir="${artifacts}" executable="${buildFilesFolder}/changetestlogxslt.bat" failonerror="true" outputproperty="change_output">\r
+      <arg line="${artifacts}"/>\r
+      <arg line="${reportXslt}"/>\r
+    </exec>\r
+    <echo message="${change_output}" />\r
+\r
+-->\r
+        <basename property="cantata.resultfile.basename" file="${cantata.resultfile}" suffix="bin"/>\r
+        <dirname property="cantata.resultfile.dirname" file="${cantata.resultfile}"/>\r
+        <property name="cantata.resultfile.xml" value="${cantata.resultfile.dirname}/${cantata.resultfile.basename}.xml"/>\r
+        <property name="cantata.resultfile.ctr" value="${cantata.resultfile.dirname}/${cantata.resultfile.basename}.ctr"/>\r
+        <!-- Ole\r
+        <echo message="** Inserting test tool environment, software label, and group test steps. **"/>\r
+        <exec dir="${artifacts}" executable="${buildFilesFolder}/../TRTool/TRTool/bin/Debug/trtool.exe" failonerror="false" outputproperty="label_output">\r
+            <arg line="-f${cantata.resultfile.xml} -r${cantata.resultfile.ctr} -C${artifacts}/envReport.xml -A${trace32.target} -L${cc_label} -i"/>\r
+        </exec>\r
+        \r
+        <echo message="${label_output}"/>\r
+        <xslt in="${artifacts}/configspec.xml" out="${artifacts}/TestResult2.xml" style="${mergeWithTestResult.xslt}"/>\r
+        <move file="${artifacts}/TestResult2.xml" tofile="${artifacts}/TestResult.xml" overwrite="true"/>\r
+        <xslt in="${artifacts}/TestResult.xml" out="${artifacts}/TestResult.html" style="${artifacts}/../webapps/dashboard/TestReport.xslt"/>\r
+        -->\r
+        <echo message="** Conversion finished. **"/>\r
+        <echo message="********************************************************************************"/>\r
+        <echo message="* The test report has now been generated.                                      *"/>\r
+        <echo message="* The report is saved as:                                                      *"/>\r
+        <echo message="* ${cantata.resultfile.xml}"/>\r
+        <echo message="********************************************************************************"/>\r
+    </target>\r
+    \r
+    <target name="fit.test.result.convertion" depends="prep">\r
+        <fail unless="trace32.target" message="trace32.target not set"/>\r
+        <fail unless="test.type" message="test.type not set"/>\r
+\r
+\r
+        <basename property="cantata.executable.basename" file="${test.client.exe}" suffix="exe"/>\r
+        <property name="cantata.resultfile.xml" value="${artifacts}/TestResult.xml"/>\r
+        <property name="cantata.resultfile.ctr" value="${viewpath}/${test.client.dir}/${cantata.executable.basename}.ctr"/>\r
+        <property name="cantata.resultfile.ctg" value="${viewpath}/${test.client.dir}/${cantata.executable.basename}.ctg"/>\r
+\r
+        <echo message="** Creating environment report **"/>\r
+        <exec dir="${buildFilesFolder}" executable="ccperl.exe" failonerror="false" outputproperty="env_output">\r
+            <arg line="createEnvironmentReport.pl ${artifacts}/envReport.xml"/>\r
+        </exec>\r
+        <echo message="${env_output}"/>    \r
+    \r
+        <copy file="${cantata.resultfile.ctr}" tofile="${artifacts}/TestResult.ctr" overwrite="true" />\r
+        <copy file="${cantata.resultfile.ctg}" tofile="${artifacts}/TestResult.ctg" overwrite="true" />\r
+        \r
+        <exec dir="${artifacts}" executable="${CantataHome.dir}\bin\cppconvX.bat" failonerror="true" outputproperty="cppconvx_output">\r
+            <arg line="${artifacts}/TestResult.ctr"/>\r
+        </exec>\r
+        \r
+        \r
+        <echo message="** Substituting description tags to xml tags **"/>\r
+        <exec dir="${artifacts}" executable="${buildFilesFolder}/subst_tags.bat" failonerror="false" outputproperty="cppconvx_output">\r
+            <arg line="${test.type} ${cc_label}"/>\r
+        </exec>\r
+        \r
+        <echo message="** Inserting test tool environment, software label, and group test steps. **"/>\r
+        \r
+        <exec dir="${artifacts}" executable="${buildFilesFolder}/../TRTool/TRTool/bin/Debug/trtool.exe" failonerror="false" outputproperty="label_output">\r
+            <arg line="-f${cantata.resultfile.xml} -r${artifacts}/${cantata.executable.basename}.ctr -C${artifacts}/envReport.xml -A${trace32.target} -L${cc_label} -i"/>\r
+        </exec>\r
+        <echo message="${label_output}"/>\r
+        <xslt in="${artifacts}/configspec.xml" out="${artifacts}/TestResult2.xml" style="${mergeWithTestResult.xslt}"/>\r
+        <move file="${artifacts}/TestResult2.xml" tofile="${artifacts}/TestResult.xml" overwrite="true"/>\r
+        <xslt in="${artifacts}/TestResult.xml" out="${artifacts}/TestResult.html" style="${artifacts}/../webapps/dashboard/TestReport.xslt"/>\r
+        <echo message="** Conversion finished. **"/>\r
+        <echo message="********************************************************************************"/>\r
+        <echo message="* The test report has now been generated.                                      *"/>\r
+        <echo message="* The report is saved as:                                                      *"/>\r
+        <echo message="* ${cantata.resultfile.xml}"/>\r
+        <echo message="********************************************************************************"/>\r
+    </target>\r
+    \r
+    <target name="test.documentation" depends="prep">\r
+        <if name="build.type" value="CFT">\r
+            <property name="doc.tc.spec.name" value="RD3025_SW_Class_Test_Spec_${report.item}.pdf"/>\r
+            <property name="doc.tc.report.name" value="RD3025_SW_Class_Test_Rep_${report.item}.pdf"/>\r
+            <else>\r
+                <if name="build.type" value="CMPT">\r
+                    <property name="doc.tc.spec.name" value="RD3025_SW_Comp_Test_Spec_${report.item}.pdf"/>\r
+                    <property name="doc.tc.report.name" value="RD3025_SW_Comp_Test_Rep_${report.item}.pdf"/>\r
+                    <else>\r
+                        <if name="build.type" value="SWINT">\r
+                            <property name="doc.tc.spec.name" value="RD3025_SWSW_Int_Test_Spec_${report.item}.pdf"/>\r
+                            <property name="doc.tc.report.name" value="RD3025_SWSW_Int_Test_Rep_${report.item}.pdf"/>\r
+                            <else>\r
+                                <if name="build.type" value="FIT">\r
+                                    <property name="doc.tc.spec.name" value="RD3025_SW_FIT_Test_Spec_${report.item}.pdf"/>\r
+                                    <property name="doc.tc.report.name" value="RD3025_SW_FIT_Test_Rep_${report.item}.pdf"/>\r
+                                    <else>\r
+                                        <property name="doc.tc.spec.name" value="RD3025_Spec_${report.item}.pdf"/>\r
+                                        <property name="doc.tc.report.name" value="RD3025_Rep_${report.item}.pdf"/>\r
+                                    </else>\r
+                                </if>\r
+                            </else>\r
+                        </if>\r
+                    </else>\r
+                </if>\r
+            </else>\r
+        </if>\r
+        <property name="doc.tc.spec.fo" value="${artifacts}/TestCaseSpec.fo"/>\r
+        <property name="doc.tc.report.fo" value="${artifacts}/TestCaseReport.fo"/>\r
+        <property name="fop.bat" value="${buildFilesFolder}/../fop-0.95/fop.bat"/>\r
+        <property name="fop.specification.xslt" value="${buildFilesFolder}/../Styles/TestSpecPDF.xslt"/>\r
+        <property name="fop.report.xslt" value="${buildFilesFolder}/../Styles/TestCaseReportPDF.xslt"/>\r
+        <property name="AltoveStylevisionBatch.exe" value="C:/Program Files (x86)/Altova/StyleVision2008/StyleVisionBatch.exe"/>\r
+        <available file="${AltoveStylevisionBatch.exe}" property="altova.present"/>\r
+        <if name="altova.present">\r
+            <echo message="Altova found, and will be used for fo generation using XSLT 2.0"/>\r
+            <else>\r
+                <echo message="Altova not found. Fallback to XSLT 1.0"/>\r
+            </else>\r
+        </if>\r
+        <echo message="** Generating Testcase Specification (PDF) **"/>\r
+        <echo message="**** Creating FO file from XSLT and XML"/>\r
+        <if name="altova.present">\r
+            <exec dir="${artifacts}" executable="${AltoveStylevisionBatch.exe}" failonerror="false" resultproperty="altova_error">\r
+                <arg value="-inpXSLFO=${fop.specification.xslt}2"/>\r
+                <arg value="-InpXML=TestResult.xml"/>\r
+                <arg value="-OutFO=${doc.tc.spec.fo}"/>\r
+            </exec>\r
+            <else>\r
+                <exec dir="${artifacts}" executable="${fop.bat}" failonerror="true">\r
+                    <arg value="-xml"/>\r
+                    <arg value="TestResult.xml"/>\r
+                    <arg value="-xsl"/>\r
+                    <arg value="${fop.specification.xslt}"/>\r
+                    <arg value="-foout"/>\r
+                    <arg value="${doc.tc.spec.fo}"/>\r
+                </exec>\r
+            </else>\r
+        </if>\r
+        <echo message="**** Creatating PDF from FO file"/>\r
+        <exec dir="${artifacts}" executable="${fop.bat}" failonerror="true" outputproperty="fop_specification_output">\r
+            <arg value="-noedit"/>\r
+            <arg value="-noannotations"/>\r
+            <arg value="-fo"/>\r
+            <arg value="${doc.tc.spec.fo}"/>\r
+            <arg value="-pdf"/>\r
+            <arg value="${doc.tc.spec.name}"/>\r
+        </exec>\r
+        <echo message="** Generating Testcase Report (PDF) **"/>\r
+        <echo message="**** Creatating FO file from XSLT and XML"/>\r
+        <if name="altova.present">\r
+            <exec dir="${artifacts}" executable="${AltoveStylevisionBatch.exe}" failonerror="false" resultproperty="altova_error">\r
+                <arg value="-inpXSLFO=${fop.report.xslt}2"/>\r
+                <arg value="-InpXML=TestResult.xml"/>\r
+                <arg value="-OutFO=${doc.tc.report.fo}"/>\r
+            </exec>\r
+            <else>\r
+                <exec dir="${artifacts}" executable="${fop.bat}" failonerror="true">\r
+                    <arg value="-xml"/>\r
+                    <arg value="TestResult.xml"/>\r
+                    <arg value="-xsl"/>\r
+                    <arg value="${fop.report.xslt}"/>\r
+                    <arg value="-foout"/>\r
+                    <arg value="${doc.tc.report.fo}"/>\r
+                </exec>\r
+            </else>\r
+        </if>\r
+        <echo message="**** Creatating PDF from FO file"/>\r
+        <exec dir="${artifacts}" executable="${fop.bat}" failonerror="false" outputproperty="fop_report_output">\r
+            <arg value="-noedit"/>\r
+            <arg value="-noannotations"/>\r
+            <arg value="-fo"/>\r
+            <arg value="${doc.tc.report.fo}"/>\r
+            <arg value="-pdf"/>\r
+            <arg value="${doc.tc.report.name}"/>\r
+        </exec>\r
+        <echo message="********************************************************************************"/>\r
+        <echo message="* Testcase specication created at:                                             *"/>\r
+        <echo message="* ${artifacts}/${doc.tc.spec.name}"/>\r
+        <echo message="* Test report created at:                                                      *"/>\r
+        <echo message="* ${artifacts}/${doc.tc.report.name}"/>\r
+        <echo message="********************************************************************************"/>\r
+        <if name="testspec.show" exists="True">\r
+            <exec executable="cmd" spawn="true">\r
+                <arg value="/C start ${artifacts}/${doc.tc.spec.name}"/>\r
+            </exec>\r
+        </if>\r
+    </target>\r
+\r
+    <target name="test.copyResult">\r
+        <copy todir="${buildlog.dir}">\r
+            <fileset dir="${srcGen.dir}">\r
+                <include name="TestResult.*"/>\r
+            </fileset>\r
+        </copy>\r
+    </target>\r
+\r
+    <target name="test.interpret" depends="prep">\r
+        <echo message="** Interpreting the test result **"/>\r
+<!-- KLF: original line replaced with dummy line\r
+        <exec dir="${artifacts}" executable="C:\UNIC\NOG_MassDigital_ToolsConfig\TRTool\TRTool\bin\Debug\trtool.exe" failonerror="false" resultproperty="trtool_result" outputproperty="trtool_output">\r
+-->\r
+        <exec dir="${artifacts}" executable="C:\bin\trtool.bat" failonerror="false" resultproperty="trtool_result" outputproperty="trtool_output">\r
+            <arg line="-fTestResult.xml -s -Fc"/>\r
+        </exec>\r
+        <if name="trtool_result" value="0">\r
+            <echo message="Test verdict: Success"/>\r
+            <else>\r
+                <echo message="Test verdict: Failure"/>\r
+                <fail message="Test failure: ${trtool_output}"/>\r
+            </else>\r
+        </if>\r
+    </target>\r
+\r
+    <target name="test.interpret.nocov">\r
+        <echo message="** Write sumary to error stream if any errors **"/>\r
+        <exec dir="${srcGen.dir}" executable="C:\UNIC\NOG_MassDigital_ToolsConfig\TRTool\TRTool\bin\Debug\trtool.exe" failonerror="true">\r
+            <arg line="-fTestResult.xml -s"/>\r
+            <redirector errorproperty="redirector.err">\r
+                <errormapper type="merge" to="redirector.err"/>\r
+            </redirector>\r
+        </exec>\r
+    </target>\r
+    \r
+\r
+</project>\r
diff --git a/examples/buildFUS.xml b/examples/buildFUS.xml
new file mode 100644 (file)
index 0000000..cda9cf4
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<project name="buildFUS" default="build">\r
+  <!-- Set my properties -->\r
+  <property name="buildtools.dir" value="c:\BuildTools"/>\r
+  <property name="gnutools.dir" value="c:\GNUWin32\bin\"/>\r
+  <property name="tools.rhapsody.dir" value="C:\Program Files (x86)\ibm\Rational\Rhapsody\7.6.1"/>\r
+  <property name="tools.rhapsody.exe" value="${tools.rhapsody.dir}\RhapsodyCL.exe"/>\r
+\r
+  <property name="frontend.dir" value="C:\CCHOME\z003z5pa_Feline_DEV_2_GAZ\FS4xx_FrontEnd\FS4xx_FrontEnd"/>\r
+  <property name="frontend.model" value="${frontend.dir}\model\FELINE\FELINE.rpy"/>\r
+  <property name="build.conf" value="Blackfin_cantata"/>\r
+  <property name="build.make.exe" value="${gnutools.dir}\make.exe"/>\r
+\r
+  <property name="tools.t32.dir" value="${frontend.dir}\Tools\T32Prog\Release"/>\r
+  <property name="tools.t32.exe" value="${tools.t32.dir}\T32Prog.exe"/>\r
+  <property name="tools.t32.port" value="20001"/>\r
+  <property name="tools.t32.timeout" value="120"/>\r
+  <property name="tools.t32.host" value="localhost"/>\r
+  <property name="tools.t32.outputdir" value="C:\Users\z003z5pa\Documents\1810 - FUS\90 - CMPT"/>\r
+  \r
+  <property environment="env"/>\r
+  \r
+  <taskdef name="xslt" lib="./src/tasks/libantcc_xslt.so"/>\r
+  <!--        -->\r
+  <!-- Macros -->\r
+  <!--        -->\r
+  \r
+  <macrodef name="t32-exec">\r
+    <attribute name="input"/>\r
+    <attribute name="output"/>\r
+    <sequential>\r
+      <echo message="Executing ${tools.t32.exe} @{input} @{output} ${env.VISUALDSPHOME}"/>\r
+      <exec executable="${tools.t32.exe}" output="t32.log" append="yes">\r
+            <arg value="-w@{output}"/>\r
+            <arg value="-f@{input}"/>\r
+            <arg value="-k${env.VISUALDSPHOME}"/>\r
+            <arg value="-h${tools.t32.host}"/>\r
+            <arg value="-k${env.VISUALDSPHOME}"/>\r
+            <arg value="-s BF533"/>\r
+            <arg value="-p${tools.t32.port}"/>\r
+            <arg value="-t${tools.t32.timeout}"/>\r
+      </exec>\r
+    </sequential>\r
+  </macrodef>\r
+\r
+  <macrodef name="build-unitest">\r
+    <attribute name="component"/>\r
+    <attribute name="path"/>\r
+    <attribute name="class"/>\r
+    <attribute name="basename"/>\r
+    <sequential>\r
+      <echo message="Building @{component} ${frontend.model} @{basename}"/>\r
+      <!-- Generate source-->\r
+<!--\r
+-->\r
+      <exec executable="${tools.rhapsody.exe}" output="rhapsody.log" append="yes">\r
+        <arg line="-cmd=open ${frontend.model} -cmp @{component} -cmd=setconfiguration ${build.conf} -cmd=genwithdep -cmd=exit "/>\r
+      </exec>\r
+      <!-- Build dxe-->\r
+      <exec executable="${build.make.exe}" dir="${frontend.dir}" >\r
+        <arg line="-C ${frontend.dir}\@{path} -f@{basename}.mak -j6"/> \r
+      </exec>\r
+      <t32-exec input="${frontend.dir}\@{path}\@{basename}.dxe" output="${tools.t32.outputdir}\@{basename}.bin"/>\r
+    </sequential>\r
+  </macrodef>\r
+  <!-- process component for unitest targets -->\r
+  <xslt in="unittesting.xml" out="build_unittesting.xml" style="build_unitest_project.xsl"/>\r
+\r
+  <import file="build_unittesting.xml" />\r
+  <!-- Set The targets -->\r
+  <target name="build">\r
+  </target>\r
+</project>\r
diff --git a/examples/buildTrn.xml b/examples/buildTrn.xml
new file mode 100644 (file)
index 0000000..d71d988
--- /dev/null
@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<project name="RegresstionTesting" default="regress">\r
+\r
+       <dirname property="cruisecontrol.dir" file="${basedir}"/>\r
+    <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+    <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>\r
+       \r
+       <property name="srcdir" value="SC-PS3-RD_F_MASSDIGITAL_NOG/src/trn"/>\r
+       <property name="makefile" value="IAR.mak"/>\r
+       <property name="binfile" value="trnFirmware.bin"/>\r
+               \r
+    <property name="reference.label" value="MASSDIGITAL_TRN_HART_02_00_09_38"/>\r
+               \r
+       <property name="firmware_baseline" value="MASSDIGITAL_TRN_HART_02_00_09_38"/>\r
+       <property name="include_latest_powercontroller" value="* MASSDIGITAL_MASSTRN_SW_FIT_TOOLS"/>\r
+       <property name="exclude_bin" value="/SC-PS3-RD_F_MASSDIGITAL_NOG/src/trn/trnFirmware.bin -none"/>\r
+       <property name="exclude_elf" value="/SC-PS3-RD_F_MASSDIGITAL_NOG/src/trn/trnFirmware.elf -none"/>\r
+       <property name="exclude_hex" value="/SC-PS3-RD_F_MASSDIGITAL_NOG/src/trn/trnFirmware.hex -none"/>\r
+       <property name="exclude_map" value="/SC-PS3-RD_F_MASSDIGITAL_NOG/src/trn/trnFirmware.map -none"/>\r
+       <property name="exclude_xcl" value="/SC-PS3-RD_F_MASSDIGITAL_NOG/src/trn/trnFirmware.xcl -none"/>\r
+    \r
+       <property name="configspec" value="element ${include_latest_powercontroller};element ${exclude_bin};element ${exclude_elf};element ${exclude_hex};element ${exclude_map};element ${exclude_xcl};element * ${firmware_baseline}; "/>\r
+       \r
+       <property name="faultInsertion.basedir" value="SC-PS3-RD_F_MASSDIGITAL_NOG/test/trn/FaultInsertion"/>\r
+       \r
+    <property name="testclient.port" value="11"/>\r
+       <property name="testclient.baudrate" value="19200"/>\r
+       \r
+       <property name="corruptBinary" value="false"/>\r
+       \r
+\r
+    <target name="regress">\r
+               \r
+       <antcall target="SW_FIT_83" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SW_FIT_85" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SW_FIT_86" inheritAll="true" inheritRefs="false"/>\r
+       <!--antcall target="SW_FIT_88" inheritAll="true" inheritRefs="false"/-->\r
+       <antcall target="SW_FIT_89" inheritAll="true" inheritRefs="false"/>\r
+       <!--antcall target="SW_FIT_90" inheritAll="true" inheritRefs="false"/-->\r
+       <antcall target="SW_FIT_91" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SW_FIT_92" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_113" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_114" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_115" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_117" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SW_FIT_119" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SW_FIT_120" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SW_FIT_121" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SW_FIT_122" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SW_FIT_123" inheritAll="true" inheritRefs="false"/>    \r
+    </target>\r
+\r
+\r
+       <target name="NOFAULT"> \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASS_FIT_NO_FAULT"/>\r
+                       <param name="report.item" value="NO_FAULT_TRN"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_83/SW_FIT_83"/>\r
+                       <param name="test.client.exe" value="SwFit83.exe" />    \r
+        </antcall> \r
+       </target>\r
+       \r
+       <target name="SW_FIT_113">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_113_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_113"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_113/SW_FIT_113"/>\r
+                       <param name="test.client.exe" value="SwFit113.exe" />                   \r
+        </antcall> \r
+       </target>\r
+\r
+       <target name="SW_FIT_114">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_114_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_114"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_114/SW_FIT_114"/>\r
+                       <param name="test.client.exe" value="SwFit114.exe" />                   \r
+        </antcall> \r
+       </target>\r
+\r
+       <target name="SW_FIT_115">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_115_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_115"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_115/SW_FIT_115"/>\r
+                       <param name="test.client.exe" value="SwFit115.exe" />                   \r
+        </antcall> \r
+       </target>\r
+\r
+       <target name="SW_FIT_117">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_117_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_117"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_117/SW_FIT_117"/>\r
+                       <param name="test.client.exe" value="SwFit117.exe" />                   \r
+        </antcall> \r
+       </target>\r
+       \r
+       <target name="SW_FIT_119">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_119_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_119"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_119/SW_FIT_119"/>\r
+                       <param name="test.client.exe" value="SwFit119.exe" />                   \r
+        </antcall> \r
+       </target>\r
+       \r
+       <target name="SW_FIT_120">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_120_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_120"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_120/SW_FIT_120"/>\r
+                       <param name="test.client.exe" value="SwFit120.exe" />                   \r
+        </antcall> \r
+       </target>               \r
+       \r
+       <target name="SW_FIT_121">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_121_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_121"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_121/SW_FIT_121"/>\r
+                       <param name="test.client.exe" value="SwFit121.exe" />\r
+                       <param name="corruptBinary" value="true" />                     \r
+        </antcall> \r
+       </target>       \r
+       \r
+                               \r
+       \r
+       <target name="SW_FIT_122">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_122_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_122"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_122/SW_FIT_122"/>\r
+                       <param name="test.client.exe" value="SwFit122.exe" />                   \r
+        </antcall> \r
+       </target>       \r
+       \r
+       <target name="SW_FIT_123">      \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_123_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_123"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_123/SW_FIT_123"/>\r
+                       <param name="test.client.exe" value="SwFit123.exe" />                   \r
+        </antcall> \r
+       </target>       \r
+       \r
+       <target name="SW_FIT_83">       \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_83_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_83"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_83/SW_FIT_83"/>\r
+                       <param name="test.client.exe" value="SwFit83.exe" />                    \r
+        </antcall> \r
+       </target>       \r
+               \r
+       <target name="SW_FIT_85">       \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_85_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_85"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_85/SW_FIT_85"/>\r
+                       <param name="test.client.exe" value="SwFit85.exe" />                    \r
+        </antcall> \r
+       </target>       \r
+       \r
+\r
+       <target name="SW_FIT_86">       \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_86_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_86"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_86/SW_FIT_86"/>\r
+                       <param name="test.client.exe" value="SwFit86.exe" />                    \r
+        </antcall> \r
+       </target>       \r
+\r
+\r
+       <target name="SW_FIT_88">       \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_88_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_88"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_88/SW_FIT_88"/>\r
+                       <param name="test.client.exe" value="SwFit88.exe" />                    \r
+        </antcall> \r
+       </target>               \r
+\r
+       <target name="SW_FIT_89">       \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_89_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_89"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_89/SW_FIT_89"/>\r
+                       <param name="test.client.exe" value="SwFit89.exe" />                    \r
+        </antcall> \r
+       </target>       \r
+\r
+       <target name="SW_FIT_90">       \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_90_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_90"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_90/SW_FIT_90"/>\r
+                       <param name="test.client.exe" value="SwFit90.exe" />                    \r
+        </antcall> \r
+       </target>       \r
+\r
+       <target name="SW_FIT_91">       \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_91_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_91"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_91/SW_FIT_91"/>\r
+                       <param name="test.client.exe" value="SwFit91.exe" />                    \r
+        </antcall> \r
+       </target>       \r
+\r
+       <target name="SW_FIT_92">       \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSTRN_SW_FIT_92_00_01"/>\r
+                       <param name="report.item" value="SW_FIT_92"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SW_FIT_92/SW_FIT_92"/>\r
+                       <param name="test.client.exe" value="SwFit92.exe" />                    \r
+        </antcall> \r
+       </target>       \r
+       \r
+    <target name="fit">\r
+        <echo message="processing ${report.item}"/>\r
+               \r
+               <dirname property="cruisecontrol.dir" file="${basedir}"/>\r
+               <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+        <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>\r
+               \r
+        <subant antfile="build.xml" buildpath="." target="trn_fit_rel" inheritAll="true" inheritRefs="false" verbose="true" failonerror="false">\r
+            <property name="config_spec" value="${configspec}"/>\r
+            <property name="swint.label" value="${swint.label}"/>\r
+                       <property name="trace32.target" value="ARM9"/>\r
+                       <property name="build.type" value="FIT" />\r
+                       <property name="report.item" value="${report.item}" />\r
+                       <property name="report.item" value="${report.item}" />\r
+                       <property name="test.client.dir" value="${test.client.dir}" />\r
+                       <property name="test.client.exe" value="${test.client.exe}" />\r
+                       <property name="test.client.cmdline" value="12000 ${testclient.port} ${testclient.baudrate}" />\r
+        </subant>\r
+        <delete dir="${regressArtifacts}/${report.item}"/>\r
+        <mkdir dir="${regressArtifacts}/${report.item}"/>\r
+        <copy todir="${regressArtifacts}/${report.item}" overwrite="true">\r
+            <fileset dir="${artifacts}"/>\r
+        </copy>\r
+        <delete includeemptydirs="true" quiet="true">\r
+                       <fileset dir="${artifacts}" includes="**/*"/>\r
+               </delete>\r
+    </target>\r
+\r
+</project>
\ No newline at end of file
diff --git a/examples/build_unitest_project.xsl b/examples/build_unitest_project.xsl
new file mode 100644 (file)
index 0000000..24e8b9e
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>\r
+\r
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\r
+\r
+    <xsl:output method="xml" indent="yes"/>\r
+\r
+    <xsl:template match="/">\r
+      <xsl:element name="project">\r
+        <xsl:attribute name="name">included</xsl:attribute>\r
+        <xsl:apply-templates select="components"/>\r
+      </xsl:element>\r
+<!--\r
+      Article - <xsl:value-of select="/Article/Title"/>\r
+      Auteurs : <xsl:apply-templates select="/Article/Authors/Author"/>\r
+-->\r
+    </xsl:template>\r
+\r
+    <xsl:template match="components">\r
+        <xsl:apply-templates select="component"/>\r
+    </xsl:template>\r
+\r
+    <xsl:template match="component">\r
+      <xsl:element name="target">\r
+        <xsl:attribute name="name"><xsl:choose><xsl:when test="@CFT='Yes'"><xsl:value-of select="concat('',@name)"/></xsl:when><xsl:otherwise><xsl:value-of select="concat(@name,'_CMPT')"/></xsl:otherwise></xsl:choose></xsl:attribute>\r
+        <xsl:element name="build-unitest">\r
+          <xsl:attribute name="path"><xsl:value-of select="path/@src"/></xsl:attribute>\r
+          <xsl:attribute name="class"><xsl:value-of select="class/@name"/></xsl:attribute>\r
+          <xsl:attribute name="component"><xsl:value-of select="class/@name"/></xsl:attribute>\r
+          <xsl:attribute name="basename"><xsl:call-template name="after-delim"><xsl:with-param name="pText" select="path/@src"/></xsl:call-template></xsl:attribute>\r
+        </xsl:element>\r
+      </xsl:element>     \r
+    </xsl:template>\r
+\r
+    <xsl:template match="autoh">\r
+      - <xsl:value-of select="." />\r
+    </xsl:template>\r
+\r
+\r
+    <xsl:template name="after-delim">\r
+      <xsl:param name="pText"/>\r
+      <xsl:param name="pDelim" select="'&#92;'"/>\r
+      <xsl:choose>\r
+        <xsl:when test="contains($pText,$pDelim)">\r
+          <xsl:call-template name="after-delim">\r
+            <xsl:with-param name="pText" select="substring-after($pText,$pDelim)"/>\r
+            <xsl:with-param name="pDelim" select="$pDelim"/>\r
+          </xsl:call-template>\r
+        </xsl:when>\r
+        <xsl:otherwise>\r
+          <xsl:value-of select="$pText"/>\r
+        </xsl:otherwise>\r
+      </xsl:choose>\r
+    </xsl:template>\r
+\r
+  </xsl:stylesheet>\r
diff --git a/examples/build_unittesting.xml b/examples/build_unittesting.xml
new file mode 100644 (file)
index 0000000..a67ba4c
--- /dev/null
@@ -0,0 +1,207 @@
+<?xml version="1.0"?>
+<project name="included">
+  <target name="SignalSnapshot">
+    <build-unitest path="src\Int\Measurement\SignalSnapshot\Test\SignalSnapshot_CFT" class="Components::Measurement::SignalSnapshot::Test::SignalSnapshot_CFT::SignalSnapshot_CFT" component="Components::Measurement::SignalSnapshot::Test::SignalSnapshot_CFT::SignalSnapshot_CFT" basename="SignalSnapshot_CFT"/>
+  </target>
+  <target name="UltrasonicDiagnosis_CMPT">
+    <build-unitest path="src\Int\Diagnosis\UltrasonicDiagnosis\Test\UltrasonicDiagnosis_CMPT" class="Components::Diagnosis::UltrasonicDiagnosis::Test::UltrasonicDiagnosis_CMPT::UltrasonicDiagnosis_CMPT" component="Components::Diagnosis::UltrasonicDiagnosis::Test::UltrasonicDiagnosis_CMPT::UltrasonicDiagnosis_CMPT" basename="UltrasonicDiagnosis_CMPT"/>
+  </target>
+  <target name="UltrasonicDiagnosis">
+    <build-unitest path="src\Int\Diagnosis\UltrasonicDiagnosis\Test\UltrasonicDiagnosis_CFT" class="Components::Diagnosis::UltrasonicDiagnosis::Test::UltrasonicDiagnosis_CFT::UltrasonicDiagnosis_CFT" component="Components::Diagnosis::UltrasonicDiagnosis::Test::UltrasonicDiagnosis_CFT::UltrasonicDiagnosis_CFT" basename="UltrasonicDiagnosis_CFT"/>
+  </target>
+  <target name="OperatingHours">
+    <build-unitest path="src\Int\Diagnosis\UltrasonicDiagnosis\Test\OperatingHours_CFT" class="Components::Diagnosis::UltrasonicDiagnosis::Test::OperatingHours_CFT::OperatingHours_CFT" component="Components::Diagnosis::UltrasonicDiagnosis::Test::OperatingHours_CFT::OperatingHours_CFT" basename="OperatingHours_CFT"/>
+  </target>
+  <target name="TemporalProgramFlowControl_CMPT">
+    <build-unitest path="src\Int\Platform\TemporalProgramFlowControl\Test\TemporalProgramFlowControl_CMPT" class="Components::Platform::TemporalProgramFlowControl::Test::TemporalProgramFlowControl_CMPT::TemporalProgramFlowControl_CMPT" component="Components::Platform::TemporalProgramFlowControl::Test::TemporalProgramFlowControl_CMPT::TemporalProgramFlowControl_CMPT" basename="TemporalProgramFlowControl_CMPT"/>
+  </target>
+  <target name="TemporalProgramFlowControl">
+    <build-unitest path="src\Int\Platform\TemporalProgramFlowControl\Test\TemporalProgramFlowControl_CFT" class="Components::Platform::TemporalProgramFlowControl::Test::TemporalProgramFlowControl_CFT::TemporalProgramFlowControl_CFT" component="Components::Platform::TemporalProgramFlowControl::Test::TemporalProgramFlowControl_CFT::TemporalProgramFlowControl_CFT" basename="TemporalProgramFlowControl_CFT"/>
+  </target>
+  <target name="Totalizer">
+    <build-unitest path="src\Int\Measurement\Totalizer\Test\Totalizer_CFT" class="Components::Measurement::Totalizer::Test::Totalizer_CFT::Totalizer_CFT" component="Components::Measurement::Totalizer::Test::Totalizer_CFT::Totalizer_CFT" basename="Totalizer_CFT"/>
+  </target>
+  <target name="TTAlgorithm_NCOV">
+    <build-unitest path="src\Int\Measurement\TTAlgorithm\Test\TTAlgorithm_CFT" class="Components::Measurement::TTAlgorithm::Test::TTAlgorithm_CFT::TTAlgorithm_CFT" component="Components::Measurement::TTAlgorithm::Test::TTAlgorithm_CFT::TTAlgorithm_CFT" basename="TTAlgorithm_CFT"/>
+  </target>
+  <target name="TTAlgorithm">
+    <build-unitest path="src\Int\Measurement\TTAlgorithm\Test\TTAlgorithm_CFT" class="Components::Measurement::TTAlgorithm::Test::TTAlgorithm_CFT::TTAlgorithm_CFT" component="Components::Measurement::TTAlgorithm::Test::TTAlgorithm_CFT::TTAlgorithm_CFT" basename="TTAlgorithm_CFT"/>
+  </target>
+  <target name="MeasurementControl">
+    <build-unitest path="src\Int\Measurement\MeasurementControl\Test\MeasurementControl_CFT" class="Components::Measurement::MeasurementControl::Test::MeasurementControl_CFT::MeasurementControl_CFT" component="Components::Measurement::MeasurementControl::Test::MeasurementControl_CFT::MeasurementControl_CFT" basename="MeasurementControl_CFT"/>
+  </target>
+  <target name="TTOperation">
+    <build-unitest path="src\Int\Measurement\MeasurementControl\Test\TTOperation_CFT" class="Components::Measurement::MeasurementControl::Test::TTOperation_CFT::TTOperation_CFT" component="Components::Measurement::MeasurementControl::Test::TTOperation_CFT::TTOperation_CFT" basename="TTOperation_CFT"/>
+  </target>
+  <target name="SignalSearch">
+    <build-unitest path="src\Int\Measurement\SignalSearch\Test\SignalSearch_CFT" class="Components::Measurement::SignalSearch::Test::SignalSearch_CFT::SignalSearch_CFT" component="Components::Measurement::SignalSearch::Test::SignalSearch_CFT::SignalSearch_CFT" basename="SignalSearch_CFT"/>
+  </target>
+  <target name="FrequencySweep">
+    <build-unitest path="src\Int\Measurement\FrequencySweep\Test\FrequencySweep_CFT" class="Components::Measurement::FrequencySweep::Test::FrequencySweep_CFT::FrequencySweep_CFT" component="Components::Measurement::FrequencySweep::Test::FrequencySweep_CFT::FrequencySweep_CFT" basename="FrequencySweep_CFT"/>
+  </target>
+  <target name="FPGA">
+    <build-unitest path="src\Int\HAL\Drivers\FPGA\Test\FPGA_CFT" class="Components::HAL::Drivers::FPGA::Test::FPGA_CFT::FPGA_CFT" component="Components::HAL::Drivers::FPGA::Test::FPGA_CFT::FPGA_CFT" basename="FPGA_CFT"/>
+  </target>
+  <target name="BurstSeq">
+    <build-unitest path="src\Int\Measurement\BurstSeq\test\BurstSeq_CFT" class="Components::Measurement::BurstSeq::Test::BurstSeq_CFT::BurstSeq_CFT" component="Components::Measurement::BurstSeq::Test::BurstSeq_CFT::BurstSeq_CFT" basename="BurstSeq_CFT"/>
+  </target>
+  <target name="SubSequence">
+    <build-unitest path="src\Int\Measurement\BurstSeq\test\SubSequence_CFT" class="Components::Measurement::BurstSeq::Test::SubSequence_CFT::SubSequence_CFT" component="Components::Measurement::BurstSeq::Test::SubSequence_CFT::SubSequence_CFT" basename="SubSequence_CFT"/>
+  </target>
+  <target name="AdDaInit">
+    <build-unitest path="src\Int\HAL\Drivers\AdDaInit\test\AdDaInit_CFT" class="Components::HAL::Drivers::AdDaInit::Test::AdDaInit_CFT::AdDaInit_CFT" component="Components::HAL::Drivers::AdDaInit::Test::AdDaInit_CFT::AdDaInit_CFT" basename="AdDaInit_CFT"/>
+  </target>
+  <target name="CommandHandler_CMPT">
+    <build-unitest path="src\Int\Applications\CommandHandler\test\CommandHandler_CMPT" class="Components::Applications::CommandHandler::Test::CommandHandler_CMPT::CommandHandler_CMPT" component="Components::Applications::CommandHandler::Test::CommandHandler_CMPT::CommandHandler_CMPT" basename="CommandHandler_CMPT"/>
+  </target>
+  <target name="CommandHandler">
+    <build-unitest path="src\Int\Applications\CommandHandler\test\CommandHandler_CFT" class="Components::Applications::CommandHandler::Test::CommandHandler_CFT::CommandHandler_CFT" component="Components::Applications::CommandHandler::Test::CommandHandler_CFT::CommandHandler_CFT" basename="CommandHandler_CFT"/>
+  </target>
+  <target name="CommandHandler_CO">
+    <build-unitest path="src\Int\Applications\CommandHandler\test\CommandHandler_CFT" class="Components::Applications::CommandHandler::Test::CommandHandler_CFT::CommandHandler_CFT" component="Components::Applications::CommandHandler::Test::CommandHandler_CFT::CommandHandler_CFT" basename="CommandHandler_CFT"/>
+  </target>
+  <target name="CommunicationHandler_CMPT">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\CommunicationHandler_CMPT" class="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CMPT::CommunicationHandler_CMPT" component="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CMPT::CommunicationHandler_CMPT" basename="CommunicationHandler_CMPT"/>
+  </target>
+  <target name="CommunicationHandler">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\CommunicationHandler_CFT" class="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CFT::CommunicationHandler_CFT" component="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CFT::CommunicationHandler_CFT" basename="CommunicationHandler_CFT"/>
+  </target>
+  <target name="CommunicationHandler_CO">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\CommunicationHandler_CFT" class="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CFT::CommunicationHandler_CFT" component="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CFT::CommunicationHandler_CFT" basename="CommunicationHandler_CFT"/>
+  </target>
+  <target name="AccessMultipleParameters">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\AccessMultipleParameters_CFT" class="Components::Communication::CommunicationHandler::Test::AccessMultipleParameters_CFT::AccessMultipleParameters_CFT" component="Components::Communication::CommunicationHandler::Test::AccessMultipleParameters_CFT::AccessMultipleParameters_CFT" basename="AccessMultipleParameters_CFT"/>
+  </target>
+  <target name="AccessMultipleParameters_CO">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\AccessMultipleParameters_CFT" class="Components::Communication::CommunicationHandler::Test::AccessMultipleParameters_CFT::AccessMultipleParameters_CFT" component="Components::Communication::CommunicationHandler::Test::AccessMultipleParameters_CFT::AccessMultipleParameters_CFT" basename="AccessMultipleParameters_CFT"/>
+  </target>
+  <target name="AccessControl">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\AccessControl_CFT" class="Components::Communication::CommunicationHandler::Test::AccessControl_CFT::AccessControl_CFT" component="Components::Communication::CommunicationHandler::Test::AccessControl_CFT::AccessControl_CFT" basename="AccessControl_CFT"/>
+  </target>
+  <target name="AccessControl_CO">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\AccessControl_CFT" class="Components::Communication::CommunicationHandler::Test::AccessControl_CFT::AccessControl_CFT" component="Components::Communication::CommunicationHandler::Test::AccessControl_CFT::AccessControl_CFT" basename="AccessControl_CFT"/>
+  </target>
+  <target name="CustomFunctionCode">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\CustomFunctionCode_CFT" class="Components::Communication::CommunicationHandler::Test::CustomFunctionCode_CFT::CustomFunctionCode_CFT" component="Components::Communication::CommunicationHandler::Test::CustomFunctionCode_CFT::CustomFunctionCode_CFT" basename="CustomFunctionCode_CFT"/>
+  </target>
+  <target name="CustomFunctionCode_CO">
+    <build-unitest path="src\Int\Communication\CommunicationHandler\test\CustomFunctionCode_CFT" class="Components::Communication::CommunicationHandler::Test::CustomFunctionCode_CFT::CustomFunctionCode_CFT" component="Components::Communication::CommunicationHandler::Test::CustomFunctionCode_CFT::CustomFunctionCode_CFT" basename="CustomFunctionCode_CFT"/>
+  </target>
+  <target name="FS400App_CMPT">
+    <build-unitest path="src\Int\Applications\FS400App\test\FS400App_CMPT" class="Components::Applications::FS400App::Test::FS400App_CMPT::FS400App_CMPT" component="Components::Applications::FS400App::Test::FS400App_CMPT::FS400App_CMPT" basename="FS400App_CMPT"/>
+  </target>
+  <target name="FS400App">
+    <build-unitest path="src\Int\Applications\FS400App\test\FS400App_CFT" class="Components::Applications::FS400App::Test::FS400App_CFT::FS400App_CFT" component="Components::Applications::FS400App::Test::FS400App_CFT::FS400App_CFT" basename="FS400App_CFT"/>
+  </target>
+  <target name="InterruptActivity">
+    <build-unitest path="src\Int\Applications\FS400App\test\InterruptActivity_CFT" class="Components::Applications::FS400App::Test::InterruptActivity_CFT::InterruptActivity_CFT" component="Components::Applications::FS400App::Test::InterruptActivity_CFT::InterruptActivity_CFT" basename="InterruptActivity_CFT"/>
+  </target>
+  <target name="Bf53X">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53X_CFT" class="Components::HAL::PAL::Test::Bf53X_CFT::Bf53X_CFT" component="Components::HAL::PAL::Test::Bf53X_CFT::Bf53X_CFT" basename="Bf53X_CFT"/>
+  </target>
+  <target name="Bf53XTimer">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53xTimer_CFT" class="Components::HAL::PAL::Test::Bf53XTimer_CFT::Bf53XTimer_CFT" component="Components::HAL::PAL::Test::Bf53XTimer_CFT::Bf53XTimer_CFT" basename="Bf53xTimer_CFT"/>
+  </target>
+  <target name="Bf53XDma">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53xDma_CFT" class="Components::HAL::PAL::Test::Bf53XDma_CFT::Bf53XDma_CFT" component="Components::HAL::PAL::Test::Bf53XDma_CFT::Bf53XDma_CFT" basename="Bf53xDma_CFT"/>
+  </target>
+  <target name="Bf53XEbiu">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53XEbiu_CFT" class="Components::HAL::PAL::Test::Bf53XEbiu_CFT::Bf53XEbiu_CFT" component="Components::HAL::PAL::Test::Bf53XEbiu_CFT::Bf53XEbiu_CFT" basename="Bf53XEbiu_CFT"/>
+  </target>
+  <target name="Bf53XInterrupt">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53XInterrupt_CFT" class="Components::HAL::PAL::Test::Bf53XInterrupt_CFT::Bf53XInterrupt_CFT" component="Components::HAL::PAL::Test::Bf53XInterrupt_CFT::Bf53XInterrupt_CFT" basename="Bf53XInterrupt_CFT"/>
+  </target>
+  <target name="Bf53XIo">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53xIo_CFT" class="Components::HAL::PAL::Test::Bf53XIo_CFT::Bf53XIo_CFT" component="Components::HAL::PAL::Test::Bf53XIo_CFT::Bf53XIo_CFT" basename="Bf53xIo_CFT"/>
+  </target>
+  <target name="Bf53XSport">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53xSport_CFT" class="Components::HAL::PAL::Test::Bf53XSport_CFT::Bf53XSport_CFT" component="Components::HAL::PAL::Test::Bf53XSport_CFT::Bf53XSport_CFT" basename="Bf53xSport_CFT"/>
+  </target>
+  <target name="Bf53XSPI">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53xSPI_CFT" class="Components::HAL::PAL::Test::Bf53XSPI_CFT::Bf53XSPI_CFT" component="Components::HAL::PAL::Test::Bf53XSPI_CFT::Bf53XSPI_CFT" basename="Bf53xSPI_CFT"/>
+  </target>
+  <target name="Bf53XWatchDog">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53XWatchdog_CFT" class="Components::HAL::PAL::Test::Bf53XWatchdog_CFT::Bf53XWatchdog_CFT" component="Components::HAL::PAL::Test::Bf53XWatchdog_CFT::Bf53XWatchdog_CFT" basename="Bf53XWatchdog_CFT"/>
+  </target>
+  <target name="Bf53XUart">
+    <build-unitest path="src\Int\HAL\PAL\test\Bf53XUart_CFT" class="Components::HAL::PAL::Test::Bf53XUart_CFT::Bf53XUart_CFT" component="Components::HAL::PAL::Test::Bf53XUart_CFT::Bf53XUart_CFT" basename="Bf53XUart_CFT"/>
+  </target>
+  <target name="Eeprom">
+    <build-unitest path="src\Int\HAL\Drivers\Eeprom\test\Eeprom_CFT" class="Components::HAL::Drivers::EEPROM::Test::Eeprom_CFT::Eeprom_CFT" component="Components::HAL::Drivers::EEPROM::Test::Eeprom_CFT::Eeprom_CFT" basename="Eeprom_CFT"/>
+  </target>
+  <target name="Eeprom_CO">
+    <build-unitest path="src\Int\HAL\Drivers\Eeprom\test\Eeprom_CFT" class="Components::HAL::Drivers::EEPROM::Test::Eeprom_CFT::Eeprom_CFT" component="Components::HAL::Drivers::EEPROM::Test::Eeprom_CFT::Eeprom_CFT" basename="Eeprom_CFT"/>
+  </target>
+  <target name="StdTypes">
+    <build-unitest path="src\Int\Platform\StdTypes\test\StdTypes_CFT" class="Components::Platform::StdTypes::Test::StdTypes_CFT::StdTypes_CFT" component="Components::Platform::StdTypes::Test::StdTypes_CFT::StdTypes_CFT" basename="StdTypes_CFT"/>
+  </target>
+  <target name="FatalError">
+    <build-unitest path="src\Int\Platform\FatalError\test\FatalError_CFT" class="Components::Platform::FatalError::Test::FatalError_CFT::FatalError_CFT" component="Components::Platform::FatalError::Test::FatalError_CFT::FatalError_CFT" basename="FatalError_CFT"/>
+  </target>
+  <target name="Utilities">
+    <build-unitest path="src\Int\Platform\Utilities\test\Utilities_CFT" class="Components::Platform::Utilities::Test::Utilities_CFT::Utilities_CFT" component="Components::Platform::Utilities::Test::Utilities_CFT::Utilities_CFT" basename="Utilities_CFT"/>
+  </target>
+  <target name="Rs485_CMPT">
+    <build-unitest path="src\Int\HAL\Drivers\Rs485\Test\Rs485_CMPT" class="Components::HAL::Drivers::RS485::Test::Rs485_CMPT::Rs485_CMPT" component="Components::HAL::Drivers::RS485::Test::Rs485_CMPT::Rs485_CMPT" basename="Rs485_CMPT"/>
+  </target>
+  <target name="Rs485">
+    <build-unitest path="src\Int\HAL\Drivers\Rs485\Test\Rs485_CFT" class="Components::HAL::Drivers::RS485::Test::Rs485_CFT::Rs485_CFT" component="Components::HAL::Drivers::RS485::Test::Rs485_CFT::Rs485_CFT" basename="Rs485_CFT"/>
+  </target>
+  <target name="Rs485_CO">
+    <build-unitest path="src\Int\HAL\Drivers\Rs485\Test\Rs485_CFT" class="Components::HAL::Drivers::RS485::Test::Rs485_CFT::Rs485_CFT" component="Components::HAL::Drivers::RS485::Test::Rs485_CFT::Rs485_CFT" basename="Rs485_CFT"/>
+  </target>
+  <target name="ModbusSlaveSerialLine_CMPT">
+    <build-unitest path="src\Int\Communication\ModbusSlaveSerialLine\test\ModbusSlaveSerialLine_CMPT" class="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CMPT::ModbusSlaveSerialLine_CMPT" component="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CMPT::ModbusSlaveSerialLine_CMPT" basename="ModbusSlaveSerialLine_CMPT"/>
+  </target>
+  <target name="ModbusSlaveSerialLine">
+    <build-unitest path="src\Int\Communication\ModbusSlaveSerialLine\test\ModbusSlaveSerialLine_CFT" class="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CFT::ModbusSlaveSerialLine_CFT" component="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CFT::ModbusSlaveSerialLine_CFT" basename="ModbusSlaveSerialLine_CFT"/>
+  </target>
+  <target name="ModbusSlaveSerialLine_CO">
+    <build-unitest path="src\Int\Communication\ModbusSlaveSerialLine\test\ModbusSlaveSerialLine_CFT" class="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CFT::ModbusSlaveSerialLine_CFT" component="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CFT::ModbusSlaveSerialLine_CFT" basename="ModbusSlaveSerialLine_CFT"/>
+  </target>
+  <target name="Scheduler">
+    <build-unitest path="src\Int\Applications\Scheduler\test\Scheduler_CFT" class="Components::Applications::Scheduler::Test::Scheduler_CFT::Scheduler_CFT" component="Components::Applications::Scheduler::Test::Scheduler_CFT::Scheduler_CFT" basename="Scheduler_CFT"/>
+  </target>
+  <target name="ParameterHandler_CMPT">
+    <build-unitest path="src\Int\Platform\ParameterHandler\test\ParameterHandler_CMPT" class="Components::Platform::ParameterHandler::Test::ParameterHandler_CMPT::ParameterHandler_CMPT" component="Components::Platform::ParameterHandler::Test::ParameterHandler_CMPT::ParameterHandler_CMPT" basename="ParameterHandler_CMPT"/>
+  </target>
+  <target name="ParameterHandler">
+    <build-unitest path="src\Int\Platform\ParameterHandler\test\ParameterHandler_CFT" class="Components::Platform::ParameterHandler::Test::ParameterHandler_CFT::ParameterHandler_CFT" component="Components::Platform::ParameterHandler::Test::ParameterHandler_CFT::ParameterHandler_CFT" basename="ParameterHandler_CFT"/>
+  </target>
+  <target name="ParameterHandler_CO">
+    <build-unitest path="src\Int\Platform\ParameterHandler\test\ParameterHandler_CFT" class="Components::Platform::ParameterHandler::Test::ParameterHandler_CFT::ParameterHandler_CFT" component="Components::Platform::ParameterHandler::Test::ParameterHandler_CFT::ParameterHandler_CFT" basename="ParameterHandler_CFT"/>
+  </target>
+  <target name="PersistentStorage">
+    <build-unitest path="src\Int\Platform\PersistentStorage\test\PersistentStorage_CFT" class="Components::Platform::PersistentStorage::Test::PersistentStorage_CFT::PersistentStorage_CFT" component="Components::Platform::PersistentStorage::Test::PersistentStorage_CFT::PersistentStorage_CFT" basename="PersistentStorage_CFT"/>
+  </target>
+  <target name="PersistentStorage_CO">
+    <build-unitest path="src\Int\Platform\PersistentStorage\test\PersistentStorage_CFT" class="Components::Platform::PersistentStorage::Test::PersistentStorage_CFT::PersistentStorage_CFT" component="Components::Platform::PersistentStorage::Test::PersistentStorage_CFT::PersistentStorage_CFT" basename="PersistentStorage_CFT"/>
+  </target>
+  <target name="SafeEncapsulation">
+    <build-unitest path="src\Int\Communication\SafeEncapsulation\test\SafeEncapsulation_CFT" class="Components::Communication::SafeEncapsulation::Test::SafeEncapsulation_CFT::SafeEncapsulation_CFT" component="Components::Communication::SafeEncapsulation::Test::SafeEncapsulation_CFT::SafeEncapsulation_CFT" basename="SafeEncapsulation_CFT"/>
+  </target>
+  <target name="CantataTask">
+    <build-unitest path="src\Int\Platform\CantataTask\test\CantataTask_CFT" class="Components::Platform::CantataTask::Test::CantataTask_CFT::CantataTask_CFT" component="Components::Platform::CantataTask::Test::CantataTask_CFT::CantataTask_CFT" basename="CantataTask_CFT"/>
+  </target>
+  <target name="DSPLib_CMPT">
+    <build-unitest path="src\Int\Platform\DSPLib\test\DSPLib_CMPT" class="Components::Platform::DSPLib::Test::DSPLib_CMPT::DSPLib_CMPT" component="Components::Platform::DSPLib::Test::DSPLib_CMPT::DSPLib_CMPT" basename="DSPLib_CMPT"/>
+  </target>
+  <target name="DSPLib">
+    <build-unitest path="src\Int\Platform\DSPLib\test\DSPLib_CFT" class="Components::Platform::DSPLib::Test::DSPLib_CFT::DSPLib_CFT" component="Components::Platform::DSPLib::Test::DSPLib_CFT::DSPLib_CFT" basename="DSPLib_CFT"/>
+  </target>
+  <target name="ParallelFlash">
+    <build-unitest path="src\Int\Bootloader\ParallelFlash\test\ParallelFlash_CFT" class="Components::Bootloader::ParallelFlash::Test::ParallelFlash_CFT::ParallelFlash_CFT" component="Components::Bootloader::ParallelFlash::Test::ParallelFlash_CFT::ParallelFlash_CFT" basename="ParallelFlash_CFT"/>
+  </target>
+  <target name="BootCommunication_CMPT">
+    <build-unitest path="src\Int\Bootloader\BootCommunication\test\BootCommunication_CMPT" class="Components::Bootloader::BootCommunication::Test::BootCommunication_CMPT::BootCommunication_CMPT" component="Components::Bootloader::BootCommunication::Test::BootCommunication_CMPT::BootCommunication_CMPT" basename="BootCommunication_CMPT"/>
+  </target>
+  <target name="FusBoot_CMPT">
+    <build-unitest path="src\Int\Bootloader\FusBoot\test\FusBoot_CMPT" class="Components::Bootloader::FusBoot::Test::FusBoot_CMPT::FusBoot_CMPT" component="Components::Bootloader::FusBoot::Test::FusBoot_CMPT::FusBoot_CMPT" basename="FusBoot_CMPT"/>
+  </target>
+  <target name="Bootloader_CMPT">
+    <build-unitest path="src\Int\Bootloader\Bootloader\test\Bootloader_CMPT" class="Components::Bootloader::Bootloader::Test::Bootloader_CMPT::Bootloader_CMPT" component="Components::Bootloader::Bootloader::Test::Bootloader_CMPT::Bootloader_CMPT" basename="Bootloader_CMPT"/>
+  </target>
+  <target name="FpgaLoader">
+    <build-unitest path="src\Int\Bootloader\FpgaLoader\Test" class="Components::Bootloader::FpgaLoader::Test::FPGALoader_CFT::FPGALoader_CFT" component="Components::Bootloader::FpgaLoader::Test::FPGALoader_CFT::FPGALoader_CFT" basename="Test"/>
+  </target>
+</project>
diff --git a/examples/envReport.xml b/examples/envReport.xml
new file mode 100644 (file)
index 0000000..73f02ab
--- /dev/null
@@ -0,0 +1,84 @@
+<testenvironments>\r
+  <testenvironment configuration="ARM9">\r
+    <hwsetup>\r
+      <item>\r
+        <name>Hardware configuration</name>\r
+        <version>A5E</version>\r
+      </item>\r
+    </hwsetup>\r
+    <toolsetup>\r
+      <item>\r
+        <name>Telelogic Rhapsody</name>\r
+        <version>Build 1357741 (v. 7.4.0.0)</version>\r
+      </item>\r
+      <item>\r
+        <name>Cantata++</name>\r
+        <version>5.2.1</version>\r
+      </item>\r
+      <item>\r
+        <name>Compiler</name>\r
+        <version>IAR ARM ANSI C/C++ Compiler V4.40A/W32</version>\r
+      </item>\r
+      <item>\r
+        <name>Assembler</name>\r
+        <version>IAR ARM Assembler V4.40A/W32</version>\r
+      </item>\r
+      <item>\r
+        <name>Archiver</name>\r
+        <version>IAR Universal Library Builder V1.03L</version>\r
+      </item>\r
+      <item>\r
+        <name>Linker</name>\r
+        <version>IAR Universal Linker V4.59Z/386</version>\r
+      </item>\r
+      <item>\r
+        <name>Make</name>\r
+        <version>GNU Make 3.81</version>\r
+      </item>\r
+      <item>\r
+        <name>Ant</name>\r
+        <version>Apache Ant version 1.7.0 compiled on December 13 2006</version>\r
+      </item>\r
+      <item>\r
+        <name>Trace32 Debugger</name>\r
+        <version>15499</version>\r
+      </item>\r
+    </toolsetup>\r
+    <swsetup /> \r
+  </testenvironment>\r
+  <testenvironment configuration="BF533">\r
+    <hwsetup>\r
+      <item>\r
+        <name>Hardware configuration</name>\r
+        <version>A5E</version>\r
+      </item>\r
+    </hwsetup>\r
+    <toolsetup>\r
+      <item>\r
+        <name>Telelogic Rhapsody</name>\r
+        <version>Build 1357741 (v. 7.4.0.0)</version>\r
+      </item>\r
+      <item>\r
+        <name>Cantata++</name>\r
+        <version>5.2.1</version>\r
+      </item>\r
+      <item>\r
+        <name>Compiler Suite</name>\r
+        <version>VisualDSP++ 4.5 (Updated June 2007)</version>\r
+      </item>\r
+      <item>\r
+        <name>Make</name>\r
+        <version>GNU Make 3.81</version>\r
+      </item>\r
+      <item>\r
+        <name>Ant</name>\r
+        <version>Apache Ant version 1.7.0 compiled on December 13 2006</version>\r
+      </item>\r
+      <item>\r
+        <name>Trace32 Debugger</name>\r
+        <version>15499</version>\r
+      </item>\r
+    </toolsetup>\r
+    <swsetup /> \r
+  </testenvironment>\r
+</testenvironments>\r
diff --git a/examples/regress.xml b/examples/regress.xml
new file mode 100644 (file)
index 0000000..0c428fc
--- /dev/null
@@ -0,0 +1,526 @@
+<project name="RegresstionTesting" default="regress">\r
+\r
+  <property name="outputconfigspec" value=""/>\r
+  <property name="configspec_propertyname" value="config_spec"/>\r
+  <property name="swint.label" value="MASSDIGITAL_MASSSEN_SW_SW_INT_01_11" />\r
+  <dirname property="cruisecontrol.dir" file="${basedir}"/>\r
+  <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+  <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>\r
+  <property name="config.dir" value="${cruisecontrol.dir}/configFiles"/>\r
+  <property name="fc400propertyfile" value="${config.dir}/Fc400App_Release2_remote_swswint.properties"/>\r
+  \r
+  <taskdef name="propertyReader" classname="com.siemens.ant.task.PropertyReader" classpath="${ant.home}/lib/PropertyReader.jar" />\r
+\r
+ <target name="regress_partial">           \r
+       <delete dir="${regressArtifacts}" />\r
+       \r
+                               <antcall target="AeratedLiquid1" inheritAll="true" inheritRefs="false"/>\r
+       \r
+       <delete dir="${artifacts}" />\r
+       <mkdir dir="${artifacts}" />\r
+       \r
+       <copy todir="${artifacts}" overwrite="true">\r
+               <fileset dir="${regressArtifacts}"/>\r
+       </copy>\r
+  </target>\r
+\r
+ <target name="regress">           \r
+       <delete dir="${regressArtifacts}" />\r
+       \r
+       <antcall target="Scheduler" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Communication" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Parameters" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="CalculatedPV" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="PersistParameters" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="ZeroPointAdjust" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="ExtendedDiagnosis" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="ErrorHandling" inheritAll="true" inheritRefs="false"/>\r
+    <antcall target="AeratedLiquid" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="CommandHandler" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SensorTubeDriver" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SensorMain" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Totalizer" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Standalone" inheritAll="true" inheritRefs="false"/>\r
+       \r
+       <delete dir="${artifacts}" />\r
+       <mkdir dir="${artifacts}" />\r
+       \r
+       <copy todir="${artifacts}" overwrite="true">\r
+               <fileset dir="${regressArtifacts}"/>\r
+       </copy>\r
+  </target>\r
+       \r
+       \r
+       <!-- SIMULATED PV -->\r
+               <!-- SCHEDULER 2-->\r
+                       <target name="Scheduler">\r
+                               <antcall target="Scheduler1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="Scheduler2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="Scheduler1">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Scheduler2_part1_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="Scheduler2">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Scheduler2_part2_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall> \r
+                       </target>       \r
+                       \r
+               <!-- COMMUNICATION -->\r
+               \r
+                       <target name="Communication">\r
+                               <antcall target="Comms1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="Comms2" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="Comms3" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="Comms1">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Comms_part1_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>      \r
+                       </target>\r
+                       \r
+                       <target name="Comms2">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Comms_part2_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="Comms3">\r
+                               <propertyReader/>               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Comms_part3_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" /> \r
+                               </antcall>  \r
+                       </target>\r
+                       \r
+                       \r
+               <!-- PARAMETERHANDLING -->\r
+                       <target name="Parameters">\r
+                               <antcall target="AboveMax" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="BelowMin" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="NoReadWhenWriteOnly" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="NotResetToDefault" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="NoWriteWhenReadOnly" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="OnMaxBoundary" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="OnMinBoundary" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ResetToDefault" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ValidWrite" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ValidRead" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ValidReadInt" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="VerifyDefaultValue" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="VerifyParamSizes" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="VerifyRegAddress" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+\r
+       \r
+                       <target name="AboveMax">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_AboveMax_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="BelowMin">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_BelowMin_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall> \r
+                       </target>\r
+                       \r
+                       <target name="NoReadWhenWriteOnly">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_NoReadWhenWriteOnly_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="NotResetToDefault">\r
+                               <propertyReader/>                                       \r
+                               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_NotResetToDefault_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="NoWriteWhenReadOnly">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_NoWriteWhenReadOnly_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="OnMaxBoundary">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_OnMaxBoundary_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="OnMinBoundary">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_OnMinBoundary_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ResetToDefault">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_ResetToDefault_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ValidWrite">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_ValidWrite_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ValidRead">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_ValidRead_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+\r
+                       <target name="ValidReadInt">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_ValidRead_Int_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="VerifyDefaultValue">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_VerifyDefaultValue_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="VerifyParamSizes">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_VerifyParamSizes_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="VerifyRegAddress">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_Params_VerifyRegAddress_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+               <!-- CALCULATED PV -->\r
+               <!-- MEASURED PV -->\r
+                       <target name="CalculatedPV">\r
+                               <antcall target="CalculatedPV1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="CalculatedPV2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="CalculatedPV1">\r
+                               <propertyReader/>       \r
+               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/CPV_MPV_part1_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="CalculatedPV2">\r
+                               <propertyReader/>                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/CPV_MPV_part2_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>   \r
+                       </target>\r
+                       \r
+    <!-- PERSISTING PARAMETERS -->\r
+                       <target name="PersistParameters">\r
+                               <antcall target="PersistParameters1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="PersistParameters2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="PersistParameters1">\r
+                               <propertyReader/>       \r
+               \r
+                                <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/PPersist_part1_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="PersistParameters2">\r
+                               <propertyReader/>                               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/PPersist_part2_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall> \r
+                       </target>\r
+                       \r
+       <!-- ZERO POINT ADJUSTMENT -->  \r
+                       <target name="ZeroPointAdjust">\r
+                               <propertyReader/>                               \r
+                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/ZeroPointAdjust_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>  \r
+                       </target>\r
+                       \r
+       <!-- TOTALIZER -->      \r
+                       <target name="Totalizer">\r
+                               <propertyReader/>                               \r
+                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/Totalizer_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>  \r
+                       </target>\r
+                       \r
+       <!-- STANDALONE -->     \r
+                       <target name="Standalone">\r
+                               <propertyReader/>                               \r
+                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/Standalone_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>  \r
+                       </target>\r
+                       \r
+       <!-- EXTENDED DIAGNOSIS -->\r
+                       <target name="ExtendedDiagnosis">\r
+                               <antcall target="ExtendedDiagnosisMain" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="ExtendedDiagnosisMain">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/ExtendedDiagnosis_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ExtendedDiagnosisBrokenWire">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/ExtendedDiagnosisBrokenWire_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ExtendedDiagnosisDriverDefective">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/ExtendedDiagnosisDriverDefective_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ExtendedDiagnosisDriverElectronics">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/ExtendedDiagnosisDriverElectronics_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="DCDiagnosisDisabled">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/DCDiagnosisDisabled_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>                       \r
+                       \r
+       <!-- ERROR HANDLING -->\r
+                       <target name="ErrorHandling">\r
+                               <antcall target="SmartErrors" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="SmartErrors2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="SmartErrors">\r
+                               <propertyReader/>               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SmartErrors_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="SmartErrors2">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SmartErrors2_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+               <!-- AERATED LIQUID -->\r
+                       <target name="AeratedLiquid">\r
+                               <antcall target="AeratedLiquid1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="AeratedLiquid2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="AeratedLiquid1">\r
+                               <propertyReader/>               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/AeratedLiquid_remote.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="AeratedLiquid2">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/AeratedLiquid2_remote.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>       \r
+                       \r
+               <!-- COMMAND HANDLER -->\r
+                       <target name="CommandHandler">\r
+                               <antcall target="CommandHandler1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="CommandHandler2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="CommandHandler1">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_CommandHandler_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="CommandHandler2">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SPV_CommandHandler_part2_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+       <!-- SENSOR TUBE DRIVER -->\r
+                       <target name="SensorTubeDriver">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SensorTubeDriver.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall> \r
+                       </target>\r
+                       \r
+       <!-- SEN MAIN -->\r
+                       <target name="SensorMain">\r
+                               <antcall target="SensorMain2" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="SensorMain3" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="SensorMain2">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SEN_Main_part2_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>              \r
+                       </target>\r
+                       \r
+                       <target name="SensorMain3">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SEN_Main_part3_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+\r
+       <!-- SAFETY TESTS -->\r
+                       <target name="Safety">\r
+                               <antcall target="RAMIntegrityCheck" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ParameterIntegrityCheck" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="RecalculateSCIP" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="RAMIntegrityCheck">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SafetyTest_RAMIntegrityCheck_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>              \r
+                       </target>\r
+                       \r
+                       <target name="ParameterIntegrityCheck">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/SafetyTest_ParameterIntegrityCheck_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+\r
+                       <target name="RecalculateSCIP">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/remote/RecalculateSCIP_RELEASE.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+  \r
+  \r
+  \r
+  <target name="swint">\r
+    <loadproperties srcFile="${swswpropertyfile}">\r
+      <filterchain>\r
+        <linecontains negate="true">\r
+          <contains value="config_spec"/>\r
+        </linecontains>\r
+      </filterchain>\r
+    </loadproperties>\r
+       \r
+       <echo message="processing ${report.item}" />\r
+       \r
+       <dirname property="cruisecontrol.dir" file="${basedir}"/>\r
+    <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+    <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>\r
+\r
+       \r
+       <subant antfile="build.xml" buildpath="." target="swint_rel" inheritAll="true" inheritRefs="false" verbose="true" failonerror="false">\r
+               <property name="config_spec" value="${outputconfigspec}" />\r
+               <property name="swint.label" value="${swint.label}" />\r
+       </subant>\r
+\r
+       <delete dir="${regressArtifacts}/${report.item}" />\r
+       <mkdir dir="${regressArtifacts}/${report.item}" />\r
+\r
+       <copy todir="${regressArtifacts}/${report.item}" overwrite="true">\r
+               <fileset dir="${artifacts}"/>\r
+       </copy>\r
+       \r
+       <delete dir="${artifacts}" />\r
+       <mkdir dir="${artifacts}" />\r
+       \r
+  </target>\r
+ </project>
\ No newline at end of file
diff --git a/examples/regress_FIT.xml b/examples/regress_FIT.xml
new file mode 100644 (file)
index 0000000..45d8fe7
--- /dev/null
@@ -0,0 +1,590 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+\r
+<project name="RegresstionTesting" default="regress">\r
+\r
+       <dirname property="cruisecontrol.dir" file="${basedir}"/>\r
+    <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+    <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>\r
+       <property name="config.dir" value="${cruisecontrol.dir}/configFiles"/>\r
+    <property name="outputconfigspec" value=""/>\r
+    <property name="configspec_propertyname" value="config_spec"/>\r
+       <property name="faultInsertion.basedir" value="SC-PS3-RD_F_MASSDIGITAL_NOG/test/masssen/FaultInsertion"/>\r
+       <property name="testclient.port" value="9"/>\r
+       <property name="testclient.baudrate" value="19200"/>\r
+       <property name="corruptBinary" value="false"/>\r
+\r
+       <!-- the release properties file version must correspond to the reference label-->\r
+    <property name="fc400propertyfile" value="${config.dir}/Fc400App_Release2_compact_RELEASE.properties"/>\r
+    <property name="reference.label" value="MASSDIGITAL_MASSSEN_03_03_02_01"/>\r
+    \r
+    <taskdef name="propertyReader" classname="com.siemens.ant.task.PropertyReader" classpath="${ant.home}/lib/PropertyReader.jar"/>\r
+\r
+    <target name="regress">\r
+               <delete dir="${regressArtifacts}"/>\r
+\r
+        <antcall target="SW_FIT_1" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_2" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_3" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_4" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_5" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_6" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_7" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_8" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_9" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_10" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_11" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_12" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_13" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_14" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_15" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_16" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_17" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_18" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_19" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_20" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_21" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_22" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_23" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_25" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_26" inheritAll="true" inheritRefs="false"/>\r
+               <antcall target="SW_FIT_28" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_29" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_30" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_31" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_32" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_33" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_35" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_42" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_43" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_45" inheritAll="true" inheritRefs="false"/>\r
+        <antcall target="SW_FIT_46" inheritAll="true" inheritRefs="false"/>\r
+               <antcall target="SW_FIT_47" inheritAll="true" inheritRefs="false"/>\r
+               <antcall target="SW_FIT_48" inheritAll="true" inheritRefs="false"/>\r
+               <antcall target="SW_FIT_49" inheritAll="true" inheritRefs="false"/>\r
+               <antcall target="SW_FIT_50" inheritAll="true" inheritRefs="false"/>             \r
+               \r
+        <delete includeemptydirs="true" quiet="true">\r
+                       <fileset dir="${artifacts}" includes="**/*"/>\r
+               </delete>\r
+               \r
+        <copy todir="${artifacts}" overwrite="true">\r
+            <fileset dir="${regressArtifacts}"/>\r
+        </copy>\r
+\r
+       </target>\r
+       \r
+    <target name="NO_FAULT_SEN">\r
+        <propertyReader/>      \r
+               \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASS_FIT_NO_FAULT"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcMultiplexed/SW_FIT_1/SW_FIT_1"/>\r
+                       <param name="test.client.exe" value="SwFit1.exe" />\r
+                       <param name="report.item" value="NO_FAULT_SEN"/>\r
+        </antcall> \r
+               \r
+       </target>               \r
+\r
+    <target name="SW_FIT_1">\r
+        <propertyReader/>      \r
+               \r
+        <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_01_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcMultiplexed/SW_FIT_1/SW_FIT_1"/>\r
+                       <param name="test.client.exe" value="SwFit1.exe" />\r
+                       <param name="report.item" value="SW_FIT_1"/>\r
+        </antcall> \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_2">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_02_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcMultiplexed/SW_FIT_2/SW_FIT_2"/>\r
+                       <param name="test.client.exe" value="SwFit2.exe" />\r
+                       <param name="report.item" value="SW_FIT_2"/>\r
+        </antcall> \r
+       </target>       \r
+\r
+    <target name="SW_FIT_3">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_03_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcMultiplexed/SW_FIT_3/SW_FIT_3"/>\r
+                       <param name="test.client.exe" value="SwFit3.exe" />\r
+                       <param name="report.item" value="SW_FIT_3"/>\r
+        </antcall>\r
+\r
+       </target>       \r
+\r
+    <target name="SW_FIT_4">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_04_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcStereo/SW_FIT_4/SW_FIT_4"/>\r
+                       <param name="test.client.exe" value="SwFit4.exe" />\r
+                       <param name="report.item" value="SW_FIT_4"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_5">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_05_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcStereo/SW_FIT_5/SW_FIT_5"/>\r
+                       <param name="test.client.exe" value="SwFit5.exe" />\r
+                       <param name="report.item" value="SW_FIT_5"/>\r
+        </antcall> \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_6">\r
+        <propertyReader/>      \r
+               \r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_06_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcStereo/SW_FIT_6/SW_FIT_6"/>\r
+                       <param name="test.client.exe" value="SwFit6.exe" />\r
+                       <param name="report.item" value="SW_FIT_6"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_7">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_07_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcStereo/SW_FIT_7/SW_FIT_7"/>\r
+                       <param name="test.client.exe" value="SwFit7.exe" />\r
+                       <param name="report.item" value="SW_FIT_7"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_8">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_08_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcStereo/SW_FIT_8/SW_FIT_8"/>\r
+                       <param name="test.client.exe" value="SwFit8.exe" />\r
+                       <param name="report.item" value="SW_FIT_8"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_9">\r
+        <propertyReader/>      \r
+               \r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_09_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcStereo/SW_FIT_9/SW_FIT_9"/>\r
+                       <param name="test.client.exe" value="SwFit9.exe" />\r
+                       <param name="report.item" value="SW_FIT_9"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_10">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_10_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcStereo/SW_FIT_10/SW_FIT_10"/>\r
+                       <param name="test.client.exe" value="SwFit10.exe" />\r
+                       <param name="report.item" value="SW_FIT_10"/>\r
+        </antcall> \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_11">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_11_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Potentiometer/SW_FIT_11/SW_FIT_11"/>\r
+                       <param name="test.client.exe" value="SwFit11.exe" />\r
+                       <param name="report.item" value="SW_FIT_11"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_12">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_12_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SafeEncapsulation/SW_FIT_12/SW_FIT_12"/>\r
+                       <param name="test.client.exe" value="SwFit12.exe" />\r
+                       <param name="report.item" value="SW_FIT_12"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_13">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_13_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SafeEncapsulation/SW_FIT_13/SW_FIT_13"/>\r
+                       <param name="test.client.exe" value="SwFit13.exe" />\r
+                       <param name="report.item" value="SW_FIT_13"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_14">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_14_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Scheduler/SW_FIT_14/SW_FIT_14"/>\r
+                       <param name="test.client.exe" value="SwFit14.exe" />\r
+                       <param name="report.item" value="SW_FIT_14"/>\r
+        </antcall>\r
+\r
+       </target>       \r
+\r
+    <target name="SW_FIT_15">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_15_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Scheduler/SW_FIT_15/SW_FIT_15"/>\r
+                       <param name="test.client.exe" value="SwFit15.exe" />\r
+                       <param name="report.item" value="SW_FIT_15"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_16">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_16_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Scheduler/SW_FIT_16/SW_FIT_16"/>\r
+                       <param name="test.client.exe" value="SwFit16.exe" />\r
+                       <param name="report.item" value="SW_FIT_16"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_28">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_28_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/ErrorHandler/SW_FIT_28/SW_FIT_28"/>\r
+                       <param name="test.client.exe" value="SwFit28.exe" />\r
+                       <param name="report.item" value="SW_FIT_28"/>\r
+        </antcall>     \r
+\r
+       </target>       \r
+\r
+    <target name="SW_FIT_18">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_18_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SafeParameterHandler/SW_FIT_18/SW_FIT_18"/>\r
+                       <param name="test.client.exe" value="SwFit18.exe" />\r
+                       <param name="report.item" value="SW_FIT_18"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_19">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_19_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SafeParameterHandler/SW_FIT_19/SW_FIT_19"/>\r
+                       <param name="test.client.exe" value="SwFit19.exe" />\r
+                       <param name="report.item" value="SW_FIT_19"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_20">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_20_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorTemperature/SW_FIT_20/SW_FIT_20"/>\r
+                       <param name="test.client.exe" value="SwFit20.exe" />\r
+                       <param name="report.item" value="SW_FIT_20"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_21">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_21_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorTemperature/SW_FIT_21/SW_FIT_21"/>\r
+                       <param name="test.client.exe" value="SwFit21.exe" />\r
+                       <param name="report.item" value="SW_FIT_21"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_22">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_22_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Sensor/SW_FIT_22/SW_FIT_22"/>\r
+                       <param name="test.client.exe" value="SwFit22.exe" />\r
+                       <param name="report.item" value="SW_FIT_22"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_23">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_23_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Sensor/SW_FIT_23/SW_FIT_23"/>\r
+                       <param name="test.client.exe" value="SwFit23.exe" />\r
+                       <param name="report.item" value="SW_FIT_23"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_25">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_25_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Sensor/SW_FIT_25/SW_FIT_25"/>\r
+                       <param name="test.client.exe" value="SwFit25.exe" />\r
+                       <param name="report.item" value="SW_FIT_25"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_26">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_26_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorDriver/SW_FIT_26/SW_FIT_26"/>\r
+                       <param name="test.client.exe" value="SwFit26.exe" />\r
+                       <param name="report.item" value="SW_FIT_26"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_17">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_17_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/ZeroPointAdjustment/SW_FIT_17/SW_FIT_17"/>\r
+                       <param name="test.client.exe" value="SwFit17.exe" />\r
+                       <param name="report.item" value="SW_FIT_17"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_29">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_29_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Fc400App/SW_FIT_29/SW_FIT_29"/>\r
+                       <param name="test.client.exe" value="SwFit29.exe" />\r
+                       <param name="report.item" value="SW_FIT_29"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_30">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_30_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Fc400App/SW_FIT_30/SW_FIT_30"/>\r
+                       <param name="test.client.exe" value="SwFit30.exe" />\r
+                       <param name="report.item" value="SW_FIT_30"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_32">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_32_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorFrontendHardware/SW_FIT_32/SW_FIT_32"/>\r
+                       <param name="test.client.exe" value="SwFit32.exe" />\r
+                       <param name="report.item" value="SW_FIT_32"/>\r
+        </antcall>  \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_33">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_33_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorFrontendHardware/SW_FIT_33/SW_FIT_33"/>\r
+                       <param name="test.client.exe" value="SwFit33.exe" />\r
+                       <param name="report.item" value="SW_FIT_33"/>\r
+        </antcall>                     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_42">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_42_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorFrontendHardware/SW_FIT_42/SW_FIT_42"/>\r
+                       <param name="test.client.exe" value="SwFit42.exe" />\r
+                       <param name="report.item" value="SW_FIT_42"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_43">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_43_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorFrontendHardware/SW_FIT_43/SW_FIT_43"/>\r
+                       <param name="test.client.exe" value="SwFit43.exe" />\r
+                       <param name="report.item" value="SW_FIT_43"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_47">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_47_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorFrontendHardware/SW_FIT_47/SW_FIT_47"/>\r
+                       <param name="test.client.exe" value="SwFit47.exe" />\r
+                       <param name="report.item" value="SW_FIT_47"/>\r
+        </antcall>     \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_31">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_31_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorFrontendHardware/SW_FIT_31/SW_FIT_31"/>\r
+                       <param name="test.client.exe" value="SwFit31.exe" />\r
+                       <param name="report.item" value="SW_FIT_31"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_45">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_45_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorFrontendHardware/SW_FIT_45/SW_FIT_45"/>\r
+                       <param name="test.client.exe" value="SwFit45.exe" />\r
+                       <param name="report.item" value="SW_FIT_45"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_46">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_46_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/SensorFrontendHardware/SW_FIT_46/SW_FIT_46"/>\r
+                       <param name="test.client.exe" value="SwFit46.exe" />\r
+                       <param name="report.item" value="SW_FIT_46"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_48">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_48_00_02"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/AdcStereo/SW_FIT_48/SW_FIT_48"/>\r
+                       <param name="test.client.exe" value="SwFit48.exe" />\r
+                       <param name="report.item" value="SW_FIT_48"/>\r
+        </antcall>             \r
+               \r
+       </target>       \r
+\r
+    <target name="SW_FIT_49">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_49_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Fc400App/SW_FIT_49/SW_FIT_49"/>\r
+                       <param name="test.client.exe" value="SwFit49.exe" />\r
+                       <param name="report.item" value="SW_FIT_49"/>\r
+        </antcall>\r
+               \r
+       </target>       \r
+       \r
+\r
+    <target name="SW_FIT_50">\r
+        <propertyReader/>      \r
+\r
+               <antcall target="fit" inheritAll="true" inheritRefs="false">\r
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SW_FIT_50_00_01"/>\r
+                       <param name="test.client.dir" value="${faultInsertion.basedir}/Fc400App/SW_FIT_50/SW_FIT_50"/>\r
+                       <param name="test.client.exe" value="SwFit50.exe" />\r
+                       <param name="report.item" value="SW_FIT_50"/>\r
+        </antcall>\r
+               \r
+       </target>               \r
+\r
+    <target name="fit">\r
+        <loadproperties srcFile="${fc400propertyfile}">\r
+            <filterchain>\r
+                <linecontains negate="true">\r
+                    <contains value="config_spec"/>\r
+                </linecontains>\r
+            </filterchain>\r
+        </loadproperties>\r
+        <echo message="processing ${report.item}"/>\r
+               \r
+               <dirname property="cruisecontrol.dir" file="${basedir}"/>\r
+               <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+        <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>\r
+               \r
+        <subant antfile="build.xml" buildpath="." target="fit_rel" inheritAll="true" inheritRefs="false" verbose="true" failonerror="false">\r
+            <property name="config_spec" value="${outputconfigspec}"/>\r
+            <property name="swint.label" value="${swint.label}"/>\r
+                       <property name="build.type" value="FIT" />\r
+                       <property name="trace32.target" value="BF533" />\r
+                       <property name="report.item" value="${report.item}" />\r
+                       <property name="test.client.dir" value="${test.client.dir}" />\r
+                       <property name="test.client.exe" value="${test.client.exe}" />\r
+                       <property name="test.client.cmdline" value="12000 ${testclient.port} ${testclient.baudrate}" />\r
+        </subant>\r
+        <delete dir="${regressArtifacts}/${report.item}"/>\r
+        <mkdir dir="${regressArtifacts}/${report.item}"/>\r
+        <copy todir="${regressArtifacts}/${report.item}" overwrite="true">\r
+            <fileset dir="${artifacts}"/>\r
+        </copy>\r
+        <delete includeemptydirs="true" quiet="true">\r
+                       <fileset dir="${artifacts}" includes="**/*"/>\r
+               </delete>\r
+    </target>\r
+\r
+</project>
\ No newline at end of file
diff --git a/examples/regress_SEN_FUNC_compact.xml b/examples/regress_SEN_FUNC_compact.xml
new file mode 100644 (file)
index 0000000..af95df0
--- /dev/null
@@ -0,0 +1,78 @@
+<project name="FunctionalRegresstionTesting" default="regress">
+
+  <property name="outputconfigspec" value=""/>
+  <property name="configspec_propertyname" value="config_spec"/>
+  <property name="swint.label" value="MASSDIGITAL_MASSSEN_SWSW_FUNC_00_01" />
+  <dirname property="cruisecontrol.dir" file="${basedir}"/>
+  <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>
+  <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>
+  <property name="config.dir" value="${cruisecontrol.dir}/configFiles"/>
+  <property name="functionalTest.basedir" value="SC-PS3-RD_F_MASSDIGITAL_NOG/test/masssen/FunctionalTest"/>  
+  <property name="fc400propertyfile" value="${config.dir}/Fc400App_Release2_compact_RELEASE.properties"/>
+  
+  <taskdef name="propertyReader" classname="com.siemens.ant.task.PropertyReader" classpath="${ant.home}/lib/PropertyReader.jar" />
+  
+
+ <target name="regress">           
+       <delete dir="${regressArtifacts}" />
+       
+       <antcall target="ClampSuccess" inheritAll="true" inheritRefs="false"/>
+
+       <delete dir="${artifacts}" />
+       <mkdir dir="${artifacts}" />
+       
+       <copy todir="${artifacts}" overwrite="true">
+               <fileset dir="${regressArtifacts}"/>
+       </copy>
+  </target>
+       
+       <!-- Density Clamping-->
+               <target name="ClampSuccess">
+                       <propertyReader/>
+                       <antcall target="swint" inheritAll="true" inheritRefs="false">
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SWSW_FUNC_00_01"/>
+                       <param name="test.client.dir" value="${functionalTest.basedir}/DensityClamping/ClampSuccess/ClampSuccess"/>
+                       <param name="test.client.exe" value="ClampSuccess.exe" />
+                       <param name="report.item" value="ClampSuccess"/>
+                       </antcall>
+               </target>
+                       
+       
+  <target name="swint">
+    <loadproperties srcFile="${fc400propertyfile}">
+      <filterchain>
+        <linecontains negate="true">
+          <contains value="config_spec"/>
+        </linecontains>
+      </filterchain>
+    </loadproperties>
+       
+       <echo message="processing ${report.item}" />
+       
+       <dirname property="cruisecontrol.dir" file="${basedir}"/>
+    <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>
+    <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>
+
+       
+       <subant antfile="build.xml" buildpath="." target="fit_rel" inheritAll="true" inheritRefs="false" verbose="true" failonerror="false">
+               <property name="config_spec" value="${outputconfigspec}" />
+               <property name="swint.label" value="${swint.label}" />
+               <property name="build.type" value="SWINT" />
+               <property name="trace32.target" value="BF533" />
+               <property name="report.item" value="${report.item}" />
+           <property name="test.client.dir" value="${test.client.dir}" />
+               <property name="test.client.exe" value="${test.client.exe}" />
+       </subant>
+
+       <delete dir="${regressArtifacts}/${report.item}" />
+       <mkdir dir="${regressArtifacts}/${report.item}" />
+
+       <copy todir="${regressArtifacts}/${report.item}" overwrite="true">
+               <fileset dir="${artifacts}"/>
+       </copy>
+       
+       <delete dir="${artifacts}" />
+       <mkdir dir="${artifacts}" />
+       
+  </target>
+ </project>
\ No newline at end of file
diff --git a/examples/regress_SEN_FUNC_remote.xml b/examples/regress_SEN_FUNC_remote.xml
new file mode 100644 (file)
index 0000000..4223aae
--- /dev/null
@@ -0,0 +1,78 @@
+<project name="FunctionalRegresstionTesting" default="regress">
+
+  <property name="outputconfigspec" value=""/>
+  <property name="configspec_propertyname" value="config_spec"/>
+  <property name="swint.label" value="MASSDIGITAL_MASSSEN_SWSW_FUNC_00_01" />
+  <dirname property="cruisecontrol.dir" file="${basedir}"/>
+  <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>
+  <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>
+  <property name="config.dir" value="${cruisecontrol.dir}/configFiles"/>
+  <property name="functionalTest.basedir" value="SC-PS3-RD_F_MASSDIGITAL_NOG/test/masssen/FunctionalTest"/>  
+  <property name="fc400propertyfile" value="${config.dir}/Fc400App_RELEASE.properties"/>
+  
+  <taskdef name="propertyReader" classname="com.siemens.ant.task.PropertyReader" classpath="${ant.home}/lib/PropertyReader.jar" />
+  
+
+ <target name="regress">           
+       <delete dir="${regressArtifacts}" />
+       
+       <antcall target="ClampSuccess" inheritAll="true" inheritRefs="false"/>
+
+       <delete dir="${artifacts}" />
+       <mkdir dir="${artifacts}" />
+       
+       <copy todir="${artifacts}" overwrite="true">
+               <fileset dir="${regressArtifacts}"/>
+       </copy>
+  </target>
+       
+       <!-- Density Clamping-->
+               <target name="ClampSuccess">
+                       <propertyReader/>
+                       <antcall target="swint" inheritAll="true" inheritRefs="false">
+            <param name="swint.label" value="MASSDIGITAL_MASSSEN_SWSW_FUNC_00_01"/>
+                       <param name="test.client.dir" value="${functionalTest.basedir}/DensityClamping/ClampSuccess/ClampSuccess"/>
+                       <param name="test.client.exe" value="ClampSuccess.exe" />
+                       <param name="report.item" value="ClampSuccess"/>
+                       </antcall>
+               </target>
+                       
+       
+  <target name="swint">
+    <loadproperties srcFile="${fc400propertyfile}">
+      <filterchain>
+        <linecontains negate="true">
+          <contains value="config_spec"/>
+        </linecontains>
+      </filterchain>
+    </loadproperties>
+       
+       <echo message="processing ${report.item}" />
+       
+       <dirname property="cruisecontrol.dir" file="${basedir}"/>
+    <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>
+    <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>
+
+       
+       <subant antfile="build.xml" buildpath="." target="fit_rel" inheritAll="true" inheritRefs="false" verbose="true" failonerror="false">
+               <property name="config_spec" value="${outputconfigspec}" />
+               <property name="swint.label" value="${swint.label}" />
+               <property name="build.type" value="SWINT" />
+               <property name="trace32.target" value="BF533" />
+               <property name="report.item" value="${report.item}" />
+           <property name="test.client.dir" value="${test.client.dir}" />
+               <property name="test.client.exe" value="${test.client.exe}" />
+       </subant>
+
+       <delete dir="${regressArtifacts}/${report.item}" />
+       <mkdir dir="${regressArtifacts}/${report.item}" />
+
+       <copy todir="${regressArtifacts}/${report.item}" overwrite="true">
+               <fileset dir="${artifacts}"/>
+       </copy>
+       
+       <delete dir="${artifacts}" />
+       <mkdir dir="${artifacts}" />
+       
+  </target>
+ </project>
\ No newline at end of file
diff --git a/examples/regress_compact.xml b/examples/regress_compact.xml
new file mode 100644 (file)
index 0000000..20ead40
--- /dev/null
@@ -0,0 +1,527 @@
+<project name="RegresstionTesting" default="regress">\r
+\r
+  <property name="outputconfigspec" value=""/>\r
+  <property name="configspec_propertyname" value="config_spec"/>\r
+  <property name="swint.label" value="MASSDIGITAL_MASSSEN_SW_SW_INT_01_11" />\r
+  <dirname property="cruisecontrol.dir" file="${basedir}"/>\r
+  <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+  <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>\r
+  <property name="config.dir" value="${cruisecontrol.dir}/configFiles"/>\r
+  <property name="fc400propertyfile" value="${config.dir}/Fc400App_Release2_compact_swswint.properties"/>\r
+  \r
+  <taskdef name="propertyReader" classname="com.siemens.ant.task.PropertyReader" classpath="${ant.home}/lib/PropertyReader.jar" />\r
\r
+ <target name="regress_partial">           \r
+       <delete dir="${regressArtifacts}" />\r
+       \r
+                               <antcall target="NotResetToDefault" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ResetToDefault" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="VerifyDefaultValue" inheritAll="true" inheritRefs="false"/>\r
+                               \r
+       <delete dir="${artifacts}" />\r
+       <mkdir dir="${artifacts}" />\r
+       \r
+       <copy todir="${artifacts}" overwrite="true">\r
+               <fileset dir="${regressArtifacts}"/>\r
+       </copy>\r
+  </target> \r
+\r
+ <target name="regress">           \r
+       <delete dir="${regressArtifacts}" />\r
+       \r
+       <antcall target="Scheduler" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Communication" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Parameters" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="CalculatedPV" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="PersistParameters" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="ZeroPointAdjust" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="ExtendedDiagnosis" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="ErrorHandling" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="AeratedLiquid" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="CommandHandler" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SensorTubeDriver" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="SensorMain" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Safety" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Totalizer" inheritAll="true" inheritRefs="false"/>\r
+       <antcall target="Standalone" inheritAll="true" inheritRefs="false"/>\r
+       \r
+       <delete dir="${artifacts}" />\r
+       <mkdir dir="${artifacts}" />\r
+       \r
+       <copy todir="${artifacts}" overwrite="true">\r
+               <fileset dir="${regressArtifacts}"/>\r
+       </copy>\r
+  </target>\r
+       \r
+       \r
+       <!-- SIMULATED PV -->\r
+               <!-- SCHEDULER 2-->\r
+                       <target name="Scheduler">\r
+                               <antcall target="Scheduler1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="Scheduler2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="Scheduler1">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Scheduler2_part1_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="Scheduler2">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Scheduler2_part2_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>      \r
+                       </target>       \r
+                       \r
+               <!-- COMMUNICATION -->\r
+               \r
+                       <target name="Communication">\r
+                               <antcall target="Comms1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="Comms2" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="Comms3" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="Comms1">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Comms_part1_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>      \r
+                       </target>\r
+                       \r
+                       <target name="Comms2">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Comms_part2_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="Comms3">\r
+                               <propertyReader/>               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Comms_part3_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" /> \r
+                               </antcall>  \r
+                       </target>\r
+                       \r
+               <!-- PARAMETERHANDLING -->\r
+                       <target name="Parameters">\r
+                               <antcall target="AboveMax" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="BelowMin" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="NoReadWhenWriteOnly" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="NotResetToDefault" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="NoWriteWhenReadOnly" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="OnMaxBoundary" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="OnMinBoundary" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ResetToDefault" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ValidWrite" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ValidRead" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ValidReadInt" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="VerifyDefaultValue" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="VerifyParamSizes" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="VerifyRegAddress" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+\r
+       \r
+                       <target name="AboveMax">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_AboveMax_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="BelowMin">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_BelowMin_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall> \r
+                       </target>\r
+                       \r
+                       <target name="NoReadWhenWriteOnly">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_NoReadWhenWriteOnly_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="NotResetToDefault">\r
+                               <propertyReader/>                                       \r
+                               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_NotResetToDefault_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="NoWriteWhenReadOnly">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_NoWriteWhenReadOnly_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="OnMaxBoundary">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_OnMaxBoundary_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="OnMinBoundary">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_OnMinBoundary_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ResetToDefault">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_ResetToDefault_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ValidWrite">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_ValidWrite_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ValidRead">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_ValidRead_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ValidReadInt">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_ValidRead_Int_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="VerifyDefaultValue">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_VerifyDefaultValue_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="VerifyParamSizes">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_VerifyParamSizes_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="VerifyRegAddress">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_Params_VerifyRegAddress_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+               <!-- CALCULATED PV -->\r
+               <!-- MEASURED PV -->\r
+                       <target name="CalculatedPV">\r
+                               <antcall target="CalculatedPV1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="CalculatedPV2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="CalculatedPV1">\r
+                               <propertyReader/>       \r
+               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/CPV_MPV_part1_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="CalculatedPV2">\r
+                               <propertyReader/>                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/CPV_MPV_part2_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>   \r
+                       </target>\r
+                       \r
+    <!-- PERSISTING PARAMETERS -->\r
+                       <target name="PersistParameters">\r
+                               <antcall target="PersistParameters1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="PersistParameters2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="PersistParameters1">\r
+                               <propertyReader/>       \r
+               \r
+                                <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/PPersist_part1_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="PersistParameters2">\r
+                               <propertyReader/>                               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/PPersist_part2_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall> \r
+                       </target>\r
+                       \r
+       <!-- ZERO POINT ADJUSTMENT -->  \r
+                       <target name="ZeroPointAdjust">\r
+                               <propertyReader/>                               \r
+                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/ZeroPointAdjust_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>  \r
+                       </target>\r
+\r
+       <!-- TOTALIZER -->      \r
+                       <target name="Totalizer">\r
+                               <propertyReader/>                               \r
+                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/Totalizer_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>  \r
+                       </target>\r
+                       \r
+       <!-- STANDALONE -->     \r
+                       <target name="Standalone">\r
+                               <propertyReader/>                               \r
+                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/Standalone_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>  \r
+                       </target>\r
+                                               \r
+       <!-- EXTENDED DIAGNOSIS -->\r
+                       <target name="ExtendedDiagnosis">\r
+                               <antcall target="ExtendedDiagnosisMain" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="DCDiagnosisDisabled" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="ExtendedDiagnosisMain">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/ExtendedDiagnosis_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ExtendedDiagnosisBrokenWire">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/ExtendedDiagnosisBrokenWire_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ExtendedDiagnosisDriverDefective">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/ExtendedDiagnosisDriverDefective_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="ExtendedDiagnosisDriverElectronics">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/ExtendedDiagnosisDriverElectronics_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="DCDiagnosisDisabled">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/DCDiagnosisDisabled_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>                               \r
+                       \r
+       <!-- ERROR HANDLING -->\r
+                       <target name="ErrorHandling">\r
+                               <antcall target="SmartErrors" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="SmartErrors2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="SmartErrors">\r
+                               <propertyReader/>               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SmartErrors_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="SmartErrors2">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SmartErrors2_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+\r
+       <!-- AERATED LIQUID -->\r
+                       <target name="AeratedLiquid">\r
+                               <antcall target="AeratedLiquid1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="AeratedLiquid2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="AeratedLiquid1">\r
+                               <propertyReader/>               \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/AeratedLiquid_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="AeratedLiquid2">\r
+                               <propertyReader/>                                       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/AeratedLiquid2_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+               <!-- COMMAND HANDLER -->\r
+                       <target name="CommandHandler">\r
+                               <antcall target="CommandHandler1" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="CommandHandler2" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="CommandHandler1">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_CommandHandler_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+                       <target name="CommandHandler2">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SPV_CommandHandler_part2_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                       \r
+       <!-- SENSOR TUBE DRIVER -->\r
+                       <target name="SensorTubeDriver">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SensorTubeDriver_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall> \r
+                       </target>\r
+                       \r
+       <!-- SEN MAIN -->\r
+                       <target name="SensorMain">\r
+                               <antcall target="SensorMain2" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="SensorMain3" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="SensorMain2">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SEN_Main_part2_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>              \r
+                       </target>\r
+                       \r
+                       <target name="SensorMain3">\r
+                               <propertyReader/>\r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SEN_Main_part3_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+\r
+       <!-- SAFETY TESTS -->\r
+                       <target name="Safety">\r
+                               <antcall target="RAMIntegrityCheck" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="ParameterIntegrityCheck" inheritAll="true" inheritRefs="false"/>\r
+                               <antcall target="RecalculateSCIP" inheritAll="true" inheritRefs="false"/>\r
+                       </target>\r
+                       \r
+                       <target name="RAMIntegrityCheck">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SafetyTest_RAMIntegrityCheck_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>              \r
+                       </target>\r
+                       \r
+                       <target name="ParameterIntegrityCheck">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/SafetyTest_ParameterIntegrityCheck_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+\r
+                       <target name="RecalculateSCIP">\r
+                               <propertyReader/>       \r
+                               <antcall target="swint" inheritAll="true" inheritRefs="false">\r
+                                       <param name="swswpropertyfile" value="${config.dir}/sw-intgration/compact/RecalculateSCIP_compact.properties" />\r
+                                       <param name="swint.label" value="${swint.label}" />\r
+                               </antcall>\r
+                       </target>\r
+                         \r
+  <target name="swint">\r
+    <loadproperties srcFile="${swswpropertyfile}">\r
+      <filterchain>\r
+        <linecontains negate="true">\r
+          <contains value="config_spec"/>\r
+        </linecontains>\r
+      </filterchain>\r
+    </loadproperties>\r
+       \r
+       <echo message="processing ${report.item}" />\r
+       \r
+       <dirname property="cruisecontrol.dir" file="${basedir}"/>\r
+    <property name="artifacts" value="${cruisecontrol.dir}/artifacts"/>\r
+    <property name="regressArtifacts" value="${cruisecontrol.dir}/regressArtifacts"/>\r
+\r
+       \r
+       <subant antfile="build.xml" buildpath="." target="swint_rel" inheritAll="true" inheritRefs="false" verbose="true" failonerror="false">\r
+               <property name="config_spec" value="${outputconfigspec}" />\r
+               <property name="swint.label" value="${swint.label}" />\r
+       </subant>\r
+\r
+       <delete dir="${regressArtifacts}/${report.item}" />\r
+       <mkdir dir="${regressArtifacts}/${report.item}" />\r
+\r
+       <copy todir="${regressArtifacts}/${report.item}" overwrite="true">\r
+               <fileset dir="${artifacts}"/>\r
+       </copy>\r
+       \r
+       <delete dir="${artifacts}" />\r
+       <mkdir dir="${artifacts}" />\r
+       \r
+  </target>\r
+ </project>
\ No newline at end of file
diff --git a/examples/test.properties b/examples/test.properties
new file mode 100644 (file)
index 0000000..cd3dc10
--- /dev/null
@@ -0,0 +1,8 @@
+buildFilesFolder=/tmp/build
+viewpath=/tmp/view/test
+updatedir=/tmp/update
+modeldir=/tmp/model
+
+generate.rpy=test
+generate.component=Derived
+generate.configuration=rpiConfig
diff --git a/examples/unittesting.xml b/examples/unittesting.xml
new file mode 100644 (file)
index 0000000..f2027cd
--- /dev/null
@@ -0,0 +1,404 @@
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!--\r
+; File ../../tools/Jenkins/jobs/Unittests/unittest.txt\r
+; Copyright (c) 2014\r
+; Siemens AG, I IA SC. All rights reserved\r
+; Author: Kjeld Lorenzen Fruelund\r
+;\r
+; describes: \r
+;    format:  CFT          <XX2>         Components::<XX1>::<XX2>::Test::<XX2>_CFT::<XX2>_CFT    src\Int\<XX1>\<XX2>\test\<XX2>_CFT\r
+;    format:  CMPT         <XX2>         Components::<XX1>::<XX2>::Test::<XX2>_CFT::<XX2>_CMPT   src\Int\<XX1>\<XX2>\test\<XX2>_CMPT\r
+;    format:  SWSW         <XX2>         SW_SW_Integration::SW_Integral_<X>::<XX1>::<XX1>_SWSW   src\Test\SW_Integral_<XX1>\<XX2>\<XX2>_SWSW\r
+;\r
+;; Product - firmware binary that will be added version together with the build_number of Jenkins job execution as static parameters\r
+;; Class  - Name of class for this test binary to execute\r
+;; CFT    - do class function test on this class {Yes,No}\r
+;; CMPT   - do component test on this class {Yes,No}\r
+;; Config - Rhapsody configuration to use for code generation {Blackfin_cantata, Blackfin_cantata_co} \r
+;; Cov    - do Coverage test on this class {Yes, No} Yes will only check that check has passed. \r
+;; Cmpx   - do source code complexity analyze on this class\r
+;; T32r   - do restart Trace 32 tool\r
+;; Class Rhapsody location - location in Rhapsody where this test structure is found.\r
+;; Class filesystem location - location in view relatively from view root dir to this test file structure is found.;;\r
+-->\r
+<components>\r
+<product name="FS400App" version="1.00.00-10" hwcompatibility="1">\r
+   <class name="Components::Applications::FS400App::FS400App"/>\r
+   <path src="src\Int\Applications\FS400App"/>  \r
+</product>   \r
+\r
+<component name="SignalSnapshot" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::SignalSnapshot::Test::SignalSnapshot_CFT::SignalSnapshot_CFT"/>\r
+  <path src="src\Int\Measurement\SignalSnapshot\Test\SignalSnapshot_CFT"/>\r
+</component>\r
+<component name="UltrasonicDiagnosis" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Diagnosis::UltrasonicDiagnosis::Test::UltrasonicDiagnosis_CMPT::UltrasonicDiagnosis_CMPT"/>\r
+  <path src="src\Int\Diagnosis\UltrasonicDiagnosis\Test\UltrasonicDiagnosis_CMPT"/>\r
+</component>\r
+<component name="UltrasonicDiagnosis" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Diagnosis::UltrasonicDiagnosis::Test::UltrasonicDiagnosis_CFT::UltrasonicDiagnosis_CFT"/>\r
+  <path src="src\Int\Diagnosis\UltrasonicDiagnosis\Test\UltrasonicDiagnosis_CFT"/>\r
+</component>\r
+<component name="OperatingHours" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Diagnosis::UltrasonicDiagnosis::Test::OperatingHours_CFT::OperatingHours_CFT"/>\r
+  <path src="src\Int\Diagnosis\UltrasonicDiagnosis\Test\OperatingHours_CFT"/>\r
+</component>\r
+<component name="TemporalProgramFlowControl" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::TemporalProgramFlowControl::Test::TemporalProgramFlowControl_CMPT::TemporalProgramFlowControl_CMPT"/>\r
+  <path src="src\Int\Platform\TemporalProgramFlowControl\Test\TemporalProgramFlowControl_CMPT"/>\r
+</component>\r
+<component name="TemporalProgramFlowControl" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::TemporalProgramFlowControl::Test::TemporalProgramFlowControl_CFT::TemporalProgramFlowControl_CFT"/>\r
+  <path src="src\Int\Platform\TemporalProgramFlowControl\Test\TemporalProgramFlowControl_CFT"/>\r
+</component>\r
+<component name="Totalizer" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::Totalizer::Test::Totalizer_CFT::Totalizer_CFT"/>\r
+  <path src="src\Int\Measurement\Totalizer\Test\Totalizer_CFT"/>\r
+</component>\r
+<!--\r
+; disabled TFS1340417\r
+<component name="Derived" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::Derived::Test::Derived_CMPT::Derived_CMPT"/>\r
+  <path src="src\Int\Measurement\Derived\Test\Derived_CMPT"/>\r
+</component>\r
+<component name="Derived" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::Derived::Test::Derived_CFT::Derived_CFT"/>\r
+  <path src="src\Int\Measurement\Derived\Test\Derived_CFT"/>\r
+</component>\r
+-->\r
+<component name="TTAlgorithm_NCOV" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_ncov" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::TTAlgorithm::Test::TTAlgorithm_CFT::TTAlgorithm_CFT"/>\r
+  <path src="src\Int\Measurement\TTAlgorithm\Test\TTAlgorithm_CFT"/>\r
+</component>\r
+<component name="TTAlgorithm" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::TTAlgorithm::Test::TTAlgorithm_CFT::TTAlgorithm_CFT"/>\r
+  <path src="src\Int\Measurement\TTAlgorithm\Test\TTAlgorithm_CFT"/>\r
+</component>\r
+<!--\r
+; disabled TFS1262885\r
+<component name="MeasurementControl" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::MeasurementControl::Test::MeasurementControl_CMPT::MeasurementControl_CMPT"/>\r
+  <path src="src\Int\Measurement\MeasurementControl\Test\MeasurementControl_CMPT"/>\r
+</component>\r
+-->\r
+<component name="MeasurementControl" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::MeasurementControl::Test::MeasurementControl_CFT::MeasurementControl_CFT"/>\r
+  <path src="src\Int\Measurement\MeasurementControl\Test\MeasurementControl_CFT"/>\r
+</component>\r
+<component name="TTOperation" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::MeasurementControl::Test::TTOperation_CFT::TTOperation_CFT"/>\r
+  <path src="src\Int\Measurement\MeasurementControl\Test\TTOperation_CFT"/>\r
+</component>\r
+<component name="SignalSearch" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::SignalSearch::Test::SignalSearch_CFT::SignalSearch_CFT"/>\r
+  <path src="src\Int\Measurement\SignalSearch\Test\SignalSearch_CFT"/>\r
+</component>\r
+<component name="FrequencySweep" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::FrequencySweep::Test::FrequencySweep_CFT::FrequencySweep_CFT"/>\r
+  <path src="src\Int\Measurement\FrequencySweep\Test\FrequencySweep_CFT"/>\r
+</component>\r
+<component name="FPGA" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::Drivers::FPGA::Test::FPGA_CFT::FPGA_CFT"/>\r
+  <path src="src\Int\HAL\Drivers\FPGA\Test\FPGA_CFT"/>\r
+</component>\r
+<!--\r
+; disabled TFS1262906\r
+<component name="BurstSeq" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::BurstSeq::Test::BurstSeq_CMPT::BurstSeq_CMPT"/>\r
+  <path src="src\Int\Measurement\BurstSeq\test\BurstSeq_CFT"/>\r
+</component>\r
+-->\r
+<component name="BurstSeq" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::BurstSeq::Test::BurstSeq_CFT::BurstSeq_CFT"/>\r
+  <path src="src\Int\Measurement\BurstSeq\test\BurstSeq_CFT"/>\r
+</component>\r
+<component name="SubSequence" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Measurement::BurstSeq::Test::SubSequence_CFT::SubSequence_CFT"/>\r
+  <path src="src\Int\Measurement\BurstSeq\test\SubSequence_CFT"/>\r
+</component>\r
+<component name="AdDaInit" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::Drivers::AdDaInit::Test::AdDaInit_CFT::AdDaInit_CFT"/>\r
+  <path src="src\Int\HAL\Drivers\AdDaInit\test\AdDaInit_CFT"/>\r
+</component>\r
+<component name="CommandHandler" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Applications::CommandHandler::Test::CommandHandler_CMPT::CommandHandler_CMPT"/>\r
+  <path src="src\Int\Applications\CommandHandler\test\CommandHandler_CMPT"/>\r
+</component>\r
+<component name="CommandHandler" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Applications::CommandHandler::Test::CommandHandler_CFT::CommandHandler_CFT"/>\r
+  <path src="src\Int\Applications\CommandHandler\test\CommandHandler_CFT"/>\r
+</component>\r
+<component name="CommandHandler_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Applications::CommandHandler::Test::CommandHandler_CFT::CommandHandler_CFT"/>\r
+  <path src="src\Int\Applications\CommandHandler\test\CommandHandler_CFT"/>\r
+</component>\r
+<component name="CommunicationHandler" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CMPT::CommunicationHandler_CMPT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\CommunicationHandler_CMPT"/>\r
+</component>\r
+<component name="CommunicationHandler" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CFT::CommunicationHandler_CFT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\CommunicationHandler_CFT"/>\r
+</component>\r
+<component name="CommunicationHandler_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::CommunicationHandler_CFT::CommunicationHandler_CFT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\CommunicationHandler_CFT"/>\r
+</component>\r
+<component name="AccessMultipleParameters" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::AccessMultipleParameters_CFT::AccessMultipleParameters_CFT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\AccessMultipleParameters_CFT"/>\r
+</component>\r
+<component name="AccessMultipleParameters_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::AccessMultipleParameters_CFT::AccessMultipleParameters_CFT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\AccessMultipleParameters_CFT"/>\r
+</component>\r
+<component name="AccessControl" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::AccessControl_CFT::AccessControl_CFT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\AccessControl_CFT"/>\r
+</component>\r
+<component name="AccessControl_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::AccessControl_CFT::AccessControl_CFT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\AccessControl_CFT"/>\r
+</component>\r
+<component name="CustomFunctionCode" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::CustomFunctionCode_CFT::CustomFunctionCode_CFT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\CustomFunctionCode_CFT"/>\r
+</component>\r
+<component name="CustomFunctionCode_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::CommunicationHandler::Test::CustomFunctionCode_CFT::CustomFunctionCode_CFT"/>\r
+  <path src="src\Int\Communication\CommunicationHandler\test\CustomFunctionCode_CFT"/>\r
+</component>\r
+<component name="FS400App" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Applications::FS400App::Test::FS400App_CMPT::FS400App_CMPT"/>\r
+  <path src="src\Int\Applications\FS400App\test\FS400App_CMPT"/>\r
+</component>\r
+<component name="FS400App" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Applications::FS400App::Test::FS400App_CFT::FS400App_CFT"/>\r
+  <path src="src\Int\Applications\FS400App\test\FS400App_CFT"/>\r
+</component>\r
+<component name="InterruptActivity" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Applications::FS400App::Test::InterruptActivity_CFT::InterruptActivity_CFT"/>\r
+  <path src="src\Int\Applications\FS400App\test\InterruptActivity_CFT"/>\r
+</component>\r
+<component name="Bf53X" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53X_CFT::Bf53X_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53X_CFT"/>\r
+</component>\r
+<component name="Bf53XTimer" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XTimer_CFT::Bf53XTimer_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53xTimer_CFT"/>\r
+</component>\r
+<component name="Bf53XDma" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XDma_CFT::Bf53XDma_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53xDma_CFT"/>\r
+</component>\r
+<component name="Bf53XEbiu" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XEbiu_CFT::Bf53XEbiu_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53XEbiu_CFT"/>\r
+</component>\r
+<component name="Bf53XInterrupt" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XInterrupt_CFT::Bf53XInterrupt_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53XInterrupt_CFT"/>\r
+</component>\r
+<component name="Bf53XIo" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XIo_CFT::Bf53XIo_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53xIo_CFT"/>\r
+</component>\r
+<component name="Bf53XSport" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XSport_CFT::Bf53XSport_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53xSport_CFT"/>\r
+</component>\r
+<component name="Bf53XSPI" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XSPI_CFT::Bf53XSPI_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53xSPI_CFT"/>\r
+</component>\r
+<component name="Bf53XWatchDog" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XWatchdog_CFT::Bf53XWatchdog_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53XWatchdog_CFT"/>\r
+</component>\r
+<component name="Bf53XUart" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::PAL::Test::Bf53XUart_CFT::Bf53XUart_CFT"/>\r
+  <path src="src\Int\HAL\PAL\test\Bf53XUart_CFT"/>\r
+</component>\r
+<component name="Eeprom" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::Drivers::EEPROM::Test::Eeprom_CFT::Eeprom_CFT"/>\r
+  <path src="src\Int\HAL\Drivers\Eeprom\test\Eeprom_CFT"/>\r
+</component>\r
+<component name="Eeprom_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::Drivers::EEPROM::Test::Eeprom_CFT::Eeprom_CFT"/>\r
+  <path src="src\Int\HAL\Drivers\Eeprom\test\Eeprom_CFT"/>\r
+</component>\r
+<component name="StdTypes" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::StdTypes::Test::StdTypes_CFT::StdTypes_CFT"/>\r
+  <path src="src\Int\Platform\StdTypes\test\StdTypes_CFT"/>\r
+</component>\r
+<component name="FatalError" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::FatalError::Test::FatalError_CFT::FatalError_CFT"/>\r
+  <path src="src\Int\Platform\FatalError\test\FatalError_CFT"/>\r
+</component>\r
+<component name="Utilities" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::Utilities::Test::Utilities_CFT::Utilities_CFT"/>\r
+  <path src="src\Int\Platform\Utilities\test\Utilities_CFT"/>\r
+</component>\r
+<component name="Rs485" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::Drivers::RS485::Test::Rs485_CMPT::Rs485_CMPT"/>\r
+  <path src="src\Int\HAL\Drivers\Rs485\Test\Rs485_CMPT"/>\r
+</component>\r
+<component name="Rs485" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::Drivers::RS485::Test::Rs485_CFT::Rs485_CFT"/>\r
+  <path src="src\Int\HAL\Drivers\Rs485\Test\Rs485_CFT"/>\r
+</component>\r
+<component name="Rs485_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::HAL::Drivers::RS485::Test::Rs485_CFT::Rs485_CFT"/>\r
+  <path src="src\Int\HAL\Drivers\Rs485\Test\Rs485_CFT"/>\r
+</component>\r
+<component name="ModbusSlaveSerialLine" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CMPT::ModbusSlaveSerialLine_CMPT"/>\r
+  <path src="src\Int\Communication\ModbusSlaveSerialLine\test\ModbusSlaveSerialLine_CMPT"/>\r
+</component>\r
+<component name="ModbusSlaveSerialLine" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CFT::ModbusSlaveSerialLine_CFT"/>\r
+  <path src="src\Int\Communication\ModbusSlaveSerialLine\test\ModbusSlaveSerialLine_CFT"/>\r
+</component>\r
+<component name="ModbusSlaveSerialLine_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::ModbusSlaveSerialLine::Test::ModbusSlaveSerialLine_CFT::ModbusSlaveSerialLine_CFT"/>\r
+  <path src="src\Int\Communication\ModbusSlaveSerialLine\test\ModbusSlaveSerialLine_CFT"/>\r
+</component>\r
+<component name="Scheduler" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Applications::Scheduler::Test::Scheduler_CFT::Scheduler_CFT"/>\r
+  <path src="src\Int\Applications\Scheduler\test\Scheduler_CFT"/>\r
+</component>  \r
+<component name="ParameterHandler" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::ParameterHandler::Test::ParameterHandler_CMPT::ParameterHandler_CMPT"/>\r
+  <path src="src\Int\Platform\ParameterHandler\test\ParameterHandler_CMPT"/>\r
+</component>\r
+<component name="ParameterHandler" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::ParameterHandler::Test::ParameterHandler_CFT::ParameterHandler_CFT"/>\r
+  <path src="src\Int\Platform\ParameterHandler\test\ParameterHandler_CFT"/>\r
+</component>\r
+<component name="ParameterHandler_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::ParameterHandler::Test::ParameterHandler_CFT::ParameterHandler_CFT"/>\r
+  <path src="src\Int\Platform\ParameterHandler\test\ParameterHandler_CFT"/>\r
+</component>\r
+<component name="PersistentStorage" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::PersistentStorage::Test::PersistentStorage_CFT::PersistentStorage_CFT"/>\r
+  <path src="src\Int\Platform\PersistentStorage\test\PersistentStorage_CFT"/>\r
+</component>\r
+<component name="PersistentStorage_CO" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata_co" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::PersistentStorage::Test::PersistentStorage_CFT::PersistentStorage_CFT"/>\r
+  <path src="src\Int\Platform\PersistentStorage\test\PersistentStorage_CFT"/>\r
+</component>\r
+<component name="SafeEncapsulation" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Communication::SafeEncapsulation::Test::SafeEncapsulation_CFT::SafeEncapsulation_CFT"/>\r
+  <path src="src\Int\Communication\SafeEncapsulation\test\SafeEncapsulation_CFT"/>\r
+</component>\r
+<component name="CantataTask" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::CantataTask::Test::CantataTask_CFT::CantataTask_CFT"/>\r
+  <path src="src\Int\Platform\CantataTask\test\CantataTask_CFT"/>\r
+</component>\r
+<component name="DSPLib" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::DSPLib::Test::DSPLib_CMPT::DSPLib_CMPT"/>\r
+  <path src="src\Int\Platform\DSPLib\test\DSPLib_CMPT"/>\r
+</component>\r
+<component name="DSPLib" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Platform::DSPLib::Test::DSPLib_CFT::DSPLib_CFT"/>\r
+  <path src="src\Int\Platform\DSPLib\test\DSPLib_CFT"/>\r
+</component>\r
+\r
+<product name="FusBoot" version="1.00.00-02">\r
+  <class name="Components::Bootloader::FusBoot::FusBoot"/>\r
+  <path src="src\Int\Bootloader\FusBoot"/>\r
+</product>\r
+<component name="ParallelFlash" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Bootloader::ParallelFlash::Test::ParallelFlash_CFT::ParallelFlash_CFT"/>\r
+  <path src="src\Int\Bootloader\ParallelFlash\test\ParallelFlash_CFT"/>\r
+</component>\r
+<component name="BootCommunication" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Bootloader::BootCommunication::Test::BootCommunication_CMPT::BootCommunication_CMPT"/>\r
+  <path src="src\Int\Bootloader\BootCommunication\test\BootCommunication_CMPT"/>\r
+</component>\r
+<component name="FusBoot" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Bootloader::FusBoot::Test::FusBoot_CMPT::FusBoot_CMPT"/>\r
+  <path src="src\Int\Bootloader\FusBoot\test\FusBoot_CMPT"/>\r
+</component>\r
+<component name="Bootloader" CFT="No" CMPT="Yes">\r
+  <config name="Blackfin_cantata" coverage="No" complexity="No" restartt32="No"/>\r
+  <class name="Components::Bootloader::Bootloader::Test::Bootloader_CMPT::Bootloader_CMPT"/>\r
+  <path src="src\Int\Bootloader\Bootloader\test\Bootloader_CMPT"/>\r
+</component>\r
+<component name="FpgaLoader" CFT="Yes" CMPT="No">\r
+  <config name="Blackfin_cantata" coverage="Yes" complexity="No" restartt32="No"/>\r
+  <class name="Components::Bootloader::FpgaLoader::Test::FPGALoader_CFT::FPGALoader_CFT"/>\r
+  <path src="src\Int\Bootloader\FpgaLoader\Test"/>\r
+</component>\r
+</components>\r
diff --git a/main.cpp b/main.cpp
new file mode 100644 (file)
index 0000000..f056bde
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,38 @@
+#include <iostream>
+#include <fstream>
+
+#include <antcc/config.h>
+#include <os/path.h>
+#include <os/file.h>
+#include <utils/aeb/optionparser.h>
+
+#include <expat.h>
+#include <location.h>
+#include <xml/parser/parser_base.h>
+#include <xml/parser/ant_elements_parser.h>
+#include <xml/parser/document.h>
+
+#include <logger.h>
+#include <xml/parser/ant_elements.h>
+#include <xml/parser/ant_element_factory.h>
+#include <projectComponent.h>
+#include <tasks/ITaskContainer.h>
+#include <target.h>
+#include <project.h>
+
+#include <properties/property_file.h>
+
+#include <antcc/antcc.h>
+
+namespace antcc {
+  void register_tasks();
+  void register_types();
+}
+
+int main(int argc,char **argv)
+{
+    antcc::Antcc l_Main;
+    l_Main.parse_options(argc,argv);
+
+    l_Main.build();
+}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..ea6b168
--- /dev/null
@@ -0,0 +1,27 @@
+project(antcc_library)
+
+SUBDIRS(properties tasks  os xml)
+INCLUDE_DIRECTORIES("${libltdl_SOURCE_DIR}")
+
+
+FILE(GLOB TASKDEFS_SRCS taskdefs/taskdef.cpp)
+FILE(GLOB TYPES_SRCS types/*.cpp)
+FILE(GLOB CORE_SRCS core/*.cpp)
+
+ADD_LIBRARY(libantcc STATIC logger.cpp
+       target.cpp
+       project.cpp
+       projectComponent.cpp
+        ${TASKDEFS_SRCS}
+        ${TYPES_SRCS}
+         ${CORE_SRCS}
+       antcc/antcc.cpp
+       )
+
+TARGET_LINK_LIBRARIES(libantcc libantcc_tasks libantcc_parser libantcc_cond  libantcc_os propertylib ${EXPAT_LIBRARY} ltdl)
+#
+# May be later 
+#
+#ADD_EXECUTABLE(antcc main.cpp)
+#TARGET_LINK_LIBRARIES(antcc libantcc_parser libantcc propertylib ${EXPAT_LIBRARY})
+
diff --git a/src/antcc/antcc.cpp b/src/antcc/antcc.cpp
new file mode 100644 (file)
index 0000000..e969c54
--- /dev/null
@@ -0,0 +1,213 @@
+#include <iostream>
+#include <fstream>
+
+#include <antcc/config.h>
+#include <os/path.h>
+#include <os/file.h>
+#include <utils/aeb/optionparser.h>
+
+#include <expat.h>
+#include <location.h>
+#include <xml/parser/parser_base.h>
+#include <xml/parser/ant_elements_parser.h>
+#include <xml/parser/document.h>
+
+#include <logger.h>
+#include <xml/parser/ant_elements.h>
+#include <xml/parser/ant_element_factory.h>
+#include <projectComponent.h>
+#include <tasks/ITaskContainer.h>
+#include <target.h>
+#include <project.h>
+
+#include <properties/property_file.h>
+
+#include <antcc/antcc.h>
+
+namespace antcc {
+  void register_tasks();
+  void register_types();
+}
+/**
+ * Command line options
+ */
+enum optionIndex {UNKNOWN, HELP,PHELP, DBG,FICHIER,PROPERTY,PFILE,TARGET,OPT_END};
+const option::Descriptor usage[] = {
+ {UNKNOWN,      0, "", "", option::Arg::None,"antcc build tool.\nUsage:\n  antcc  [options] -I ./ -f <xml build file> -P <property file> -t <target>\n"
+                                             "  antcc  -b build.xml -t all \nOptions:\n"},
+ {HELP,         0, "h", "help",           option::Arg::None,    "  --help,-h \t\tPrint help and quit."},
+ {PHELP,        0, "H", "projecthelp",    option::Arg::None,    "  --projecthelp,-H \t\tPrint project description and targets"},
+ {DBG,          0, "d", "debug",   option::Arg::Required,"  --debug,-d \t\tDebug mode. takes a parameters from 2 to 8"},
+ {FICHIER,      0, "f", "file",    option::Arg::Required,"  --file,-f \t\txml build file"},
+ {PROPERTY,     0, "p", "property",option::Arg::Required,"  --property,-D \t\tset property name=value"},
+ {PFILE,        0, "P", "pfile",   option::Arg::Required,"  --pfile,-P \t\tpropery file to be parsed"},
+ {TARGET ,      0, "t", "target",  option::Arg::Required,"  --target,-t \t\tTarget defined in build"},
+ {0,0,0,0,0,0}
+};
+
+namespace antcc
+{
+
+Antcc::Antcc()
+    : m_ProjectHelp(false)
+{
+    path     baseDir("");
+    
+    register_tasks();
+    register_types();
+    
+    if (m_Project.getBasedir(baseDir))
+    {
+        m_Project.log(eINFO,"WorkingDir=%s",baseDir.c_str());
+    }
+}
+
+Antcc::~Antcc()
+{
+}
+
+int 
+Antcc::parse_options(int argc,char **argv)
+{
+    option::Option  options[OPT_END*2],buffer[OPT_END*3];
+    option::Parser  opt_parser(usage,argc-1,&argv[1],options,buffer);
+
+
+    if (opt_parser.error()) {
+        return 1;
+    }
+    if (options[HELP] )
+    {
+        option::printUsage(std::cout,usage);
+        exit(1);
+    }
+    if (options[PHELP] )
+    {
+        m_ProjectHelp = true;
+    }
+    if (options[DBG] )
+    {
+        for (option::Option *opts = options[DBG] ;opts; opts = opts->next()) {
+            if (opts->arg)
+               antccSetLogLevel(atol(opts->arg));
+        }
+    }
+    /* Check for properties and property file*/
+    if (options[PROPERTY])
+    {
+        for (option::Option *opts = options[PROPERTY] ;opts; opts = opts->next()) {
+            if (opts->arg)
+            {
+                std::string l_opt(opts->arg);
+                size_t l_pos = l_opt.find("=");
+                std::string l_name(l_opt.substr(0,l_pos));
+                std::string l_value(l_opt.substr(l_pos+1,l_opt.size()-1));
+                std::cout<<"Main Got property "<<l_name<<":"<<l_value<<std::endl;
+                m_Project.setProperty(l_name,l_value);
+            }
+        }
+    } 
+    /* Check for properties and property file*/
+    if (options[PFILE])
+    {
+        for (option::Option *opts = options[PFILE] ;opts; opts = opts->next()) {
+            if (opts->arg) 
+            {
+                prop::file l_pf(m_Project,opts->arg);
+                std::cout<<"Main Got property file :"<<opts->arg<<std::endl;
+            }
+        }
+    } 
+    /* get Build file if not  exit with help */
+    if (options[FICHIER])
+    {
+        for (option::Option *opts = options[FICHIER] ;opts; opts = opts->next())
+        {
+            if (opts->arg)
+            {
+                setBasedir(opts->arg);
+                parse_build(opts->arg);
+            }
+        }
+    } else {
+        option::printUsage(std::cout,usage);
+        return 1;
+    }
+    /* Check for properties and property file*/
+    if (options[TARGET])
+    {
+        for (option::Option *opts = options[TARGET] ;opts; opts = opts->next()) {
+            if (opts->arg)
+            {
+                std::cout<<"Main Got target:"<<opts->arg<<std::endl;
+                setTarget(opts->arg);
+            }
+
+        }
+    } else {
+        option::printUsage(std::cout,usage);
+        return 1;
+    }
+}
+
+
+void Antcc::parse_build(const std::string &_f)
+{
+    std::cout<<"Build Parser"<<std::endl;
+    parser::ProjectParser  project_parser(&m_Project,&m_Project);
+    parser::Document doc(project_parser,"project");
+   std::ifstream bf(_f);
+    if (bf.is_open())
+    {
+        std::cout<<"Main Got build rules:"<<_f<<std::endl;
+        doc.parse(bf);
+    }
+}
+
+/**
+ *
+ */
+void Antcc::projectHelp()
+{
+
+    for ( auto it = m_Project.getTargets().begin(); 
+          it != m_Project.getTargets().end();
+          ++it)
+    {
+        std::cout<<"\t"<<(*it).second->name()<<std::endl; 
+    }
+}
+
+
+int 
+Antcc::build()
+{
+    if (!m_ProjectHelp)
+    {
+      return m_Project.executeTarget(
+            m_Target.c_str());
+    } else
+    {
+        projectHelp();
+        return 0; 
+    }
+    
+}
+
+void 
+Antcc::setBasedir(const std::string &_f)
+{
+    ::antcc::file l_f(_f);
+    path     baseDir("");
+    
+    if (m_Project.getBasedir(baseDir))
+    {
+        baseDir.append(l_f.getPath());
+        std::cout<<"New basedir="<<baseDir.c_str()<<std::endl;
+        m_Project.setBasedir(baseDir.c_str());
+    } else {
+        std::cout<<"Failed New basedir="<<baseDir.c_str()<<std::endl;
+    }
+}
+
+} //end ns antcc
diff --git a/src/antcc/antcc.h b/src/antcc/antcc.h
new file mode 100644 (file)
index 0000000..4fc30df
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef __ANTCC_MAIN_H__
+#define __ANTCC_MAIN_H__
+
+
+namespace antcc
+{
+
+/**
+ * \brief encapsulate the main tasks in this
+ * class.
+ * Setup the builtin properties
+ * Parse the options
+ *
+ *
+ */
+class Antcc
+{
+    private:
+
+    public:
+        Antcc();
+        virtual ~Antcc();
+
+        int parse_options(int argc,char **argv);
+        /// Launch the build process
+        int build();
+
+        inline void setTarget(const std::string &_s)
+        { m_Target = _s; }
+    private:
+        /// Parse build file.
+        void parse_build(const std::string &_f);
+        /// Compute basedir based on build file
+        void setBasedir(const std::string &_f);
+        /// Display help
+        void projectHelp();
+    private:
+        project     m_Project;
+        std::string m_Target;
+       bool        m_ProjectHelp;
+};
+
+
+}
+
+#endif
diff --git a/src/antcc/common.h b/src/antcc/common.h
new file mode 100644 (file)
index 0000000..587c84c
--- /dev/null
@@ -0,0 +1,20 @@
+#include <ios>
+#include <iostream>
+#include <unordered_map>
+#include <vector>
+#include <stack>
+
+#include <antcc/config.h>
+#include <location.h>
+#include <logger.h>
+
+#include <os/os.h>
+#include <os/path.h>
+#include <os/file.h>
+#include <xml/parser/ant_elements.h>
+#include <xml/parser/ant_element_factory.h>
+#include <project.h>
+#include <projectComponent.h>
+#include <tasks/task.h>
+
+
diff --git a/src/antcc/config.h.cmake b/src/antcc/config.h.cmake
new file mode 100644 (file)
index 0000000..ed4ff03
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef XSD_CONFIG_H
+#define XSD_CONFIG_H
+
+#cmakedefine    ANTCC_WITH_BOOST
+#cmakedefine    ANTCC_WITH_AEB
+#cmakedefine    WITH_MALLOC
+#cmakedefine    ANTCC_OPTION_DEBUG_PARSER
+#cmakedefine    ANTCC_OPTION_DEBUG_PARSER_CHARS
+#cmakedefine    ANTCC_OPTION_DEBUG_PARSER_PROJECT
+#cmakedefine    ANTCC_OPTION_DEBUG_PARSER_TARGET
+#cmakedefine    ANTCC_OPTION_DEBUG_PARSER_TASK
+#cmakedefine    HAVE_UNISTD_H
+#cmakedefine    HAVE_SYS_UNISTD_H
+#cmakedefine    HAVE_DIRECT_H
+
+#ifdef ANTCC_WITH_BOOST
+# define SHARED_PTR boost::shared_ptr
+#elif defined(ANTCC_WITH_AEB)
+# define SHARED_PTR aeb::shared_ptr
+#else
+# define SHARED_PTR std::shared_ptr
+#endif
+
+#endif
diff --git a/src/app/antcc.h b/src/app/antcc.h
new file mode 100644 (file)
index 0000000..ebbf327
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef __ANTCC_H__
+#define __ANTCC_H__
+
+/**
+ * @brief main entry point 
+ * -> may be I could already provide a property set if
+ *  a property file was given as parameter
+ * -> Also, the projec treee...
+ */
+class antcc {
+
+  public:
+    antcc();
+    virtual ~antcc();
+  private:
+};
+#endif
+
diff --git a/src/core/executor.cpp b/src/core/executor.cpp
new file mode 100644 (file)
index 0000000..7c97283
--- /dev/null
@@ -0,0 +1,76 @@
+#include <antcc/common.h>
+#include <core/executor.h>
+
+namespace antcc
+{
+
+executor::executor(unsigned _n )
+  : m_Workers {_n }
+{
+}
+
+
+executor::~executor()
+{
+}
+
+/// I expect that the project will be able to provide 
+/// the dependency graph
+std::future<void>
+executor::run(antcc::project &p)
+{
+    std::promise<void> _p;
+    return _p.get_future();
+    //TODO
+}
+
+executor::threadStorage &
+executor::getStorage() const
+{
+    thread_local threadStorage l_storage;
+    return l_storage;
+};
+
+/**
+ * @brief thread function that will perform the work
+ */
+void 
+executor::runner(int _id,executor *_e)
+{
+    threadStorage &ts = _e->getStorage();
+    ts.m_Executor = _e;
+    ts.m_Id       = _id;
+    
+    antcc::target *l_target = nullptr;
+
+    while (1)
+    {
+        _e->execute_target(_id,l_target);
+        // execute target
+        //
+        if (_e->wait_for_target(_id,l_target) == false)
+            break;
+    };
+}
+
+void 
+executor::spawn(unsigned _n)
+{
+    for (unsigned i = 0 ; i < _n; i++)
+    {
+        m_Threads.emplace_back(executor::runner,i,this);
+    }
+}
+
+bool  
+executor::wait_for_target(int _id,antcc::target *&_target)
+{
+    return true;
+}
+
+void 
+executor::invoke(int _id,antcc::target *_target)
+{
+}
+
+}
diff --git a/src/core/executor.h b/src/core/executor.h
new file mode 100644 (file)
index 0000000..7b8e2fa
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef _ANTCC_EXECUTOR_H__
+#define _ANTCC_EXECUTOR_H__
+
+#include <thread>
+#include <future>
+
+namespace antcc
+{
+/**
+ * @brief object that is responsible to
+ * coordinate the execution of all tasks
+ * on multiple threads
+ *
+ */
+class executor
+{
+    private:
+        struct worker {
+            std::vector<target *> m_WorkingQueue;
+        };
+
+        struct threadStorage {
+            executor *m_Executor {nullptr};
+            int       m_Id { -1};
+        };
+
+        std::vector<std::thread> m_Threads;
+        std::vector<worker>      m_Workers;
+    public:
+        /// Number of threads 
+        executor(unsigned _n = std::thread::hardware_concurrency());
+
+        virtual ~executor();
+        
+        /// I expect that the project will be able to provide 
+        /// the dependency graph
+        std::future<void> run(antcc::project &p);
+    private:
+        threadStorage &getStorage() const;
+        /**
+         * @brief thread function that will perform the work
+         */
+        static void runner(int _id,executor *_e);
+
+        void spawn(unsigned _n);
+
+        bool wait_for_target(int _id,target *&_t);
+
+        void invoke(int _id,target *_t);
+        
+        void execute_target(int _id,target *_t);
+};
+
+} // end ns antcc
+
+#endif
diff --git a/src/core/graph.cpp b/src/core/graph.cpp
new file mode 100644 (file)
index 0000000..2435b53
--- /dev/null
@@ -0,0 +1,60 @@
+#include <antcc/common.h>
+#include <tasks/ITaskContainer.h>
+#include <target.h>
+#include <list>
+#include <stack>
+#include <core/graph.h>
+
+namespace antcc {
+
+
+graph::graph(project &_p)
+  : m_Project(_p)
+{
+}
+
+void graph::dfs(const std::string &_t,TargetList_type &_tl)
+{
+    std::stack<target *> l_stack;
+
+    if (_t.empty() )
+    {
+        m_Project.log(eERROR,"No  target defined !!!");
+        return ;
+    }
+    l_stack.push(m_Project.getTarget(_t.c_str()));
+
+    while (! l_stack.empty())
+    {
+        target *l_target = l_stack.top();
+        l_stack.pop();
+        // May be check retured value from getTarget before 
+        if (l_target == NULL)
+        {
+            m_Project.log(eERROR,"failed build dfs target is NULL");
+            break;
+        }
+        if (! l_target->isVisited())
+        {
+            _tl.push_front(l_target);
+            l_target->setVisited();
+        }
+        /// push the unvisited dependencies in the stack
+        /* retrieve dependecies*/
+        target::dependList_type deps = l_target->getDependencies();
+
+        for (target::dependList_const_iterator it = deps.begin()
+                ; it != deps.end()
+                ; ++it)
+        {
+            target *l_itt = m_Project.getTarget((*it).c_str());
+            if (l_itt &&
+                ! l_itt->isVisited())
+            {
+                l_stack.push(l_itt);
+            }
+        }
+    }
+}
+
+}
diff --git a/src/core/graph.h b/src/core/graph.h
new file mode 100644 (file)
index 0000000..827ed39
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef __ANTCC_GRAPH_H__
+#define __ANTCC_GRAPH_H__
+
+
+namespace antcc
+{
+    class project;
+    class target;
+    class task;
+
+
+/**
+ * @brief dependencie graph that will be used 
+ * by the executor
+ */
+class graph {
+    private:
+       graph(const graph &_c) = delete;
+    public:
+       typedef std::list<target *>                 TargetList_type;
+       typedef std::list<target *>::const_iterator TargetList_const_iterator;
+
+        graph(project &_);
+
+       virtual ~graph() { }
+        /// compute the dependency list order
+       void dfs(const std::string &_t,TargetList_type  &_tl);
+    protected:
+        project &m_Project;    
+};
+} // end ns antcc
+#endif
diff --git a/src/core/observer.cpp b/src/core/observer.cpp
new file mode 100644 (file)
index 0000000..d6d1e49
--- /dev/null
@@ -0,0 +1,35 @@
+#include <antcc/common.h>
+#include <core/observer.h>
+
+
+
+namespace antcc
+{
+
+
+void BuildObserver::setInit(unsigned _n)
+{
+    m_Timeline.m_Executions.resize(_n);
+    for (unsigned i = 0 ; i< _n ; ++i)
+    {
+        m_Timeline.m_Executions[i].reserve(512);
+    }
+    m_Timeline.m_Start = std::chrono::steady_clock::now();
+}
+
+void BuildObserver::onEnter(unsigned _w,target &_t)
+{
+    m_Timeline.m_Executions[_w].emplace_back(&_t, std::chrono::steady_clock::now());
+}
+void BuildObserver::onExit(unsigned _w,target &_t)
+{
+    m_Timeline.m_Executions[_w].back().m_End = std::chrono::steady_clock::now();
+}
+void BuildObserver::onEnter(unsigned _w,task &t )
+{
+}
+void BuildObserver::onExit(unsigned _w,task &t )
+{
+}
+
+} // end ns antcc
diff --git a/src/core/observer.h b/src/core/observer.h
new file mode 100644 (file)
index 0000000..d1c6827
--- /dev/null
@@ -0,0 +1,71 @@
+#ifndef __ANTCC_OBSERVER_H__
+#define __ANTCC_OBSERVER_H__
+
+
+#include <chrono>
+namespace antcc
+{
+
+    /**
+     * @brief Build observer interface.
+     * Can be used to monitor execution time,
+     * create % time left etc. report progress.
+     */
+    class buildObserverInterface
+    {
+        public:
+            buildObserverInterface() { };
+
+            virtual void setInit(unsigned _n)  = 0;
+            virtual void onEnter(unsigned w,target &t)    = 0;
+            virtual void onExit(unsigned w,target &t)     = 0;
+            virtual void onEnter(unsigned w,task &t )     = 0;
+            virtual void onExit(unsigned w,task &t )      = 0;
+    } ;
+   
+
+    /**
+     * @brief default build observer that track execution
+     * time off all tasks
+     */
+    class BuildObserver : public virtual buildObserverInterface
+    {
+        private:
+            struct tExecution {
+
+                target *m_Target;
+
+                std::chrono::time_point<std::chrono::steady_clock> m_Begin;
+                std::chrono::time_point<std::chrono::steady_clock> m_End;
+                
+                /// Maybe a pointer to the target
+                tExecution(target *_t
+                           , std::chrono::time_point<std::chrono::steady_clock> _b
+                ) : m_Target(_t), m_Begin(_b)
+                {
+                }
+                tExecution(target *_t
+                           , std::chrono::time_point<std::chrono::steady_clock> _b
+                           , std::chrono::time_point<std::chrono::steady_clock> _e
+                ) : m_Target(_t), m_Begin(_b),m_End(_e)
+                {
+                }
+            };
+            struct tTimeline
+            {
+                std::chrono::time_point<std::chrono::steady_clock> m_Start;
+                std::vector<std::vector<tExecution> > m_Executions;
+            };
+            tTimeline m_Timeline;
+        public:
+
+        private:
+            void setInit(unsigned _n);
+            void onEnter(unsigned _w,target &t);
+            void onExit(unsigned _w,target &t);
+            void onEnter(unsigned _w,task &t );
+            void onExit(unsigned _w,task &t );
+
+    };
+};
+#endif
diff --git a/src/location.h b/src/location.h
new file mode 100644 (file)
index 0000000..9dc4ec6
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef __LOCATION_H__
+#define __LOCATION_H__
+
+namespace antcc
+{
+
+    struct Location {
+        Location(char *_filename,const unsigned long _line,const unsigned long _col)
+                : m_Filename(_filename),m_Line(_line),m_Column(_col) {};
+        unsigned long   m_Column;
+        unsigned long   m_Line;
+        char          * m_Filename;
+    };
+
+} // end antcc ns
+#endif
diff --git a/src/logger.cpp b/src/logger.cpp
new file mode 100644 (file)
index 0000000..c900449
--- /dev/null
@@ -0,0 +1,34 @@
+#include <ios>
+#include <iostream>
+#include <stdarg.h>
+
+#include <logger.h>
+#define LOG_BUFFER_SIZE 4096
+
+const char *strLevel[] = {
+  "CRITICAL"
+  ,"ERROR"
+  ,"WARN"
+  ,"INFO"
+  ,"DEBUG"
+};
+
+static int gLogLevel = eINFO;
+
+void antccSetLogLevel(int _level)
+{
+    gLogLevel = _level;
+}
+
+void antccTrace(int _level,const char *_filename,unsigned int _line,const char *fmt,...)
+{
+  static char logBuffer[LOG_BUFFER_SIZE];
+  va_list args;
+  std::string filename(_filename);
+  std::string sf(filename.substr(filename.rfind('/')+1));
+  va_start(args,fmt);
+  vsnprintf(logBuffer,LOG_BUFFER_SIZE,fmt,args);
+  va_end(args);
+  if (_level <= gLogLevel)
+    std::cerr<<sf<<" ("<<_line<<") "<<strLevel[_level]<<":"<<logBuffer<<std::endl;
+}
diff --git a/src/logger.h b/src/logger.h
new file mode 100644 (file)
index 0000000..66d12c0
--- /dev/null
@@ -0,0 +1,239 @@
+#ifndef __ANTCC_LOGGER_H__
+#define __ANTCC_LOGGER_H__
+
+/**
+ * Put here all logging functionnalities
+ */
+
+enum antccLogLevel {eCRITICAL,eERROR,eWARN,eINFO,eDEBUG};
+
+
+#if defined(DEBUG)
+/* debug parser */
+#ifdef _WIN32
+/* Win32 debug */
+#ifdef  ANTCC_OPTION_DEBUG_PARSER
+#define ANTCC_PARSER_DEBUG(fmt,...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,__VA_ARGS__)
+#else
+#define ANTCC_PARSER_DEBUG(fmt,...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_CPLX_ATTR
+#define ANTCC_PARSER_DEBUG_CPLX_ATTR(fmt,...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,__VA_ARGS__)
+#else
+#define ANTCC_PARSER_DEBUG_CPLX_ATTR(fmt,...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_PROJECT
+#define ANTCC_PARSER_DEBUG_PROJECT(fmt,...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,__VA_ARGS__)
+#else
+#define ANTCC_PARSER_DEBUG_PROJECT(fmt,...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_TARGET
+#define ANTCC_PARSER_DEBUG_TARGET(fmt,...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,__VA_ARGS__)
+#else
+#define ANTCC_PARSER_DEBUG_TARGET(fmt,...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_TASK
+#define ANTCC_PARSER_DEBUG_TASK(fmt,...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,__VA_ARGS__)
+#else
+#define ANTCC_PARSER_DEBUG_TASK(fmt,...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_TYPE
+#define ANTCC_PARSER_DEBUG_TYPE(fmt,...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,__VA_ARGS__)
+#else
+#define ANTCC_PARSER_DEBUG_TYPE(fmt,...) \
+       do {} while (0)
+#endif
+
+/**/
+#define ANTCC_PARSER_INFO(fmt,...) \
+       antccTrace(eINFO,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_PARSER_ERROR(fmt,...) \
+       antccTrace(eERROR,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_PARSER_CRITICAL(fmt,...) \
+       antccTrace(eCRITICAL,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+/* debug general logs */
+#define ANTCC_LOG_DEBUG(fmt,...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_LOG_INFO(fmt,...) \
+       antccTrace(eINFO,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_LOG_WARN(fmt,...) \
+       antccTrace(eWARN,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_LOG_ERROR(fmt,...) \
+       antccTrace(eERROR,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_LOG_CRITICAL(fmt,...) \
+       antccTrace(eCRITICAL,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#else
+/* Non Win32 debug*/
+#ifdef  ANTCC_OPTION_DEBUG_PARSER
+#define ANTCC_PARSER_DEBUG(fmt,args...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,args)
+#else
+#define ANTCC_PARSER_DEBUG(fmt,args...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_CPLX_ATTR
+#define ANTCC_PARSER_DEBUG_CPLX_ATTR(fmt,args...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,args)
+#else
+#define ANTCC_PARSER_DEBUG_CPLX_ATTR(fmt,args...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_PROJECT
+#define ANTCC_PARSER_DEBUG_PROJECT(fmt,args...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,args)
+#else
+#define ANTCC_PARSER_DEBUG_PROJECT(fmt,args...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_TARGET
+#define ANTCC_PARSER_DEBUG_TARGET(fmt,args...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,args)
+#else
+#define ANTCC_PARSER_DEBUG_TARGET(fmt,args...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_TASK
+#define ANTCC_PARSER_DEBUG_TASK(fmt,args...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,args)
+#else
+#define ANTCC_PARSER_DEBUG_TASK(fmt,args...) \
+       do {} while (0)
+#endif
+
+#ifdef  ANTCC_OPTION_DEBUG_PARSER_TYPE
+#define ANTCC_PARSER_DEBUG_TYPE(fmt,args...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,args)
+#else
+#define ANTCC_PARSER_DEBUG_TYPE(fmt,args...) \
+       do {} while (0)
+#endif
+
+/**/
+#define ANTCC_PARSER_INFO(fmt,args...) \
+       antccTrace(eINFO,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_PARSER_ERROR(fmt,args...) \
+       antccTrace(eERROR,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_PARSER_CRITICAL(fmt,args...) \
+       antccTrace(eCRITICAL,__FILE__,__LINE__,fmt,args)
+
+/* debug general logs */
+#define ANTCC_LOG_DEBUG(fmt,args...) \
+       antccTrace(eDEBUG,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_LOG_INFO(fmt,args...) \
+       antccTrace(eINFO,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_LOG_WARN(fmt,args...) \
+       antccTrace(eWARN,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_LOG_ERROR(fmt,args...) \
+       antccTrace(eERROR,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_LOG_CRITICAL(fmt,args...) \
+       antccTrace(eCRITICAL,__FILE__,__LINE__,fmt,args)
+/* end debug other than win32 */
+#endif
+
+#else
+
+/* release parser logs*/
+#ifndef _WIN32
+#define ANTCC_PARSER_DEBUG(fmt,args...)            do {} while (0)
+#define ANTCC_PARSER_DEBUG_CPLX_ATTR(fmt,args...)  do {} while (0)
+#define ANTCC_PARSER_DEBUG_PROJECT(fmt,args...)    do {} while (0)
+#define ANTCC_PARSER_DEBUG_TARGET(fmt,args...)     do {} while (0)
+#define ANTCC_PARSER_DEBUG_TASK(fmt,args...)       do {} while (0)
+
+#define ANTCC_PARSER_DEBUG_TYPE(fmt,args...)       do {} while (0)
+
+#define ANTCC_PARSER_INFO(fmt,args...)             do {} while (0)
+
+#define ANTCC_PARSER_ERROR(fmt,args...)           antccTrace(eERROR,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_PARSER_CRITICAL(fmt,args...)        antccTrace(eCRITICAL,__FILE__,__LINE__,fmt,args)
+
+/* Release mode*/
+#define ANTCC_LOG_DEBUG(fmt,args...)     do {} while (0)
+
+#define ANTCC_LOG_INFO(fmt,args...)      do {} while (0)
+
+#define ANTCC_LOG_WARN(fmt,args...)      antccTrace(eWARN,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_LOG_ERROR(fmt,args...)     antccTrace(eINFO,__FILE__,__LINE__,fmt,args)
+
+#define ANTCC_LOG_CRITICAL(fmt,args...)  antccTrace(eINFO,__FILE__,__LINE__,fmt,args)
+
+
+#else
+/* release win32 */
+#define ANTCC_PARSER_DEBUG(fmt,...)            do {} while (0)
+#define ANTCC_PARSER_DEBUG_CPLX_ATTR(fmt,...)  do {} while (0)
+#define ANTCC_PARSER_DEBUG_PROJECT(fmt,...)    do {} while (0)
+#define ANTCC_PARSER_DEBUG_TARGET(fmt,...)     do {} while (0)
+#define ANTCC_PARSER_DEBUG_TASK(fmt,...)       do {} while (0)
+
+#define ANTCC_PARSER_DEBUG_TYPE(fmt,...)       do {} while (0)
+
+#define ANTCC_PARSER_INFO(fmt,...)             do {} while (0)
+
+#define ANTCC_PARSER_ERROR(fmt,...)           antccTrace(eERROR,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_PARSER_CRITICAL(fmt,...)        antccTrace(eCRITICAL,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+/* Release mode*/
+#define ANTCC_LOG_DEBUG(fmt,...)     do {} while (0)
+
+#define ANTCC_LOG_INFO(fmt,...)      do {} while (0)
+
+#define ANTCC_LOG_WARN(fmt,...)      antccTrace(eWARN,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_LOG_ERROR(fmt,...)     antccTrace(eINFO,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+#define ANTCC_LOG_CRITICAL(fmt,...)  antccTrace(eINFO,__FILE__,__LINE__,fmt,__VA_ARGS__)
+
+
+#endif
+
+#endif
+
+/**
+ * @brief trace function for the project
+ */
+void antccTrace(int _level,const char *_filename,unsigned int _line,const char *fmt,...);
+
+/**
+ * @brief set the Debugging trace level from eCRITICAL,eERROR,eWARNING,eINFO,eDEBUG
+ */
+void antccSetLogLevel(int _level);
+
+#endif
diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d860c5d
--- /dev/null
@@ -0,0 +1,34 @@
+project(prj_antcc_os)
+
+INCLUDE_DIRECTORIES("${libltdl_SOURCE_DIR}")
+
+IF(NOT WIN32)
+  FIND_PACKAGE(EXPAT REQUIRED)
+ENDIF(NOT WIN32)
+
+
+ADD_LIBRARY(libantcc_os STATIC directory.cpp
+       execute.cpp
+       path.cpp 
+       file.cpp 
+       )
+
+TARGET_LINK_LIBRARIES(libantcc_os ${EXPAT_LIBRARY} ltdl)
+
+#
+# May be later 
+#
+
+ADD_EXECUTABLE(test_os
+       execute.cpp
+       path.cpp 
+       file.cpp 
+       directory.cpp 
+)
+
+TARGET_LINK_LIBRARIES(test_os libantcc ${EXPAT_LIBRARY})
+SET_TARGET_PROPERTIES(test_os
+      PROPERTIES
+      CLEAN_DIRECT_OUTPUT 1
+      COMPILE_FLAGS "-DDEBUG -DPARSER_DEBUG=1 -DTEST_DIRECTORY_MAIN"
+    )
diff --git a/src/os/directory.cpp b/src/os/directory.cpp
new file mode 100644 (file)
index 0000000..3eed317
--- /dev/null
@@ -0,0 +1,178 @@
+#include <antcc/common.h>
+
+#include <os/path.h>
+#include <os/file.h>
+#include <os/directory.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#if defined(_WIN32) || defined(__MINGW32__)
+#else
+#include <sys/unistd.h>
+#endif
+namespace antcc
+{
+namespace os {
+
+
+directory_iterator::directory_iterator(const char *_dir)
+  : m_Handle(NULL)
+{
+
+#if defined(_WIN32) || defined(__MINGW32__)
+    if (_dir != NULL)
+    {
+        if ( (m_Handle = FindFirstFile(_dir,&m_Entry) ) != NULL)
+        {
+        }
+    } else 
+    {
+    }
+#else
+    m_Entry = NULL;
+    if (_dir != NULL)
+    {
+        if ( (m_Handle = opendir(_dir)) != NULL)
+        {
+            m_Entry = getNext();
+        }
+    } else
+    {
+    }
+#endif
+}
+
+/**
+ * @brief copy contructor, don't copy the handle pointer. 
+ */
+directory_iterator::directory_iterator(const directory_iterator &_c)
+  : m_Handle(NULL),m_Entry(_c.m_Entry)
+{
+    ANTCC_LOG_DEBUG("%s copy %0x",__FUNCTION__,_c.m_Handle);
+}
+
+
+directory_iterator::~directory_iterator()
+{
+    close();
+}
+
+/// Increment operator ....
+directory_iterator &
+directory_iterator::operator ++() 
+{
+    m_Entry = getNext();
+    return *this;
+}
+
+directory_iterator 
+directory_iterator::operator ++(int)
+{
+    ANTCC_LOG_INFO("%s with int",__FUNCTION__);
+    directory_iterator tmp = *this;
+    tmp.m_Entry = tmp.getNext();
+    return tmp;
+}
+/// Access operator
+directory_iterator::value_type
+directory_iterator::operator ->() const 
+{
+    return m_Entry;
+}
+
+directory_iterator::directory_entry
+directory_iterator::operator *() const 
+{
+    return directory_entry(m_Entry);
+}
+
+directory_iterator::value_type 
+directory_iterator::getNext()
+{
+    value_type _v;
+#if defined(_WIN32) || defined(__MINGW32__)
+    FindNextFile(m_Handle,&_v);
+#else
+    _v = readdir(m_Handle);
+#endif
+    return _v;
+}
+
+void 
+directory_iterator::close()
+{
+    if (m_Handle)
+    {
+#if defined(_WIN32) || defined(__MINGW32__)
+        FindClose(m_Handle);
+#else
+        ANTCC_LOG_DEBUG("%s copy %0x",__FUNCTION__,m_Handle);
+        closedir(m_Handle);
+#endif
+    }
+    m_Handle = NULL;
+}
+
+/**
+ * directory entry implementation
+ */
+
+directory_iterator::directory_entry::directory_entry(directory_iterator::value_type _t)
+ : m_Entry(_t)
+{
+}
+
+const char *
+directory_iterator::directory_entry::name() const
+{
+#if defined(_WIN32) || defined(__MINGW32__)
+    return m_Entry.cFileName;
+#else
+    if (m_Entry)
+    {
+        return m_Entry->d_name;
+    } else
+    {
+        return "";
+    }
+#endif
+}
+
+bool  
+directory_iterator::directory_entry::isDirectory() const
+{
+#if defined(_WIN32) || defined(__MINGW32__)
+  return m_Entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;
+#else
+  return (m_Entry != NULL) && (m_Entry->d_type & DT_DIR);
+#endif
+}
+
+
+bool  
+directory_iterator::directory_entry::isFile() const
+{
+#if defined(_WIN32) || defined(__MINGW32__)
+  return m_Entry.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE;
+#else
+  return (m_Entry != NULL) && (m_Entry->d_type & DT_REG);
+#endif
+}
+
+
+
+
+} // end ns os
+} // end ns antcc
+
+#ifdef TEST_DIRECTORY_MAIN
+int main(int argc,char **argv)
+{
+    antcc::os::directory dir(".");
+    antcc::os::directory_iterator it = dir.begin();
+    for ( ; it != dir.end() ; ++it)
+    {
+        std::cout<<"Got Entry! "<<(*it).name()<<" isFile:"<<(*it).isFile()<<std::endl;
+    } 
+}
+#endif
diff --git a/src/os/directory.h b/src/os/directory.h
new file mode 100644 (file)
index 0000000..fc82de2
--- /dev/null
@@ -0,0 +1,196 @@
+#ifndef _DIRECTORY_H__\r
+#define _DIRECTORY_H__\r
+#if defined(_WIN32) || defined(__MINGW32__)\r
+# include <windows.h>\r
+#else\r
+# include <sys/types.h>\r
+# include <dirent.h>\r
+#endif\r
+\r
+#include <string>\r
+#include <vector>\r
+\r
+inline std::string strip_ext(const std::string& filename){\r
+    std::string::size_type dot_pos = filename.find_last_of('.');\r
+    return (std::string::npos == dot_pos) ? filename : filename.substr(0, dot_pos);\r
+}\r
+\r
+inline std::string directory(const std::string& path) {\r
+    std::string::size_type pos = path.find_last_of('/');\r
+    return (pos == std::string::npos) ? std::string(".") : path.substr(0,pos);\r
+}\r
+\r
+\r
+namespace  antcc{\r
+namespace  os {\r
+\r
+class directory_iterator \r
+{\r
+    public:\r
+#if defined(_WIN32) || defined(__MINGW32__)\r
+        typedef HANDLE            handle_type;\r
+        /// !! i's not a pointer\r
+        typedef WIN32_FIND_DATA   value_type;\r
+#else\r
+        typedef DIR              *handle_type;\r
+        typedef struct dirent    *value_type; \r
+#endif\r
+        typedef const value_type &reference_type; \r
+        typedef const value_type *pointer_type; \r
+        typedef std::forward_iterator_tag iterator_category;\r
+        /**\r
+         * Depending on the OS, \r
+         * either struct dirent  or \r
+         *     WIN32_FIND_DATA ff_data;\r
+         */\r
+        struct directory_entry\r
+        {\r
+            public:\r
+                directory_entry(directory_iterator::value_type _t);\r
+                const char *name() const;\r
+                bool  isDirectory() const;\r
+                bool  isFile() const;\r
+            private:\r
+                directory_iterator::value_type m_Entry;\r
+        };\r
+\r
+    public:\r
+        /// Constructors\r
+        directory_iterator(const char *_d = NULL);\r
+        directory_iterator(const directory_iterator &_c);\r
+        ~directory_iterator();\r
+        /// Increment operator ....\r
+        directory_iterator &operator ++(); \r
+        directory_iterator operator ++(int);\r
+        /// Access operator\r
+        value_type      operator ->() const ;\r
+        directory_entry operator *() const ;\r
+        /// close handle.\r
+        void close();\r
+    public:\r
+        friend bool operator ==(directory_iterator x,directory_iterator y ) {\r
+#if defined(_WIN32) || defined(__MINGW32__)\r
+            return true;\r
+#else\r
+            return x.m_Entry == y.m_Entry;\r
+#endif\r
+        }\r
+\r
+        friend bool operator !=(directory_iterator x,directory_iterator y ) {\r
+#if defined(_WIN32) || defined(__MINGW32__)\r
+            return true;\r
+#else\r
+            return x.m_Entry != y.m_Entry;\r
+#endif\r
+        }\r
+        \r
+    private:\r
+        value_type getNext();\r
+\r
+    private:\r
+        // Current entry.\r
+        value_type m_Entry;\r
+        // Missing DIR ...  open / close\r
+        handle_type m_Handle;\r
+};\r
+/**\r
+ *\r
+ *\r
+ */\r
+class directory\r
+{\r
+  public:\r
+  \r
+    typedef std::vector<std::string> directories;\r
+\r
+    typedef std::vector<std::string> files;\r
+\r
+    directory(const char *p) : m_path(p) {};\r
\r
+    directory(const std::string &p) : m_path(p) {};\r
\r
+    virtual ~directory() {};\r
+\r
+    directory_iterator begin()\r
+    {\r
+        return directory_iterator(m_path.c_str());\r
+    }\r
+    directory_iterator end()\r
+    {\r
+        return directory_iterator(NULL);\r
+    }\r
+    /**\r
+     *\r
+     * Return the name of the files (local name)\r
+     */\r
+    void get_files(const char *s,files &f,int mask)\r
+    {\r
+#if defined(_WIN32) || defined(__MINGW32__)\r
+      WIN32_FIND_DATA ff_data;\r
+      HANDLE          hf;\r
+      std::cout<<"get_files::("<<s<<")"<<std::endl;\r
+      hf = FindFirstFile(s,&ff_data);\r
+      if (hf == INVALID_HANDLE_VALUE)\r
+      {\r
+        std::cout<<"handle is not valid"<<std::endl;\r
+        return ;\r
+      }\r
+      \r
+      do\r
+      {\r
+        if (ff_data.dwFileAttributes & mask)\r
+        {\r
+          f.push_back(std::string(ff_data.cFileName));\r
+        }\r
+      }\r
+      while (FindNextFile(hf,&ff_data));\r
+      FindClose(hf);\r
+#else\r
+      DIR *dirent;\r
+      std::cout<<"get_files::("<<s<<")"<<std::endl;\r
+      if ((dirent = opendir(s)) != NULL)\r
+      {\r
+        struct dirent *entry;\r
+        while ( (entry = readdir(dirent)) != NULL)\r
+        {\r
+          if (entry->d_type & mask)\r
+          f.push_back(std::string(entry->d_name));\r
+        }\r
+        closedir(dirent);\r
+      }else\r
+      {\r
+        std::cerr<<"Failed opendir"<<std::endl;\r
+      }\r
+\r
+      std::cout<<"TO BE coded"<<std::endl;\r
+#endif\r
+    }\r
+    void get_files(const char *s,files &f)\r
+    {\r
+#if defined(_WIN32) || defined(__MINGW32__)\r
+      get_files(s,f,FILE_ATTRIBUTE_ARCHIVE);\r
+#else\r
+      get_files(s,f,DT_REG);\r
+#endif\r
+    }\r
+\r
+    void get_directories(directories &dirs)\r
+    {\r
+#if defined(_WIN32) || defined(__MINGW32__)\r
+      get_files(m_path.c_str(),dirs,FILE_ATTRIBUTE_DIRECTORY);\r
+#else\r
+      get_files(m_path.c_str(),dirs,DT_DIR);\r
+#endif\r
+    }\r
+  \r
+  protected:\r
+\r
+    std::string m_path;\r
+};\r
+\r
+}\r
+}\r
+/*\r
+ * vim:et:sw=2:ts=2\r
+ */\r
+#endif\r
diff --git a/src/os/execute.cpp b/src/os/execute.cpp
new file mode 100644 (file)
index 0000000..f07009a
--- /dev/null
@@ -0,0 +1,82 @@
+#include <antcc/common.h>
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef _WIN32
+#include <direct.h>
+#define chdir  _chdir
+#define popen  _popen
+#define pclose _pclose
+#endif
+#include <fstream>
+
+#include <os/execute.h>
+
+// Os support methods
+#include <utils/aeb/sys/popen_streambuf.h>
+
+namespace antcc
+{
+namespace os
+{
+
+execute::execute()
+{
+}
+
+/// run command 
+void 
+execute::runCommand(task *_task,const std::string &_cmd,std::istream &is)
+{
+   popen_streambuf *sb = new popen_streambuf();
+   
+   is.rdbuf(sb);
+
+  sb->open(_cmd.c_str(),"r");
+    
+}
+
+/// Set environment  variables
+void 
+execute::setEnvironment(const std::string &)
+{
+        ANTCC_LOG_ERROR("%s to be implemented"
+                       ,__FUNCTION__);
+}
+/// Set environment  variables
+void 
+execute::getEnvironment(const std::string &)
+{
+        ANTCC_LOG_ERROR("%s to be implemented"
+                       ,__FUNCTION__);
+}
+
+void 
+execute::setWorkingDir(const std::string &_dir) 
+{
+    if ( ! chdir(_dir.c_str())) 
+    {
+        ANTCC_LOG_ERROR("%s failed change dir"
+                       ,__FUNCTION__);
+    }
+}
+
+#define PATH_SIZE 2048
+std::string
+execute::getWorkingDir() 
+{
+    char _buf[PATH_SIZE];
+    getcwd(_buf,PATH_SIZE);
+    std::string p(_buf);
+    ANTCC_LOG_DEBUG("execute::%s dir = %s"
+                       ,__FUNCTION__
+                       ,p.c_str());
+    
+    return p;
+}
+
+
+} // end ns os
+} // end ns antcc
diff --git a/src/os/execute.h b/src/os/execute.h
new file mode 100644 (file)
index 0000000..de5b385
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef __EXECUTOR_H__
+#define __EXECUTOR_H__
+
+namespace antcc 
+{
+namespace os
+{
+/**
+ * @brief this class is an adaptor class
+ * that provides a unique API to 
+ * run commands on the OS. either windows or linux
+ *
+ * need an output stream to retrieve the datas
+ * returned by the command
+ */
+class execute 
+{
+    public:
+    execute();
+    // create a child process in wich the commands are sent
+    // void spawn();
+
+    /// run command 
+    void runCommand(task *_task,const std::string &_cmd,std::istream &is);
+    /// Set environment  variables
+    void setEnvironment(const std::string &);
+    /// Set environment  variables
+    void getEnvironment(const std::string &);
+
+    void setWorkingDir(const std::string &_dir) ;
+    
+    std::string getWorkingDir() ;
+    private:
+};
+} // end ns os
+} // end ns antcc
+
+
+#endif
+/* vim:et:sw=4:list:ts=4: */
diff --git a/src/os/file.cpp b/src/os/file.cpp
new file mode 100644 (file)
index 0000000..e15ca12
--- /dev/null
@@ -0,0 +1,220 @@
+#include <antcc/common.h>
+
+#include <os/path.h>
+#include <os/file.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <sys/unistd.h>
+#endif
+
+#ifdef _WIN32
+#define unlink        _unlink
+#endif
+namespace antcc
+{
+
+file::file(const std::string &_name) 
+    : m_Name(_name)
+{
+}
+file::file(const file &_f)
+  : m_Name(_f.m_Name)
+{
+}
+
+
+
+file::~file()
+{
+}
+
+std::string
+file::basename() const
+{
+    std::string l_dn;
+#ifdef _WIN32
+    size_t _pos = m_Name.find_last_of('\\');
+#else
+    size_t _pos = m_Name.find_last_of('/');
+#endif
+    if (_pos == std::string::npos)
+    {
+        l_dn = m_Name;
+    } else {
+        l_dn = m_Name.substr(_pos+1);
+    }
+    return l_dn;
+}
+
+std::string 
+file::dirname() const
+{
+    std::string l_dn;
+#ifdef _WIN32
+    size_t _pos = m_Name.find_last_of('\\');
+#else
+    size_t _pos = m_Name.find_last_of('/');
+#endif
+    if (_pos != std::string::npos)
+    {
+        l_dn = m_Name.substr(0,_pos);
+    }
+    return l_dn;
+}
+
+path file::getPath() const
+{
+    if (isDir())
+    {
+        return path(m_Name);
+    } else
+    {
+        return path(dirname());
+    }
+}
+
+const std::string &
+file::name() const
+{
+    return m_Name;
+}
+
+void 
+file::rename(const std::string &_dest)
+{
+    move(_dest,false);
+    m_Name = _dest;
+}
+
+/**
+ * \brief not sure if this function is called.
+ */
+void 
+file::move(const std::string &_dest,bool _keepOrigin)
+{
+    if (exists() ) 
+    {
+#ifdef _WIN32
+#else
+        ::link(m_Name.c_str(),_dest.c_str());
+        if (! _keepOrigin) 
+        { // Real move
+            ::unlink(m_Name.c_str());
+        }
+#endif
+    }
+}
+/// perfomes copy 
+void 
+file::move(const std::string &_dest,bool _keepOrigin ) const
+{
+    if (exists() ) 
+    {
+#ifdef _WIN32
+        if (! _keepOrigin)
+       { 
+          ::rename(m_Name.c_str(),_dest.c_str());
+       } else
+       { // Make a copy
+       }       
+#else
+        ::link(m_Name.c_str(),_dest.c_str());
+        if (! _keepOrigin) 
+        { // Real move
+            ::unlink(m_Name.c_str());
+        }
+#endif
+    }
+}
+
+/// Delete file. return true if file exist before remove
+bool 
+file::remove()
+{
+    bool l_return = exists();
+    if (l_return)
+    {
+        ::unlink(m_Name.c_str());
+        // Maybe set m_Name to ""
+    }
+    return l_return;
+}
+
+/// If file exists and it's directory return true.
+bool 
+file::isDir() const
+{
+    bool l_return = false;
+    struct stat l_stat;
+
+    if (!getStat(&l_stat))
+    {
+        l_return = (l_stat.st_mode & S_IFDIR) ;
+    }
+    return l_return;
+}
+/// If file exists ans it's a regular file return true or else 
+/// return false
+bool 
+file::isRegular() const
+{
+    bool l_return = false;
+    struct stat l_stat;
+
+    if (!getStat(&l_stat))
+    {
+        l_return = (l_stat.st_mode & S_IFREG) ;
+    }
+    return l_return;
+}
+
+size_t
+file::size() const
+{
+    struct stat l_stat;
+
+    if (!getStat(&l_stat))
+    {
+        return l_stat.st_size;
+    } else
+        return 0;
+}
+
+/// If file exists, return it's size.
+bool
+file::exists() const
+{
+    if (m_Name.size() == 0 )
+        return false;
+    struct stat l_stat;
+
+    if (!getStat(&l_stat))
+    {
+       return true;
+    } else
+        return false;
+
+}
+bool
+file::isAbsolute() const
+{
+    if (m_Name.size() > 0 && m_Name[0] == '/')
+        return true;
+    return false;
+}
+
+bool 
+file::getStat(struct stat *_stat) const
+{
+    return stat(m_Name.c_str(),_stat);
+}
+
+const bool 
+file::operator <(const antcc::file &f) const
+{
+    return m_Name.compare(f.m_Name) > 0;
+}
+
+} // end ns
diff --git a/src/os/file.h b/src/os/file.h
new file mode 100644 (file)
index 0000000..69d2f99
--- /dev/null
@@ -0,0 +1,65 @@
+#ifndef __ANTCC_FILE_H__
+#define __ANTCC_FILE_H__
+
+struct stat;
+
+namespace antcc
+{
+  class project;
+  class path;
+/**
+ * @brief provides an OS abstraction for a file.
+ *
+ * 
+ */
+class file {
+    public:
+        /**
+         * Default file value is empty.
+         * the give filename must be the full path.
+         * Relative paths should be rejected
+         */
+        file(const std::string &_name = "") ;
+        
+        file(const file &_f) ;
+
+        virtual ~file() ;
+
+        std::string basename() const;
+        
+        std::string dirname() const;
+
+        void rename(const std::string &_dest);
+        
+        void move(const std::string &_dest,bool keepOrigine = false);
+        /// perfomes copy 
+        void move(const std::string &_dest,bool keepOrigine = false) const;
+        /// Delete file. return true if file exist before remove
+        bool remove()  ;
+
+        path getPath() const;
+        /// Return true if the file exists
+        bool exists() const;
+        /// If file exists and it's directory return true.
+        bool isDir() const;
+        /// If file exists ans it's a regular file return true or else 
+        /// return false
+        bool isRegular() const;
+        /// If file exists, return it's size.
+        size_t size() const;
+        /// 
+        const std::string &name() const;
+
+        const bool operator <(const antcc::file &f) const;
+    private:
+        friend class path;
+        bool getStat(struct stat *_stat) const;
+        /// Checkes if the given filename is an absolute path
+        bool isAbsolute() const;
+    private:
+        std::string m_Name;
+};
+
+
+}
+#endif
diff --git a/src/os/os.h b/src/os/os.h
new file mode 100644 (file)
index 0000000..bcc1410
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef __ANTCC_OS_H__
+#define __ANTCC_OS_H__
+
+namespace antcc
+{
+  
+  class project;
+namespace os 
+{
+/**
+ * @brief this class implements os 
+ * abstraction for basic system operations
+ * like rename,basedir,move copy 
+ *
+ *
+ */
+class os {
+    public:
+        os() {}
+
+        virtual ~os() {};
+
+        std::string basename(const std::string &_file);
+        
+        std::string dirname(const std::string &_file);
+
+        void rename(const std::string &_src,const std::string &_dest);
+
+    private:
+};
+
+}
+}
+#endif
diff --git a/src/os/path.cpp b/src/os/path.cpp
new file mode 100644 (file)
index 0000000..f26eb4f
--- /dev/null
@@ -0,0 +1,122 @@
+#include <antcc/common.h>
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <os/execute.h>
+#include <os/path.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_SYS_UNISTD_H
+#include <sys/unistd.h>
+#endif
+#ifdef HAVE_DIRECT_H
+#include <direct.h>
+#define  mkdir(x,y) _mkdir(x)
+#define  rmdir _rmdir
+#endif
+
+
+namespace antcc
+{
+
+path::path(const std::string &_p)
+  : m_Path(_p)
+{
+}
+
+path::~path()
+{
+}
+/**
+ *
+ */
+bool path::create() const 
+{
+    std::stack<path> l_p;
+    path p(*this);
+    while ( !p.exists() )
+    {
+        l_p.push(p);
+        p = p.getParent();
+    }
+    while (!l_p.empty())
+    {
+        ::mkdir(l_p.top().c_str(),0777);
+        l_p.pop();
+    };
+    return ::mkdir(m_Path.c_str(),0777);
+}
+
+/**
+ * @brief delete directory and 
+ */
+bool path::remove(bool _recurs) const 
+{
+    return ::rmdir(m_Path.c_str());
+}
+
+
+bool path::exists() const 
+{
+    if (m_Path.size() == 0 )
+        return false;
+    struct stat l_stat;
+
+    if (!getStat(&l_stat))
+    {
+       return true;
+    } else
+        return false;
+}
+
+
+bool path::isAbsolute() const
+{
+    if (m_Path.size() > 0 && m_Path[0] == '/')
+        return true;
+    return false;
+}
+
+void 
+path::append(const path &_p)
+
+{
+    if (_p.isAbsolute())
+    {
+        m_Path.append(_p.m_Path);
+    } else
+    {
+        m_Path.append("/"+_p.m_Path);
+    }
+}
+/// append file to path and return the complete file
+file 
+path::append(const file &_p) const
+{
+    if (_p.isAbsolute())
+    {
+        file l_f(m_Path + _p.name());
+        return l_f;
+    } else {
+        file l_f(m_Path + "/" +_p.name());
+        return l_f;
+    }
+}
+
+const bool path::getStat(struct stat *_st) const
+{
+    return ::stat(m_Path.c_str(),_st);
+}
+        
+path 
+path::getParent()
+{
+    file l_f(m_Path);
+    return path(l_f.dirname());
+}
+
+
+} // end ns antcc
diff --git a/src/os/path.h b/src/os/path.h
new file mode 100644 (file)
index 0000000..1aab0f7
--- /dev/null
@@ -0,0 +1,54 @@
+#ifndef __ANTCC_PATH_H__
+#define __ANTCC_PATH_H__
+
+/// native c forward declaration
+struct stat;
+
+namespace antcc
+{
+    class file;
+/**
+ * @brief  
+ *
+ *
+ */
+class path
+{
+    public:
+        /// Default constructor
+        path(const std::string &_name = "") ;
+        
+        path(const  path &_p) : m_Path(_p.m_Path) {} ;
+
+        path &operator =(const antcc::path &_p)  { m_Path = _p.m_Path; return *this; }; 
+
+        virtual ~path() ;
+        /// Create the path if it does not exists
+        bool create() const ;
+        /// Delete path. If subtrees and subfiles exists _recurs must be set to true
+        bool remove(bool _recurs = false) const ;
+
+        /// Check if path physically exists on the file system
+        bool exists() const ;
+
+        ///
+        bool isAbsolute() const;
+        ///
+        const char *c_str() const
+        { return m_Path.c_str(); };
+        ///
+        void append(const path &_p);
+        /// append file to path and return the complete file
+        file append(const file &_p) const;
+        /// return parent path
+        path getParent();
+    private:
+        // bool getStat(struct stat *_st);
+        const bool getStat(struct stat *_st) const;
+    private:
+        std::string m_Path;
+};
+
+
+}
+#endif
diff --git a/src/project.cpp b/src/project.cpp
new file mode 100644 (file)
index 0000000..277b38c
--- /dev/null
@@ -0,0 +1,418 @@
+#include <antcc/common.h>
+#include <tasks/ITaskContainer.h>
+#include <target.h>
+#include <tasks/task.h>
+#include <project.h>
+
+#include <core/graph.h>
+#include <stdarg.h>
+#include <properties/reference_parser.h>
+#include <os/execute.h>
+
+
+namespace antcc
+{
+
+/**
+ * Attributes supported by project
+ */
+xml::element_attributes<project>
+gProjectAttr [] = {
+  {"default",&project::setDefault}
+  , {"basedir",&project::setBasedir}
+  , {"name",&project::setName}
+  , {NULL,NULL}
+}; 
+
+
+project::project()
+  : antElement(antElement::eProject)
+    , m_Basedir(""),m_Default(""),m_Import(false)
+{
+  antcc::os::execute e;
+  m_Basedir = antcc::path(e.getWorkingDir());
+}
+
+
+project::~project()
+{
+    ANTCC_LOG_DEBUG("project as %d targets",m_Targets.size());
+}
+
+///
+void 
+project::setImport(bool _b)
+{
+    m_Import = _b;
+}
+///  handling
+void 
+project::setName(const std::string &_key)
+{
+    ANTCC_LOG_DEBUG("project::%s value %s "
+        ,__FUNCTION__
+        ,_key.c_str());
+}
+
+
+bool project::addAttribute(const std::string &_n,const std::string &val)
+{
+  bool l_ok = false;
+  long l_i  = 0;
+  do
+  {
+    if (gProjectAttr[l_i].m_Name == NULL)
+    {
+      break;
+    }
+    if (! _n.compare(gProjectAttr[l_i].m_Name) )
+    {
+      (this->*gProjectAttr[l_i].m_Setter)(val);
+      l_ok = true;
+      break;
+    }
+  } while (++l_i);
+
+  return l_ok;
+}
+
+///  handling
+void 
+project::setDefault(const std::string &_key)
+{
+    ANTCC_LOG_DEBUG("project::%s value %s "
+        ,__FUNCTION__
+        ,_key.c_str());
+    m_Default = _key;
+}
+
+///  handling
+void 
+project::setBasedir(const std::string &_key)
+{
+    std::string l_val;
+    if ( ! isImport())
+    {
+        if (getProperty("basedir",l_val))
+        {  // basedir attribute in project element. needs to be resolved
+            
+        }
+        setProperty("basedir",_key);
+        m_Basedir = _key;
+    }
+}
+
+/// Well basedir is a path !!! not a string
+bool 
+project::getBasedir(antcc::path &_basedir)
+{
+    ANTCC_LOG_DEBUG("project::%s as %s ",
+       __FUNCTION__
+       ,m_Basedir.c_str());
+    _basedir = m_Basedir;
+    return true;
+}
+
+/// Compute the canonical file name
+std::string 
+project::resolveFile(const std::string &_s)
+{
+    file l_tmp(resolveValue(_s));
+    ANTCC_LOG_DEBUG("project::%s as %s ",
+       __FUNCTION__
+       ,l_tmp.name().c_str());
+    return resolveFile(l_tmp).name();
+}
+
+/// Compute the canonical file name
+file 
+project::resolveFile(const file &_s) 
+{
+    file l_tmp = _s;
+    if (! _s.getPath().isAbsolute())
+    {
+        path l_p = m_Basedir;
+        ANTCC_LOG_DEBUG("project::%s as %s ",
+           __FUNCTION__
+           ,l_p.c_str());
+        return l_p.append(_s);
+
+    } else
+    {
+        ANTCC_LOG_DEBUG("project::%s as is %s ",
+           __FUNCTION__
+           ,_s.name().c_str());
+        return l_tmp;
+    }
+}
+
+void 
+project::addChild(const char *_name,antcc::antElement *_elt)
+{
+    if (_elt && _elt->isTarget())
+    {
+        target *_target = static_cast<target *>(_elt);
+        ANTCC_LOG_DEBUG("%s add %s   %s"
+                ,__FUNCTION__
+                ,_name
+                ,_target->name().c_str());
+        m_Targets[_target->name()] = _target;
+    } else if (_elt && _elt->isTask())
+    {
+        antcc::task *_task = static_cast<antcc::task *>(_elt);
+        // Is this correct ? 
+        _task->execute();
+        //
+        if (! std::string("macrodef").compare(_name))
+        {
+            std::string l_taskname;
+            _task->getResolvedAttribute("name",l_taskname);
+            m_Macros[l_taskname] = _task;
+        } else {
+            // Mabe it's time to get ride of the task.
+            delete _task;
+        }
+    } else if (_elt && _elt->isNone())
+    {
+        ANTCC_LOG_INFO("%s tag none %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        delete _elt;
+    } else if (_elt)
+    {
+        ANTCC_LOG_ERROR("%s tag %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        delete _elt;
+    }
+
+}
+
+int
+project::executeTarget(const std::string &_tn)
+{
+    graph m_G(*this);
+    graph::TargetList_type l_tl;
+    l_tl.resize(getNumTargets());
+    m_G.dfs(_tn,l_tl);
+    
+    int l_return = antcc::task::EXEC_NONE;
+    for (graph::TargetList_const_iterator it = l_tl.begin()
+         ;it != l_tl.end()
+         ;++it)
+    {
+        if (!*it)
+            break;
+        if (( l_return = executeTarget(*it)) == antcc::task::EXEC_FAILED)
+        {
+            break;
+        }
+    }
+    if (l_return != antcc::task::EXEC_FAILED)
+    {
+        log("\nBUILD SUCCESS\n",eINFO);
+    } else {
+        log("\nBUILD FAILED\n",eINFO);
+    }
+
+    return l_return;
+}
+
+int
+project::executeTarget(target *_target)
+{
+    int l_return = antcc::task::EXEC_NONE;
+    if (_target == NULL)
+    {
+        ANTCC_LOG_ERROR("%s  _target is NULL "
+                    ,__FUNCTION__
+                    );
+        return antcc::task::EXEC_FAILED;
+    }
+    ANTCC_LOG_DEBUG("%s   %s"
+                ,__FUNCTION__
+                ,_target->name().c_str());
+    /**/
+    if (l_return != antcc::task::EXEC_FAILED)
+    {
+        log(*_target,std::string("Launch target ").append(_target->name()),eINFO);
+        target::taskList_type &tasks = _target->getTasks();
+        for ( target::taskList_const_iterator it = tasks.begin()
+                ; it != tasks.end()
+                ; ++it)
+        {
+          if ( (l_return = (*it)->execute()) == antcc::task::EXEC_FAILED)
+          {
+              ANTCC_LOG_ERROR("%s execution failed "
+                      ,__FUNCTION__);
+              break;
+          }
+        }
+    }
+    return l_return;
+}
+
+
+int 
+project::executeTargets(targetList_type &_targets)
+{
+    int l_return = antcc::task::EXEC_NONE;
+    for (targetList_const_iterator it = _targets.begin()
+         ;it != _targets.end()
+         ;++it)
+    {
+        if (( l_return = executeTarget(*it)) == antcc::task::EXEC_FAILED)
+        {
+            break;
+        }
+    }
+    return l_return;
+}
+
+target *
+project::getTarget(const char *_name)
+{
+    std::string _default;
+    project::targetsMap_const_iterator it = m_Targets.find(_name);
+
+    if (it != m_Targets.end())
+    {
+        return it->second;
+    }
+    if (m_Default.size() > 0)
+    {
+        targetsMap_const_iterator dit = m_Targets.find(m_Default);
+        if (dit != m_Targets.end())
+        {
+           log(eINFO,"Unkown target %s fallback to default %s",_name,m_Default.c_str());
+            return dit->second;
+        } else {
+           log(eERROR,"Unkown target %s unknown  default %s",_name,m_Default.c_str());
+       }
+    }
+    ANTCC_LOG_ERROR("%s unkown target %s"
+            ,__FUNCTION__
+            ,_name);
+    return nullptr;
+}
+
+task *
+project::getMacro(const char *_name) const
+{
+    std::string _default;
+    project::taskMap_const_iterator it = m_Macros.find(_name);
+
+    if (it != m_Macros.end())
+    {
+        return it->second;
+    }
+    ANTCC_LOG_ERROR("%s  not found found %s"
+                    ,__FUNCTION__
+                    ,_name);
+    return nullptr;
+}
+/// Property handling
+void 
+project::setProperty(const std::string &_key,const std::string &_val)
+{
+    ANTCC_LOG_DEBUG("project::%s set property name=<%s> value = <%s>"
+            ,__FUNCTION__
+            ,_key.c_str()
+            ,_val.c_str());
+    m_Properties[_key] = _val;
+}
+
+bool 
+project::getProperty(const std::string &_key,std::string &_ret)
+{
+
+    propertyMap_const_iterator it = m_Properties.find(_key);
+    if (it  != m_Properties.end())
+    {
+        _ret = it->second;
+        return true;
+    }
+    return false;
+}
+
+
+/// Logging methods to centralize log display
+#define LOG_BUFFER_SIZE 1024
+void 
+project::log(const std::string &_msg,int _level)
+{
+    std::cout<<"project::log-> "<<_msg<<std::endl;
+}
+
+void 
+project::log(int _level,const char *fmt,...)
+{
+  static char logBuffer[LOG_BUFFER_SIZE];
+  va_list args;
+  va_start(args,fmt);
+  vsnprintf(logBuffer,LOG_BUFFER_SIZE,fmt,args);
+  va_end(args);
+  //if (_level <= gLogLevel)
+  std::cout<<"project::log-> "<<logBuffer<<std::endl;
+}
+
+
+void 
+project::log(target &_p,const std::string &_msg,int _level )
+{
+    std::cout<<"**\n* "<<_msg<<"\n**"<<std::endl;
+}
+
+void 
+project::log(task   &_t,int _level,const std::string &_msg )
+{
+    Location l = _t.getLocation();
+    std::cout<<l.m_Line<<":\t["<<_t.getName()<<"] "<<_msg<<std::endl;
+}
+
+void 
+project::log(task &_t,int _level,const char *fmt,...)
+{
+  static char logBuffer[LOG_BUFFER_SIZE];
+  Location l = _t.getLocation();
+  va_list args;
+  va_start(args,fmt);
+  vsnprintf(logBuffer,LOG_BUFFER_SIZE,fmt,args);
+  va_end(args);
+  //if (_level <= gLogLevel)
+  std::cout<<""<<l.m_Line<<":\t["<<_t.getName()<<"] "<<logBuffer<<std::endl;
+  //log(_t,_level,logBuffer);
+}
+
+std::string 
+project::resolveValue(const std::string &_str)
+{
+    std::string l_value;
+    antcc::prop::parser resolver(*this);
+    l_value = resolver.resolve(_str);
+   return l_value;
+}
+
+project::targetsMap_type &
+project::getTargets()
+{
+    return m_Targets;
+}
+
+size_t 
+project::getNumTargets() const
+{
+    return m_Targets.size();
+}
+
+void
+project::setDescription(const std::string &_s)
+{
+    m_Description = _s;
+}
+
+}
+
+/* vim:et:sw=4:rs=4:list:*/
diff --git a/src/project.h b/src/project.h
new file mode 100644 (file)
index 0000000..2dc9454
--- /dev/null
@@ -0,0 +1,101 @@
+#ifndef __ANTCC_PROJECT_H__
+#define __ANTCC_PROJECT_H__
+
+namespace antcc
+{
+  class path;
+  class file;
+  class graph;
+  class antcall;
+/**
+ * @brief top level object for a build project.
+ * provides the required services to execute a target, 
+ * store properties and so on.
+ *
+ */
+class project : public antcc::antElement
+{
+    public:
+        typedef std::unordered_map<std::string,antcc::target *> targetsMap_type;
+        typedef std::unordered_map<std::string,antcc::target *>::const_iterator  targetsMap_const_iterator;
+        
+       typedef std::unordered_map<std::string,antcc::task *> taskMap_type;
+        typedef std::unordered_map<std::string,antcc::task *>::const_iterator  taskMap_const_iterator;
+
+        typedef std::unordered_map<std::string,std::string > propertyMap_type;
+        typedef std::unordered_map<std::string,std::string >::const_iterator  propertyMap_const_iterator;
+        typedef std::unordered_map<std::string,std::string >::iterator        propertyMap_iterator;
+        
+
+        typedef std::vector<target *> targetList_type;
+        typedef std::vector<target *>::const_iterator  targetList_const_iterator;
+        /// Main constructor
+       project();
+        /// default destructor
+        virtual ~project();
+        /// Used by the SAX parser to notify child elements 
+        virtual void addChild(const char *_name,antcc::antElement *_elt);
+       /// Used by SAX parser to notify project attributes
+        virtual bool addAttribute(const std::string &_n,const std::string &val);
+        /// Create the required structure to build the project in the right order
+        int executeTarget(const std::string &_target);
+        /// Return the target for a given name
+        target *getTarget(const char *_name);
+        /// Return the macro definition for a given macro name
+        task *getMacro(const char *_name) const;
+        /// !! antElement has setName(const char *)
+        void setName(const std::string &_v);
+        /// 
+        void setDefault(const std::string &_val);
+        ///  handling
+        void setBasedir(const std::string &_key);
+        /// Well basedir is a path !!! not a string
+        bool getBasedir(antcc::path &_basedir);
+        /// Property handling
+        void setProperty(const std::string &_key,const std::string &_val);
+        /// Retrieved a property value. If not found return false
+        bool getProperty(const std::string &_key,std::string &_ret);
+        /// Set the project description
+        void setDescription(const std::string &_s);
+        /// Logging methods to centralize log display
+        void log(const std::string &_msg,int _level = eINFO);
+        /// Variadic logging function version 
+        void log(int _level,const char *fmt,...);
+        /// Log messages from targets 
+        void log(target &_p,const std::string &_msg,int _level );
+        /// Log messages from tasks
+        void log(task   &_t,int _level,const std::string &_msg );
+        /// Variadic logging function version for tasks
+        void log(task   &_t,int _level,const char *fmt,... );
+        /// resolves ${} in property
+        std::string resolveValue(const std::string &_s) ;
+        /// Compute the canolical file name
+        std::string resolveFile(const std::string &_s) ;
+        /// Compute the canolical file name
+        file resolveFile(const file &_s) ;
+        /// Needs to be improved. I should also provide the import name
+        void setImport(bool _b);
+        ///
+        inline const bool isImport() const
+        { return m_Import; }
+    private:
+        friend class antcall;
+        int executeTarget(target *);
+        int executeTargets(targetList_type &_targets);
+    protected:
+        friend class graph;
+        friend class Antcc;
+        targetsMap_type &getTargets();
+        size_t           getNumTargets() const;
+        targetsMap_type  m_Targets;
+    private:
+        propertyMap_type m_Properties;
+        taskMap_type     m_Macros;
+        antcc::path      m_Basedir;
+        std::string      m_Default;
+        std::string      m_Description;
+       bool             m_Import;
+};
+
+}
+#endif
diff --git a/src/projectComponent.cpp b/src/projectComponent.cpp
new file mode 100644 (file)
index 0000000..240acf7
--- /dev/null
@@ -0,0 +1,117 @@
+#include <antcc/common.h>
+#include <string>
+
+#include <tasks/ITaskContainer.h>
+#include <target.h>
+#include <tasks/task.h>
+
+#include <algorithm>
+#include <properties/reference_parser.h>
+
+
+namespace antcc {
+
+
+projectComponent::projectComponent(int _type)
+               : antElement(_type), m_Project(NULL),m_Location(NULL,0,0)
+{}
+
+projectComponent::projectComponent(const projectComponent &_c) 
+: antElement(_c), m_Project(_c.m_Project),m_Location(_c.m_Location)
+{}
+
+void 
+projectComponent::addChild(const char *_name,antcc::antElement *_task)  
+{
+    ANTCC_LOG_ERROR("%s not implemented %s",__FUNCTION__,_name);
+}
+
+void 
+projectComponent::setLocation(const Location &_loc) 
+{
+    m_Location = _loc;
+}
+
+
+Location 
+projectComponent::getLocation() const 
+{
+    return m_Location;
+}
+
+
+void 
+projectComponent::setProject(antcc::project *_project)
+{
+    m_Project = _project;
+}
+
+
+antcc::project &
+projectComponent::getProject() const 
+{
+    if (m_Project == NULL)
+    {
+        ANTCC_LOG_ERROR("%s m_Project == NULL very bad"
+                ,__FUNCTION__);
+    }
+    return *m_Project;
+}
+
+bool 
+projectComponent::getResolvedAttribute(const std::string _name,std::string &_value) const
+{
+    std::string l_attr;
+    if (getAttribute(_name,l_attr) ) 
+    {
+        antcc::prop::parser resolver(getProject());
+        _value = resolver.resolve(l_attr);
+        return true;
+    } else {
+        return false;
+    }
+
+}
+
+bool 
+projectComponent::getResolvedAttribute(const std::string _name,bool &_value) const
+{
+    std::string l_prop;
+    bool ret = false;
+    if ( ret  = getResolvedAttribute(_name,l_prop))
+    {
+        if (l_prop.size() > 1)
+        { // Most likely true or false
+
+            std::transform(l_prop.begin(),l_prop.end(),l_prop.begin(),toupper);
+            if (!l_prop.compare("TRUE"))
+            {
+                _value = true;
+            } else
+            {
+                _value = false;
+            }
+
+        } else 
+        { // I guess it's set to 0 or 1
+          long l = atol(l_prop.c_str());
+          if (l != 0 ) 
+          {
+              _value = true;
+          } else 
+          {
+              _value = false;
+          }
+        }
+    }
+    return ret;
+}
+
+bool 
+projectComponent::getResolvedAttribute(const std::string _name,long &_value) const
+{
+    return false;
+}
+
+
+}
diff --git a/src/projectComponent.h b/src/projectComponent.h
new file mode 100644 (file)
index 0000000..2216c39
--- /dev/null
@@ -0,0 +1,46 @@
+#ifndef __PROJECT_COMPONENT_H__
+#define __PROJECT_COMPONENT_H__
+
+namespace antcc {
+    struct Location;
+    class project;
+/**
+ * @brief all elements that are part of the project inherit from this class
+ *
+ */
+class projectComponent : public antcc::antElement
+{
+    public:
+        
+        projectComponent(int _type) ;
+        
+        projectComponent(const projectComponent &) ;
+        /// general entry point used by the SAX parser to add child elements
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+        
+        virtual void setLocation(const Location &_loc) ;
+
+        Location getLocation() const ;
+        /// set the project the component is part of.
+        void setProject(antcc::project *_project);
+        /// retrieve the project the component is part of.
+        antcc::project &getProject() const ;
+    protected:
+        friend project;
+        /**
+         * @brief retrived attribute from antElement list.
+         * depending on the task implementation, attributes
+         * might no be stored in the list. In that case the call will fail.
+         * @return true if attribute was found
+         */
+        bool getResolvedAttribute(const std::string _name,std::string &_value) const;
+        bool getResolvedAttribute(const std::string _name,bool &_value) const;
+        bool getResolvedAttribute(const std::string _name,long &_value) const;
+    private:
+        project   *m_Project;
+        Location  m_Location;
+};
+
+}
+#endif
+/* vim:et:sw=4:list: */
diff --git a/src/properties/CMakeLists.txt b/src/properties/CMakeLists.txt
new file mode 100644 (file)
index 0000000..cf7226f
--- /dev/null
@@ -0,0 +1,36 @@
+PROJECT(propertylib)
+
+INCLUDE(${rules_SOURCE_DIR}/flex.cmake)
+
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../)
+
+
+INCLUDE_DIRECTORIES(${aebutils_SOURCE_DIR})
+# For option...
+INCLUDE_DIRECTORIES(${aebutils_SOURCE_DIR}/aeb)
+    
+FLEXGEN(SOURCE reference.l OUTPUT ref_l.cpp OPTS -R )
+BISONGEN(reference.y ref_y.cpp cpp)
+
+ADD_LIBRARY(propertylib
+    reference_parser.cpp 
+    property_file.cpp
+    ${CMAKE_CURRENT_BINARY_DIR}/ref_l.cpp
+    ${CMAKE_CURRENT_BINARY_DIR}/ref_y.cpp
+    ) 
+
+ADD_EXECUTABLE(test_prop_parser
+    reference_parser.cpp 
+    ${CMAKE_CURRENT_BINARY_DIR}/ref_y.cpp
+    ${CMAKE_CURRENT_BINARY_DIR}/ref_l.cpp
+)
+
+TARGET_LINK_LIBRARIES(test_prop_parser libantcc_parser libantcc_cond libantcc ${EXPAT_LIBRARY})
+SET_TARGET_PROPERTIES(test_prop_parser
+      PROPERTIES
+      CLEAN_DIRECT_OUTPUT 1
+      COMPILE_FLAGS "-DDEBUG -DPARSER_DEBUG=1 -DTEST_REFERENCE_MAIN"
+    )
diff --git a/src/properties/property_file.cpp b/src/properties/property_file.cpp
new file mode 100644 (file)
index 0000000..7b83353
--- /dev/null
@@ -0,0 +1,52 @@
+#include <antcc/common.h>
+#include <fstream>
+#include <unordered_map>
+
+#include <properties/property_file.h>
+
+namespace antcc {
+namespace prop {
+
+/**
+ *
+ *
+ */
+file::file(project &_p,const std::string &_pf)
+     : m_Project(_p), m_Filename(_pf)
+{
+    process();
+}
+/**
+ *
+ *
+ */
+file::~file()
+{
+}
+
+void 
+file::process()
+{
+    std::ifstream l_in(m_Filename);
+    std::string  l_line;
+    ANTCC_LOG_DEBUG("setProperty enter: %s"
+                        ,m_Filename.c_str()
+                        );
+
+    while (std::getline(l_in,l_line,'\n'))
+    {
+        size_t       pos = l_line.find("=");
+        ANTCC_LOG_DEBUG("setProperty line : %s = is at %d"
+                        ,l_line.c_str()
+                        ,pos);
+        std::string  l_name(l_line.substr(0,pos));
+        std::string  l_value(l_line.substr(pos+1,l_line.size()-1));
+        m_Project.setProperty(l_name,l_value);
+    }
+    l_in.close();
+}
+
+}
+}       
+/* :vim:et:sw=4:ts=4:list: */
+
diff --git a/src/properties/property_file.h b/src/properties/property_file.h
new file mode 100644 (file)
index 0000000..9768dba
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __PROPERTY_FILE_H__
+#define __PROPERTY_FILE_H__
+
+namespace antcc {
+namespace prop  {
+
+class file 
+{
+    private:
+        file(const file &f) : m_Project(f.m_Project) , m_Filename(f.m_Filename) {}
+    public:
+
+        file(antcc::project &_p,const std::string &_pf);
+        virtual ~file() ;
+    private:
+        void process();
+    private:
+        antcc::project &m_Project;
+        std::string    m_Filename;
+};
+
+
+}
+}
+/* :vim:et:sw=4:ts=4:list: */
+#endif
diff --git a/src/properties/reference.l b/src/properties/reference.l
new file mode 100644 (file)
index 0000000..500b410
--- /dev/null
@@ -0,0 +1,144 @@
+%{
+#include <stdio.h>
+#ifdef _WIN32
+#include <io.h>
+#define isatty _isatty
+#endif
+#include <vector>
+#include <list>
+#include <map>
+#include <string>
+
+// #include <reference_parser.h>
+
+namespace antcc {
+namespace prop {
+class parser;
+} }
+extern int g_ref_debug;
+
+typedef  union
+{
+  char *                string;
+  std::string *         std_string;
+} YYSTYPE;
+
+#define YY_EXTRA_TYPE antcc::prop::parser *
+#define YYSTYPE_IS_DECLARED 1
+#define YY_DECL int ref_lex(YYSTYPE *yylval_param,yyscan_t yyscanner,antcc::prop::parser *p)
+extern int ref_yyinput(antcc::prop::parser *,char *buf,int max_size);
+
+
+#include <ref_y.hpp>
+
+#undef  YY_INPUT
+#define YY_INPUT(b,r,ms) {   \
+  r = ref_yyinput(yyget_extra(yyg),b,ms) ;    \
+}  
+
+//#define DEBUG
+//   yylval->string = new AST::StringLiteral(yytext,NULL);    
+#ifdef DEBUG
+#define TOK(x) { /*fprintf(stderr,"lex:"#x"  \'%s\'\n", yytext);*/ \
+                 yyset_column(yyget_column(yyg) + strlen(yytext),yyg); \
+                 return x; }
+#define STR_TOK(x) {                                          \
+        yylval->string = yytext;    \
+        yyset_column(yyget_column(yyg) + strlen(yylval->string),yyg); \
+        return x;                                              \
+     }                                      
+#define CHAINE_TOK(x) { AST::StringLiteral *s = new AST::StringLiteral(string_begin,NULL); \
+                        yylval->expr = s;                                                  \
+                        s->isConstantArray = true; return x; }
+
+#define NUM_TOK(x) { yylval->num = atol(yytext); return x; }
+#else
+// Release 
+#define TOK(x) { return x; }
+#define STR_TOK(x) { yylval->string = yytext;                     \
+  yyset_column(yyget_column(yyg) + strlen(yylval->string),yyg);   \
+  return x;                                                       \
+  }
+#define CHAINE_TOK(x) { AST::StringLiteral *s = new AST::StringLiteral(string_begin,NULL); \
+                        yylval->expr = s;                                                  \
+                        s->isConstantArray = true; return x; }
+#define NUM_TOK(x) { yylval->num = atol(yytext); return x; }
+#endif
+
+void ref_error(yyscan_t scanner,antcc::prop::parser *p,const char *f);
+
+
+extern "C" int ref_wrap(yyscan_t scanner)
+{
+    return 1;
+}
+%}
+
+%option prefix="ref_"
+%option stack
+%option yylineno
+%option reentrant bison-bridge
+
+%pointer
+
+%x CHARSTRING
+%x FUNCTION 
+
+
+letter [a-zA-Z]
+digit  [0-9]
+signe "]"|"~"|"\\"|";"|"&"|"!"|"["|"\'"|"\""|"^"|"?"|"\|"|"/"|":"|"<"|">"|"("|")"|"="|"@"
+chaine          [a-zA-Z0-9\._\-]*
+chainesp        [a-zA-Z0-9_]*
+minus   "-"
+dot     "."
+virgule ","
+nl      \n
+tab     \t
+space   " "
+sharp   "#"
+star    "*"
+slash   "/"
+dollar  "$"
+chainems {chaine}|{minus}|{star}
+integer_name {digit}*
+float_name   {digit}.*{dot}{digit}*
+ref_begin "${"
+lref_begin "@{"
+ref_end   "}"
+
+
+
+%%
+
+{ref_begin}"if "           TOK(T_IF)  
+{ref_begin}"not "          TOK(T_NOT)  
+{ref_begin}"or "           TOK(T_OR)  
+{ref_begin}"and "          TOK(T_AND)  
+{ref_begin}"filter "       TOK(T_FILTER)  
+{ref_begin}"filter-out "   TOK(T_FILTER_OUT)  
+{ref_begin}                TOK(T_REF_BEGIN)
+{lref_begin}               TOK(T_LOCAL_REF_BEGIN)
+{ref_end}                  TOK(T_REF_END)
+
+
+{chaine}          STR_TOK(T_WORD)
+
+{chaine}|{signe}    STR_TOK(T_CHAINE)
+{nl}|{tab}|{space}  STR_TOK(T_SPACE)
+
+{virgule}           TOK(T_VIRGULE)
+{dollar}            STR_TOK(T_CHAINE)
+
+%{
+  /* FUNCTION State*/
+%}
+
+
+%%
+
+void ref_error(yyscan_t scanner,antcc::prop::parser *p,const char *f)
+{
+  printf("ref_errorx(%d.%d) %s\n",yyget_lineno(scanner),yyget_column(scanner),f);
+  // exit(1);
+};
diff --git a/src/properties/reference.y b/src/properties/reference.y
new file mode 100644 (file)
index 0000000..3fb449f
--- /dev/null
@@ -0,0 +1,314 @@
+%{
+#include <iostream>
+#include <sstream>
+#include <fstream>
+#include <cstdio>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#ifndef __APPLE__
+#include <malloc.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <algorithm>
+
+#include <cstdlib>
+
+#include <vector>
+#include <list>
+#include <map>
+#include <stack>
+
+#include <antcc/config.h>
+#include <os/path.h>
+#include <os/file.h>
+#include <logger.h>
+#include <location.h>
+#include <xml/parser/ant_elements.h>
+#include <xml/parser/ant_element_factory.h>
+#include <project.h>
+#include <projectComponent.h>
+#include <reference_parser.h>
+
+#include <tasks/condition/ICondition.h>
+#include <tasks/condition/not.h>
+#include <tasks/condition/or.h>
+#include <tasks/condition/and.h>
+#include <tasks/condition/isSet.h>
+
+extern int g_ref_debug;
+/* Also defined in sdl.l*/
+typedef  union
+{
+  char                         *string;
+  std::string                  *std_string;
+  antcc::condition::ICondition *cond;
+} YYSTYPE;
+
+typedef void *yyscan_t;
+
+#define YYSTYPE_IS_DECLARED 1
+extern  int ref_lineno;
+extern void ref_error(yyscan_t scanner,antcc::prop::parser *,const char *f);
+extern int  ref_lex(YYSTYPE *yylval_param,yyscan_t scanner,antcc::prop::parser *);
+
+
+/*
+%define api.pure  true
+*/
+%}
+
+%union {
+    char                         *string;
+    std::string                  *std_string;
+    antcc::condition::ICondition *cond;
+}
+
+
+%token T_REF_BEGIN
+%token T_LOCAL_REF_BEGIN
+%token T_REF_END
+%token T_CHAINE
+%token T_WORD
+%token T_SPACE
+%token T_VIRGULE
+
+%token T_IF
+%token T_OR
+%token T_AND
+%token T_NOT
+%token T_ISSET
+%token T_EMPTY
+%token T_FILTER
+%token T_FILTER_OUT
+
+%type <std_string> reference fragment_ref local_ref
+%type <std_string> chaine  phrase 
+%type <string>     T_CHAINE T_WORD T_SPACE
+%type <cond>       function function_if function_or function_not function_and function_isset
+%type <cond>       parameter
+%name-prefix="ref_"
+
+%pure-parser
+%lex-param   {yyscan_t *scanner } {antcc::prop::parser *p}
+%parse-param {yyscan_t scanner }  {antcc::prop::parser *p}
+
+%%
+
+
+
+value: /* empty */ 
+    phrase {
+        p->setResult(*$1);
+        delete $1;
+    }
+    | function {
+        antcc::condition::ICondition::Result _result;
+        if ($1 && $1->eval(_result) )
+        {
+            std::cout<<"TODO function yes:"<<_result.m_Str<<std::endl;
+        } else {
+            std::cout<<"TODO function no:"<<_result.m_Str<<std::endl;
+
+        }
+        p->setResult("");
+    }
+;
+
+reference: T_REF_BEGIN  fragment_ref T_REF_END  {
+         std::string _result;
+         p->lookup(*$2,_result);
+         *$2 = _result;
+         $$ = $2;
+    }
+;
+
+local_ref: T_LOCAL_REF_BEGIN  fragment_ref T_REF_END  {
+         std::string _result;
+         (*$2).insert(0,"@{"); (*$2).append("}");
+         $$ = $2;
+    }
+;
+
+phrase: /* empty */ {
+      $$ = new std::string("");
+    }
+    | phrase chaine {
+      $1->append(*$2);  
+    }
+    | phrase T_SPACE {
+      std::string _result($2);
+      $1->append(  _result);
+    }
+    | phrase reference {
+      $1->append(*$2);  
+    }
+    | phrase local_ref {
+      $1->append(*$2);  
+    }
+;
+
+
+fragment_ref: chaine {
+        $$ = $1;
+    }
+    | T_SPACE {
+      $$ = new std::string($1);
+    }
+    | chaine reference {
+      $1->append(*$2);  
+      $$ = $1;
+    }
+    | reference chaine {
+      $1->append(*$2);  
+      $$ = $1;
+    }
+    | local_ref chaine {
+      $1->append(*$2);  
+      $$ = $1;
+    }
+    | fragment_ref chaine  {
+      $1->append(*$2);  
+      $$ = $1;
+    }
+    | fragment_ref T_SPACE  {
+      $1->append($2);  
+      $$ = $1;
+    }
+    | fragment_ref reference  {
+      $1->append(*$2);  
+      $$ = $1;
+    }
+    | fragment_ref local_ref  {
+      $1->append(*$2);  
+      $$ = $1;
+    }
+    |  reference {
+        $$ = $1;
+    }
+    | local_ref {
+        $$ = $1;
+    }
+;
+
+
+function: function_if {
+    }
+    | function_not {
+    }
+    | function_or {
+    }
+    | function_and {
+    }
+    | function_isset {
+    }
+    | function_filter {
+    }
+    | function_filter_out {
+    }
+;
+
+function_if: T_IF  {
+        antcc::condition::condition_not *_cond = new
+            antcc::condition::condition_not(NULL);
+        p->cond_Start( _cond);
+        std::cout<<"function_if :" <<std::endl;
+    } three_parameters T_REF_END {
+        $$ = p->cond_End();
+    }
+;
+function_isset: T_ISSET parameter T_REF_END {
+        std::cout<<"function_isset:"<<std::endl;
+        $<cond>$ = $2;
+    }
+;
+
+
+function_not: T_NOT function T_REF_END {
+        antcc::condition::condition_not *_cond = new
+            antcc::condition::condition_not($2);
+        $$ = _cond;
+    }
+;
+
+function_or: T_OR { 
+        antcc::condition::condition_or *_cond = new
+            antcc::condition::condition_or();
+        $<cond>$ = _cond;
+        p->cond_Start( _cond);
+        std::cout<<"function_or:"<<std::endl;
+    } parameters T_REF_END {
+        $$ = p->cond_End();
+        $$ = $<cond>2;
+    }
+;
+
+function_and: T_AND {
+        antcc::condition::condition_and *_cond = new
+            antcc::condition::condition_and();
+        p->cond_Start( _cond);
+        $<cond>$ = _cond;
+    } parameters T_REF_END {
+        $$ = p->cond_End();
+        $$ = $<cond>2;
+    }
+;
+
+function_filter: T_FILTER three_parameters T_REF_END {
+        $<cond>$ = NULL;
+    }
+;
+
+function_filter_out: T_FILTER_OUT three_parameters T_REF_END {
+        $<cond>$ = NULL;
+    }
+;
+
+parameters: parameter {
+        p->cond_Parameter($1);
+    }
+    | parameters T_VIRGULE parameter {
+        p->cond_Parameter($3);
+}
+;
+
+three_parameters: parameter T_VIRGULE parameter T_VIRGULE parameter {
+       p->cond_Parameter($1);
+       p->cond_Parameter($3);
+       p->cond_Parameter($5);
+}
+
+parameter: reference {
+        if ((*$1)[0] == '$') 
+        {
+            antcc::condition::isSet *_cond = new
+                    antcc::condition::isSet("");
+            $<cond>$ = _cond;
+        } else {
+            antcc::condition::isSet *_cond = new
+                    antcc::condition::isSet(*$1);
+            $<cond>$ = _cond;
+            delete $1;
+        }
+    }
+    | chaine {
+        antcc::condition::isSet *_cond = new
+                antcc::condition::isSet(*$1);
+        $<cond>$ = _cond;
+        delete $1;
+    }
+    |local_ref {
+        std::cout<<"parameter local ref :"<<*$1<<std::endl;
+}
+;
+
+chaine: T_CHAINE {
+      $$ = new std::string($1);
+    }
+    | T_WORD {
+      $$ = new std::string($1);
+}
+;
+
diff --git a/src/properties/reference_parser.cpp b/src/properties/reference_parser.cpp
new file mode 100644 (file)
index 0000000..df0f4b1
--- /dev/null
@@ -0,0 +1,140 @@
+#include <antcc/common.h>
+#include <stack>
+#include <string.h>
+#include <reference_parser.h>
+
+#include <tasks/condition/ICondition.h>
+
+/* The signature of these functions depends on 
+ * the version of lex and bison
+ **/
+#ifdef _WIN32
+extern  int  ref_parse(yyscan_t scanner,antcc::prop::parser*p);
+//int ref_yyinput(antcc::prop::parser *p,char *buf,int max_size);
+extern  int ref_lex_init_extra(antcc::prop::parser *,yyscan_t *scanner);
+extern  int ref_lex_destroy(yyscan_t scanner);
+#else
+extern  void  ref_parse(yyscan_t scanner,antcc::prop::parser*p);
+//int ref_yyinput(antcc::prop::parser *p,char *buf,int max_size);
+extern void ref_lex_init_extra(antcc::prop::parser *,yyscan_t *scanner);
+extern void ref_lex_destroy(yyscan_t scanner);
+#endif
+
+namespace antcc {
+namespace prop {
+
+parser::parser(project &_p)
+    : m_Project(_p)
+{
+}
+
+parser::parser(const parser  &_p)
+    : m_Project(_p.m_Project)
+{
+}
+
+parser::~parser()
+{
+}
+void 
+parser::cond_Start(::antcc::condition::ICondition *_cond)
+{
+    m_Conditions.push(_cond);
+}
+void 
+parser::cond_Parameter(::antcc::condition::ICondition *_cond)
+{
+    m_Conditions.top()->add(_cond);
+}
+
+::antcc::condition::ICondition *
+parser::cond_End()
+{
+    antcc::condition::ICondition *l_c = m_Conditions.top();
+    m_Conditions.pop();
+    return l_c;
+}
+        
+bool 
+parser::lookup(const std::string &_ref,std::string &_result)
+{
+    if (! m_Project.getProperty(_ref,_result))
+    {
+        _result = "${"+_ref+"}";
+        ANTCC_LOG_DEBUG("parser::%s could not find property %s"
+                        ,__FUNCTION__
+                        ,_result.c_str());
+        return false;
+    }
+    return true;
+}
+
+
+std::string 
+parser::resolve(const std::string &s)
+{
+    yyscan_t scanner;
+
+    setString(s);
+    ref_lex_init_extra(this,&scanner);
+    ref_parse(scanner,this);
+    ref_lex_destroy(scanner);
+    return m_StringResult;
+}
+
+}
+}
+
+
+/**
+ * @brief thread safe reference parsing.
+ */
+int ref_yyinput(antcc::prop::parser *p,char *buf,int max_size)
+{
+    if (p == NULL)
+    {
+        return 0;
+    }
+    size_t reste = p->getStringSize() - p->getRead();
+    size_t num   = (max_size < reste ? max_size : reste);
+    if (num > 0)
+    {
+        memcpy(buf,p->getString() + p->getRead() ,num);
+        p->setRead(p->getRead()+num);
+    } 
+    return num;
+}
+
+#ifdef TEST_REFERENCE_MAIN
+
+int main(int argc,char **argv)
+{
+    antcc::project _project;
+    antcc::prop::parser p(_project);
+
+    _project.setProperty("toto","p1");
+    _project.setProperty("test","p2");
+    _project.setProperty("p1_toto","complex");
+    _project.setProperty("p2_toto","simplex");
+    //_project.setProperty("clearEeprom","simplex");
+    std::string s("${toto}");
+    std::string s1("toto");
+    p.resolve(s) ;
+    p.resolve(s1);
+    p.resolve("test_${toto}");
+    p.resolve("${toto}_test");
+    std::cout<<p.resolve("${${test}_toto}")<<std::endl;
+    std::cout<<p.resolve("Une phrase avec une ${toto} voir deux ${${test}_toto} reference\net un retour de ligne")<<std::endl;
+    std::cout<<p.resolve("a ${toto} p")<<std::endl;
+    p.resolve("-f HEX");
+    std::cout<<p.resolve("-si-revision")<<std::endl;
+    p.resolve("0.5");
+    p.resolve("15");
+    p.resolve("${clearEeprom} -b Flash -f HEX -Width 16 -o ${clearEeprom.ldrfile} -si-revision 0.5 -proc ADSP-BF533");
+    std::cout<<p.resolve("${if -si-revision,${toto},${test}}")<<std::endl;
+    std::cout<<p.resolve("${or ${toto},${test}}")<<std::endl;
+    std::cout<<p.resolve("${or ${env.ANTCC},${toto}}")<<std::endl;
+    std::cout<<p.resolve("${and ${p1_toto},${${test}_toto}}")<<std::endl;
+    std::cout<<"END test"<<std::endl;
+}
+#endif
diff --git a/src/properties/reference_parser.h b/src/properties/reference_parser.h
new file mode 100644 (file)
index 0000000..cb13a84
--- /dev/null
@@ -0,0 +1,72 @@
+#ifndef __REFERENCE_PARSER_H__
+#define __REFERENCE_PARSER_H__
+
+namespace antcc {
+    namespace prop {
+      class parser;
+    } 
+    namespace condition {
+        class ICondition;
+    }
+}
+typedef void *yyscan_t;
+//void ref_parse(yyscan_t scanner,antcc::prop::parser *p);
+int ref_yyinput(::antcc::prop::parser *p,char *buf,int max_size);
+
+namespace antcc {
+namespace prop {
+
+class parser 
+{
+    public:
+        parser(project &_p);
+        
+        parser(const parser &_p);
+        
+        virtual ~parser();
+
+        std::string resolve(const std::string &s);
+
+        /// return when property is found and result is in result
+        bool lookup(const std::string &_ref,std::string &_result) ;
+    // Does not work 
+        //friend void ref_parse(yyscan_t scanner,antcc::prop::parser *p);
+        friend int  ref_yyinput(::antcc::prop::parser *p,char *buf,int max_size)  ;
+
+    // protected:
+        /* functions called by bison / flex */
+        const char *getString() const 
+        { return m_StringToParse.c_str();     };
+
+        size_t getStringSize() const 
+        { return m_StringToParse.size();      };
+
+        void setRead(int _r) { m_Read = _r;   };
+
+        int  getRead() const { return m_Read; };
+
+        void setResult(const std::string &_r)
+        { m_StringResult = _r;                };
+
+        project &getProject() 
+        { return m_Project; }
+
+        void cond_Start(::antcc::condition::ICondition *);
+        void cond_Parameter(::antcc::condition::ICondition *);
+        antcc::condition::ICondition *cond_End();
+    protected:
+        void setString(const std::string &_s)
+        { m_StringToParse = _s; m_Read = 0;   };
+    private:
+        std::stack<::antcc::condition::ICondition *>  m_Conditions;
+        std::string m_StringToParse;
+        std::string m_StringResult;
+        int         m_Read;
+        project    &m_Project;
+};
+
+} //  end ns prop
+} //  end ns antcc
+
+#endif
+/* vim:et:sw=4:list: */
diff --git a/src/target.cpp b/src/target.cpp
new file mode 100644 (file)
index 0000000..8286767
--- /dev/null
@@ -0,0 +1,128 @@
+#include <antcc/common.h>
+#include <list>
+#include <sstream>
+#include <tasks/ITaskContainer.h>
+#include <target.h>
+
+namespace antcc 
+{
+
+/**
+ * Attributes supported by project
+ */
+xml::element_attributes<target> target::gAttr[] =
+{
+{"name",&target::setDefault}
+,{"if",&target::setIf}
+,{"unless",&target::setUnless}
+,{"depends",&target::setDepends}
+,{NULL,NULL}
+};
+
+
+target::target()
+  : projectComponent(antElement::eTarget)
+  , m_Status(eNone)
+{
+}
+
+target::~target()
+{
+}
+
+std::string 
+target::name() const
+{
+    std::string _str;
+    if ( !getAttribute("name",_str))
+    {
+        ANTCC_LOG_ERROR("target::%s no name !!!"
+                ,__FUNCTION__
+                );
+    }
+    return _str;
+}
+
+void 
+target::addChild(const char *_name,antcc::antElement *_elt)
+{
+    if (_elt && _elt->isTask())
+    {
+        antcc::task *_task = static_cast<antcc::task *>(_elt);
+        ANTCC_LOG_DEBUG("target(%s)::%s  add task %s _elt=%0x"
+                ,name().c_str()
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        addTask(_task);
+    } else 
+    {
+        ANTCC_LOG_DEBUG("%s tag %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+    }
+}
+
+void 
+target::addTask(task *_task)
+{
+    _task->setOwningTarget(this);
+    _task->setProject(&getProject());
+    m_Tasks.push_back(_task);
+}
+        
+target::dependList_type &
+target::getDependencies()
+{
+    if (m_Depends.empty())
+    {
+        std::string depends;
+        if (getAttribute("depends",depends))
+        {
+            setDepends(depends);
+        }
+    }
+    return m_Depends;
+}
+
+bool 
+target::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<target>(this,target::gAttr,_name,_v)) == true)
+    {
+        antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+/* Setters */
+void
+target::setDefault(const std::string &s) 
+{
+}
+
+void
+target::setIf(const std::string &s) 
+{
+}
+
+void
+target::setUnless(const std::string &s) 
+{
+}
+
+void
+target::setDepends(const std::string &_depends)
+{
+    std::stringstream ss(_depends);
+    while (ss.good())
+    {
+        std::string str;
+        std::getline(ss,str,',');
+        m_Depends.push_back(str);
+    }
+}
+
+}
diff --git a/src/target.h b/src/target.h
new file mode 100644 (file)
index 0000000..34c1dd7
--- /dev/null
@@ -0,0 +1,75 @@
+#ifndef __TARGET_H__
+#define __TARGET_H__
+
+#include <list>
+
+namespace antcc {
+/**
+ *
+ */
+class target : public projectComponent, public virtual ITaskContainer
+{
+
+    public:
+        enum eStatus {
+              eNone               = 0x0
+             ,eVisited            = 0x1
+             ,eExecuteBegin       = 0x2
+             ,eExecuteEnd         = 0x4
+             ,eExecuteTaskRuning  = 0x8 };
+
+        inline bool isVisited() const
+        { return m_Status & eVisited; }
+
+        inline void setVisited() 
+        { m_Status |= eVisited; }
+
+        inline void clearStatus() 
+        { m_Status = eNone; }
+    private:
+        long    m_Status;
+
+    public:
+        typedef std::vector<task *>                 taskList_type;
+        typedef std::vector<task *>::iterator       taskList_iterator;
+        typedef std::vector<task *>::const_iterator taskList_const_iterator;
+
+        typedef std::list<std::string>                  dependList_type;
+        typedef std::list<std::string>::const_iterator  dependList_const_iterator;
+
+        /// default target constructor
+        target() ;
+
+        virtual ~target();
+        
+
+        std::string name() const;
+        ///
+        virtual void addChild(const char *_name,antcc::antElement *_elt);
+        ///
+        virtual void addTask(task *_nt) ;
+        /// Return dependency list
+        dependList_type &getDependencies();
+
+        taskList_type &getTasks() 
+        { return m_Tasks; }
+    private:
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        
+        template <typename C>                                                        
+        friend  struct element_attributes;
+        static xml::element_attributes<target> gAttr []; 
+
+        void setDefault(const std::string &s);
+        void setDepends(const std::string &s);
+        void setIf(const std::string &s);
+        void setUnless(const std::string &s);
+    private:
+        taskList_type   m_Tasks;
+        dependList_type m_Depends;
+};
+
+}
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/CMakeLists.txt b/src/tasks/CMakeLists.txt
new file mode 100644 (file)
index 0000000..63f7492
--- /dev/null
@@ -0,0 +1,102 @@
+project(antcc_tasks)
+
+subdirs(condition)
+INCLUDE_DIRECTORIES("${libltdl_SOURCE_DIR}")
+
+
+IF(WIN32)
+  SET(LIBXML2_LIBRARIES libxml2.lib)
+  INCLUDE_DIRECTORIES(${ANTCC_GPL_DIR}/libxml2/include)
+  
+  INCLUDE_DIRECTORIES(${ANTCC_GPL_DIR}/iconv/include)
+  
+  SET(LIBXSLT_LIBRARIES libxslt.lib)
+  INCLUDE_DIRECTORIES(${ANTCC_GPL_DIR}/libxslt/)
+
+ELSE(WIN32)
+  SET(LIBXML2_LIBRARIES libxml2.so)
+  SET(LIBXSLT_LIBRARIES libxslt.so)
+  INCLUDE_DIRECTORIES(/usr/include/libxml2)
+ENDIF(WIN32)
+#
+# static linked 
+#
+
+ADD_LIBRARY(libantcc_tasks STATIC 
+       # logger.cpp
+       antcall.cpp
+       aregister.cpp
+       conditionTask.cpp
+       description.cpp
+       echo.cpp
+       echoproperties.cpp
+       exec.cpp
+       fail.cpp
+       fileop.cpp
+       ifelse.cpp
+       import.cpp
+       loadfile.cpp
+       loadproperties.cpp
+       macrodef.cpp
+       property.cpp
+       sleep.cpp
+       subant.cpp
+       taskContainer.cpp
+       taskdef.cpp
+       )
+
+TARGET_LINK_LIBRARIES(libantcc_tasks libantcc_parser  libantcc_os propertylib ${EXPAT_LIBRARY} ltdl)
+
+
+#
+# Dynamic loadable services
+#
+ADD_LIBRARY(antcc_xslt  SHARED
+       xslt.cpp
+       )
+
+
+TARGET_LINK_DIRECTORIES(antcc_xslt
+         PUBLIC ${ANTCC_GPL_DIR}/libxml2/build-VS2019/x64/Debug
+         PUBLIC ${ANTCC_GPL_DIR}/iconv/build-VS2019/x64/Debug
+         PUBLIC ${ANTCC_GPL_DIR}/libxslt/build-VS2019/x64/Debug
+         )
+
+TARGET_LINK_LIBRARIES(antcc_xslt 
+       ${LIBXML2_LIBRARIES} 
+       ${LIBXSLT_LIBRARIES}
+       libantcc_os
+       propertylib
+       libantcc_parser
+       libantcc
+       )
+
+#
+# May be later 
+#
+
+#
+# Install
+#
+ANTCC_INSTALL(TARGETS antcc_xslt 
+       DESTINATION plugins )
+IF(WIN32)
+ ANTCC_INSTALL(FILES
+        ${ANTCC_GPL_DIR}/libxml2/build-VS2019/x64/Debug/libxml2.dll
+        TYPE BIN 
+         )
+  #ANTCC_INSTALL(FILES
+  #     ${ANTCC_GPL_DIR}/iconv/build-VS2019/x64/Debug/libiconv.dll
+  #     DESTINATION ${CMAKE_INSTALL_PREFIX}
+  #      )
+  ANTCC_INSTALL(FILES
+         "c:/Tools/Expat 2.2.10/Source/B64r/Release/libexpat.dll"
+         TYPE BIN 
+         )
+
+ ANTCC_INSTALL(FILES
+        ${ANTCC_GPL_DIR}/libxslt/build-VS2019/x64/Debug/libxslt.dll
+        TYPE BIN
+         )
+ENDIF()
diff --git a/src/tasks/ITaskContainer.h b/src/tasks/ITaskContainer.h
new file mode 100644 (file)
index 0000000..c95f38f
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __ITASK_CONTAINER_H__
+#define __ITASK_CONTAINER_H__
+
+namespace antcc
+{
+/**
+ *
+ *
+ */
+class ITaskContainer
+{
+    private:
+        ITaskContainer(const ITaskContainer &_c) = delete;
+    public:
+        typedef std::vector<task *>                 taskList_type;
+        typedef std::vector<task *>::iterator       taskList_iterator;
+        typedef std::vector<task *>::const_iterator taskList_const_iterator;
+    public:
+        ITaskContainer() {};
+        virtual ~ITaskContainer() {};
+        virtual void addTask(task *_nt) = 0;
+};
+
+
+}
+#endif
diff --git a/src/tasks/antcall.cpp b/src/tasks/antcall.cpp
new file mode 100644 (file)
index 0000000..257f6a2
--- /dev/null
@@ -0,0 +1,103 @@
+#include <antcc/common.h>
+#include <tasks/antcall.h>
+
+namespace antcc 
+{
+
+antcall::antcall()
+{
+    ANTCC_LOG_DEBUG("antcall::antcall %s","");
+}
+
+antcall::~antcall()
+{
+}
+
+task::eStatus antcall::execute()
+{
+    std::string _target;
+    // Process parameters first
+    std::string s("called" );
+    getProject().log(*this,eINFO,s);
+    for (paramList_const_iterator it = m_Params.begin()
+        ; it != m_Params.end()
+        ; ++it)
+    {
+        ANTCC_LOG_INFO("antcall::%s set %s to %s"
+                        ,__FUNCTION__
+                        ,(*it)->name().c_str()
+                        ,(*it)->value().c_str()
+                        );
+    }
+    if (getAttribute("target",_target))
+    {
+        project &_p = getProject();
+        _p.executeTarget(_p.getTarget(_target.c_str()));
+    }
+    return EXEC_SUCCESS;
+}
+
+/**
+ * @brief antcall children are  mainly parameter to the call
+ * these parameters are actually used to set properties
+ */
+void 
+antcall::addChild(const char *_name,antcc::antElement *_elt)
+{
+    if (_elt && _elt->isParameter())
+    {
+        antcc::param *_param = static_cast<antcc::param *>(_elt);
+        ANTCC_LOG_INFO("antcall::%s  add task %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        _param->setProject(&getProject());
+        m_Params.push_back(_param);
+    } else 
+    {
+        ANTCC_LOG_INFO("%s tag %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+    }
+
+}
+
+/* handle param */
+param::param()
+    : projectComponent(antElement::eParameter)
+{
+    ANTCC_LOG_DEBUG("param::param %s","");
+}
+
+param::~param()
+{
+}
+
+std::string 
+param::name()
+{
+    std::string l_str;
+    if (!getAttribute("name",l_str))
+    {
+        ANTCC_LOG_ERROR("param::%s not set",
+                       __FUNCTION__);
+    }
+    return l_str;
+}
+
+std::string 
+param::value()
+{
+    std::string l_str;
+    if (!getAttribute("value",l_str))
+    {
+        ANTCC_LOG_ERROR("param::%s not set",
+                       __FUNCTION__);
+    }
+    return l_str;
+}
+
+
+
+}
diff --git a/src/tasks/antcall.h b/src/tasks/antcall.h
new file mode 100644 (file)
index 0000000..5636152
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef __ANTCALL_H__
+#define __ANTCALL_H__
+
+namespace antcc {
+
+class param;
+/**
+ *
+ */
+class antcall : public task
+{
+    public:
+        typedef std::vector<param *>                 paramList_type;
+        typedef std::vector<param *>::iterator       paramList_iterator;
+        typedef std::vector<param *>::const_iterator paramList_const_iterator;
+
+    public:
+        antcall() ;
+        virtual ~antcall();
+        virtual eStatus execute() ;
+        /// general entry point used by the SAX parser to add child elements
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+    private:
+        paramList_type m_Params;
+};
+
+/**
+ *
+ */
+class param : public projectComponent
+{
+    public:
+        param() ;
+        virtual ~param();
+
+       std::string name();
+
+       std::string value();
+    private:
+};
+
+}
+
+#endif
diff --git a/src/tasks/aregister.cpp b/src/tasks/aregister.cpp
new file mode 100644 (file)
index 0000000..27e1bec
--- /dev/null
@@ -0,0 +1,90 @@
+#include <antcc/common.h>
+
+
+#include <types/datatype.h>
+#include <types/fileset.h>
+
+#include <tasks/property.h>
+#include <tasks/import.h>
+#include <tasks/loadproperties.h>
+#include <tasks/loadfile.h>
+#include <tasks/antcall.h>
+#include <tasks/subant.h>
+#include <tasks/fileop.h>
+#include <tasks/exec.h>
+#include <tasks/echo.h>
+#include <tasks/echoproperties.h>
+#include <tasks/fail.h>
+#include <tasks/ifelse.h>
+#include <tasks/sleep.h>
+#include <tasks/taskdef.h>
+#include <tasks/ITaskContainer.h>
+#include <tasks/taskContainer.h>
+#include <tasks/macrodef.h>
+#include <target.h>
+#include <tasks/description.h>
+
+
+namespace antcc {
+
+void register_tasks ()
+{
+#define REGISTER(cls,tag) \
+  antcc::antElementFactoryRegistration< cls > _##cls ## tag(#tag);
+#define REGISTER_FILEOP(cls,tag) \
+  antcc::antElementFactoryRegistration<fileop_##cls> _##cls(#tag);
+
+
+  REGISTER(property,property)
+  REGISTER(loadproperties,loadproperties)
+  REGISTER(loadfile,loadfile)
+  REGISTER(antcall,antcall)
+  REGISTER(param,param)
+  REGISTER(target,target)
+  REGISTER(description,description)
+  REGISTER(subant,subant)
+  REGISTER(exec,exec)
+  REGISTER(arg,arg)
+  REGISTER(echo,echo)
+  REGISTER(echoproperties,echoproperties)
+  REGISTER(sleep,sleep)
+  REGISTER(macrodef,macrodef)
+  REGISTER(macro_arg,attribute)
+  REGISTER(macro_arg,element)
+  REGISTER(import,import)
+  REGISTER(taskContainer,sequential)
+  REGISTER(taskContainer,parallel)
+  
+  REGISTER(fail,fail)
+  REGISTER(ifelse,if)
+  REGISTER(ifelse_else,else)
+  
+  REGISTER(taskdef,taskdef)
+
+  REGISTER_FILEOP(basename,basename)
+  REGISTER_FILEOP(delete,delete)
+  REGISTER_FILEOP(copy,copy)
+  REGISTER_FILEOP(move,move)
+  REGISTER_FILEOP(mkdir,mkdir)
+  REGISTER_FILEOP(dirname,dirname)
+  REGISTER_FILEOP(available,available)
+
+  /* Missing some system features */
+  /**
+   * echoproperties
+   * exec arg
+   * xslt
+   *
+   */
+  // REGISTER(xslt,xslt)
+
+  /**
+   * Missing types
+   */
+  /**
+   * fileset,include
+   */
+}
+
+
+}
diff --git a/src/tasks/condition/CMakeLists.txt b/src/tasks/condition/CMakeLists.txt
new file mode 100644 (file)
index 0000000..dfd65a1
--- /dev/null
@@ -0,0 +1,29 @@
+project(antcc_conditions)
+
+INCLUDE_DIRECTORIES("${libltdl_SOURCE_DIR}")
+
+
+SET(LIBXML2_LIBRARIES libxml2.so)
+SET(LIBXSLT_LIBRARIES libxslt.so)
+INCLUDE_DIRECTORIES(/usr/include/libxml2)
+
+#
+# static linked 
+#
+
+ADD_LIBRARY(libantcc_cond STATIC 
+            # logger.cpp
+            not.cpp
+            or.cpp
+            and.cpp
+            isSet.cpp
+        #      conditionIsSet.cpp
+       )
+
+TARGET_LINK_LIBRARIES(libantcc_cond libantcc_parser  libantcc_os propertylib ${EXPAT_LIBRARY} ltdl)
+
+
+#
+# May be later 
+#
+
diff --git a/src/tasks/condition/ICondition.h b/src/tasks/condition/ICondition.h
new file mode 100644 (file)
index 0000000..6a0899f
--- /dev/null
@@ -0,0 +1,39 @@
+#ifndef __ICONDITION_H__
+#define __ICONDITION_H__
+
+namespace antcc
+{
+  namespace condition {
+
+    class conditionAnd;
+    class conditionOr;
+    class conditionIsSet;
+    class conditionNot;
+    /**
+     *  @brief Interface that has to be implemented
+     *  by conditions
+     */
+    class ICondition
+    {
+        public:
+            typedef std::vector<ICondition *> ConditionArray_type;
+            typedef typename ConditionArray_type::const_iterator ConditionArray_const_iterator;
+            typedef typename ConditionArray_type::iterator ConditionArray_iterator;
+
+            struct Result {
+                std::string m_Str;
+            };
+        public:
+            ///
+            ICondition() {};
+            ///
+            virtual ~ICondition() {};
+            /// Evaluate the condition 
+            virtual bool eval(Result &_res) = 0;
+            // Maybe offer a method to add a condition
+            virtual bool add(ICondition *) = 0 ;
+    };
+  } // end ns condition
+}  // end ns antcc
+
+#endif
diff --git a/src/tasks/condition/and.cpp b/src/tasks/condition/and.cpp
new file mode 100644 (file)
index 0000000..46bb47e
--- /dev/null
@@ -0,0 +1,56 @@
+#include <antcc/common.h>
+#include <tasks/condition/ICondition.h>
+#include <tasks/condition/and.h>
+
+namespace antcc {
+  namespace condition {
+
+/**
+ *
+ */
+condition_and::condition_and()
+{
+    ANTCC_LOG_DEBUG("condition_and::%s default ctor",__FUNCTION__);
+}
+
+/**
+ *
+ */
+condition_and::~condition_and()
+{
+}
+
+/**
+ *
+ */
+bool 
+condition_and::eval(Result &_res)
+{
+    bool l_result = true;
+    ANTCC_LOG_DEBUG("condition_and::%s default ctor",__FUNCTION__);
+    for ( auto it = m_Conditions.begin()
+            ; it !=  m_Conditions.end()
+            ; ++it)
+    {
+        if ( (l_result = (*it)->eval(_res)) == false)
+            break;
+    }
+    return l_result;
+}
+
+
+/**
+ *
+ */
+bool 
+condition_and::add(ICondition *_cond)
+{
+    ANTCC_LOG_DEBUG("condition_and::%s add",__FUNCTION__);
+    m_Conditions.push_back(_cond);
+    return _cond != NULL;
+}
+
+
+
+  } // end ns condition
+} // end ns antcc
diff --git a/src/tasks/condition/and.h b/src/tasks/condition/and.h
new file mode 100644 (file)
index 0000000..a0fb88c
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __CONDITION_AND_H__
+#define __CONDITION_AND_H__
+
+namespace antcc
+{
+  namespace condition {
+    /**
+     * @brief and condition.
+     *
+     */
+    class condition_and : public virtual ICondition
+    {
+        public:
+            ///
+            condition_and();
+            ///
+            virtual ~condition_and();
+            /// Evaluate the condition 
+            virtual bool eval(Result &_res) ;
+            // Maybe offer a method to add a condition
+            bool add(ICondition *) ;
+        private:
+            ConditionArray_type m_Conditions;
+    };
+
+  } // end ns condition
+} // end ns antcc
+
+#endif
diff --git a/src/tasks/condition/condition.h b/src/tasks/condition/condition.h
new file mode 100644 (file)
index 0000000..f8be8f9
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef __CONDITION_H__
+#define __CONDITION_H__
+
+namespace antcc
+{
+class condition 
+{
+    public:
+       condition() {}
+       virtual ~condition() {};
+        virtual bool eval() = 0;
+};
+
+}
+#endif
diff --git a/src/tasks/condition/conditionBase.h b/src/tasks/condition/conditionBase.h
new file mode 100644 (file)
index 0000000..0e7e4ed
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef __CONDITION_BASE_H__
+#define __CONDITION_BASE_H__
+
+namespace antcc {
+/**
+ *
+ */
+class conditionBase : public projectComponent
+{
+    public:
+        conditionBase() ;
+        virtual ~conditionBase();
+
+        /// Should be part of a pure interface call ICondition ? 
+        virtual bool eval() ;
+    private:
+};
+
+}
+#endif
diff --git a/src/tasks/condition/contains.h b/src/tasks/condition/contains.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/tasks/condition/equals.h b/src/tasks/condition/equals.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/tasks/condition/isFailure.h b/src/tasks/condition/isFailure.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/tasks/condition/isFalse.h b/src/tasks/condition/isFalse.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/tasks/condition/isSet.cpp b/src/tasks/condition/isSet.cpp
new file mode 100644 (file)
index 0000000..ab7864e
--- /dev/null
@@ -0,0 +1,39 @@
+#include <antcc/common.h>
+#include <tasks/condition/ICondition.h>
+#include <tasks/condition/isSet.h>
+
+namespace antcc {
+  namespace condition {
+
+isSet::isSet(const std::string &_prop)
+  : projectComponent(eCondition),m_Property(_prop)
+{
+    ANTCC_LOG_DEBUG("isSet::%s default %s ctor"
+            ,__FUNCTION__
+            ,m_Property.c_str());
+}
+
+isSet::~isSet()
+{
+}
+
+bool 
+isSet::eval(Result &_res)
+{
+    ANTCC_LOG_DEBUG("isSet::%s ",__FUNCTION__);
+    _res.m_Str.append(m_Property);
+    return m_Property.size() > 0;
+}
+
+
+bool 
+isSet::add(ICondition *_cond)
+{
+    ANTCC_LOG_DEBUG("isSet::%s add",__FUNCTION__);
+    return false;
+}
+
+
+
+  } // end ns condition
+} // end ns antcc
diff --git a/src/tasks/condition/isSet.h b/src/tasks/condition/isSet.h
new file mode 100644 (file)
index 0000000..70b97b7
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef __CONDITION_ISSET_H__
+#define __CONDITION_ISSET_H__
+
+namespace antcc
+{
+  namespace condition {
+
+class isSet : public virtual ICondition, public projectComponent
+{
+    private:
+        std::string m_Property;
+      
+    public:
+        /// constructor. to check if a property is set
+        isSet(const std::string &_prop);
+        virtual ~isSet();
+        bool eval(Result &_res);
+        bool add(ICondition *);
+};
+
+} // end ns condition
+} //end ns antcc
+#endif
diff --git a/src/tasks/condition/not.cpp b/src/tasks/condition/not.cpp
new file mode 100644 (file)
index 0000000..1216fdf
--- /dev/null
@@ -0,0 +1,41 @@
+#include <antcc/common.h>
+#include <tasks/condition/ICondition.h>
+#include <tasks/condition/not.h>
+
+namespace antcc {
+  namespace condition {
+
+condition_not::condition_not(ICondition *_cond)
+  : m_Condition(_cond)
+{
+    ANTCC_LOG_DEBUG("condition_not::%s default ctor",__FUNCTION__);
+}
+
+condition_not::~condition_not()
+{
+}
+
+bool 
+condition_not::eval(Result &_res)
+{
+    ANTCC_LOG_DEBUG("condition_not::%s ",__FUNCTION__);
+    if (m_Condition)
+    {
+        return ! m_Condition->eval(_res);
+    }
+    return false;
+}
+
+
+bool 
+condition_not::add(ICondition *_cond)
+{
+    ANTCC_LOG_DEBUG("condition_not::%s add",__FUNCTION__);
+    m_Condition = _cond;
+    return true;
+}
+
+
+
+  } // end ns condition
+} // end ns antcc
diff --git a/src/tasks/condition/not.h b/src/tasks/condition/not.h
new file mode 100644 (file)
index 0000000..6fdb223
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __CONDITION_NOT_H__
+#define __CONDITION_NOT_H__
+
+namespace antcc
+{
+  namespace condition {
+    /**
+     * @brief and condition.
+     *
+     */
+    class condition_not : public virtual ICondition
+    {
+        private:
+            condition_not(const condition_not &) {};
+        public:
+            ///
+            condition_not(ICondition *_cond);
+            ///
+            virtual ~condition_not();
+            /// Evaluate the condition 
+            virtual bool eval(Result &_res) ;
+            // Maybe offer a method to add a condition
+            bool add(ICondition *) ;
+        private:
+            ICondition *m_Condition;
+    };
+
+  } // end ns condition
+} // end ns antcc
+
+#endif
diff --git a/src/tasks/condition/or.cpp b/src/tasks/condition/or.cpp
new file mode 100644 (file)
index 0000000..f2bc8f2
--- /dev/null
@@ -0,0 +1,56 @@
+#include <antcc/common.h>
+#include <tasks/condition/ICondition.h>
+#include <tasks/condition/or.h>
+
+namespace antcc {
+  namespace condition {
+
+/**
+ *
+ */
+condition_or::condition_or()
+{
+    ANTCC_LOG_DEBUG("condition_or::%s default ctor",__FUNCTION__);
+}
+
+/**
+ *
+ */
+condition_or::~condition_or()
+{
+}
+
+/**
+ *
+ */
+bool
+condition_or::eval(Result &_res)
+{
+    bool l_result = false;
+    ANTCC_LOG_DEBUG("condition_or::%s default ctor",__FUNCTION__);
+    for ( auto it = m_Conditions.begin()
+            ; it !=  m_Conditions.end()
+            ; ++it)
+    {
+        if ( (l_result = (*it)->eval(_res)) == true)
+            break;
+    }
+    return l_result;
+}
+
+
+/**
+ *
+ */
+bool 
+condition_or::add(ICondition *_cond)
+{
+    ANTCC_LOG_DEBUG("condition_or::%s add",__FUNCTION__);
+    m_Conditions.push_back(_cond);
+    return _cond != NULL;
+}
+
+
+
+  } // end ns condition
+} // end ns antcc
diff --git a/src/tasks/condition/or.h b/src/tasks/condition/or.h
new file mode 100644 (file)
index 0000000..2e42d54
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __CONDITION_OR_H__
+#define __CONDITION_OR_H__
+
+namespace antcc
+{
+  namespace condition {
+    /**
+     * @brief and condition.
+     *
+     */
+    class condition_or : public virtual ICondition
+    {
+        public:
+            ///
+            condition_or();
+            ///
+            virtual ~condition_or();
+            /// Evaluate the condition 
+            virtual bool eval(Result &_res) ;
+            // Maybe offer a method to add a condition
+            bool add(ICondition *) ;
+        private:
+            ConditionArray_type m_Conditions;
+    };
+
+  } // end ns condition
+} // end ns antcc
+
+#endif
diff --git a/src/tasks/conditionTask.cpp b/src/tasks/conditionTask.cpp
new file mode 100644 (file)
index 0000000..787d168
--- /dev/null
@@ -0,0 +1,34 @@
+#include <antcc/common.h>
+
+#include <tasks/condition/conditionBase.h>
+#include <tasks/conditionTask.h>
+
+namespace antcc 
+{
+
+conditionTask::conditionTask()
+{}
+
+conditionTask::~conditionTask()
+{}
+
+task::eStatus 
+conditionTask::execute() 
+{
+    return EXEC_SUCCESS;
+}
+
+void
+conditionTask::setProperty(const std::string &)
+{
+}
+void
+conditionTask::setElse(const std::string &_e)
+{
+}
+void
+conditionTask::setValue(const std::string &_v)
+{
+}
+
+}
diff --git a/src/tasks/conditionTask.h b/src/tasks/conditionTask.h
new file mode 100644 (file)
index 0000000..529dfcb
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef __ANTCC_CONDITION_TASK_H__
+#define __ANTCC_CONDITION_TASK_H__
+
+namespace antcc
+{
+    class target;
+    class conditionBase;
+/**
+ * @brief interface for all tasks.
+ * what's common ? The name, dependencies
+ */
+class conditionTask : public task , public conditionBase
+{
+  public:
+    conditionTask() ;
+    virtual ~conditionTask() ;
+
+    virtual eStatus execute() ;
+
+  private:  
+    void    setProperty(const std::string &);
+    void    setElse(const std::string &_e);
+    void    setValue(const std::string &_v);
+  private:
+};
+
+
+}
+#endif
diff --git a/src/tasks/description.cpp b/src/tasks/description.cpp
new file mode 100644 (file)
index 0000000..e6a7659
--- /dev/null
@@ -0,0 +1,33 @@
+#include <antcc/common.h>
+#include <list>
+#include <sstream>
+#include <tasks/description.h>
+
+namespace antcc 
+{
+
+description::description()
+  : projectComponent(antElement::eNone)
+
+{
+    ANTCC_LOG_DEBUG("description::description !! whoooaaaa %s","");
+}
+
+description::~description()
+{
+}
+
+std::string 
+description::name() const
+{
+    std::string _str;
+    if ( !getAttribute("name",_str))
+    {
+        ANTCC_LOG_ERROR("description::%s no name !!!"
+                ,__FUNCTION__
+                );
+    }
+    return _str;
+}
+
+}
diff --git a/src/tasks/description.h b/src/tasks/description.h
new file mode 100644 (file)
index 0000000..0c2bb61
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __DESCRIPTION_H__
+#define __DESCRIPTION_H__
+
+namespace antcc {
+/**
+ * \brief simple description element
+ */
+class description : public projectComponent
+{
+    public:
+
+        /// default description constructor
+        description() ;
+
+        virtual ~description();
+        
+        std::string name() const;
+
+        const std::string getDescription() const;
+    private:
+       std::string m_Description;
+};
+
+}
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/echo.cpp b/src/tasks/echo.cpp
new file mode 100644 (file)
index 0000000..2c06157
--- /dev/null
@@ -0,0 +1,29 @@
+#include <antcc/common.h>
+#include <tasks/echo.h>
+
+
+
+echo::echo()
+{
+}
+
+echo::~echo()
+{
+}
+
+antcc::task::eStatus 
+echo::execute()
+{
+    std::string _name;
+    if (getResolvedAttribute("message",_name))
+    {
+        getProject().log(*this,eINFO,_name);
+    } else
+    {
+        ANTCC_LOG_ERROR("echo::%s  "
+            ,__FUNCTION__);
+    }
+    return EXEC_SUCCESS;
+}
+
+
diff --git a/src/tasks/echo.h b/src/tasks/echo.h
new file mode 100644 (file)
index 0000000..acea189
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __TASK_ECHO_H__
+#define __TASK_ECHO_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ * There four ways to use this 
+ * ->   name and value to set one echo
+ * ->   file        : to read properties from a file.
+ * ->   url         : to retrived properties from the internel
+ * ->   environment : all environment variables will be imported as properties with as follow
+ *                    the environment prefix dot environment variable name.
+ */
+class echo : public antcc::task
+{
+    public:
+        ///
+        echo() ;
+        ///
+        virtual ~echo();
+        ///
+        virtual eStatus execute() ;
+    private:
+};
+
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/echoproperties.cpp b/src/tasks/echoproperties.cpp
new file mode 100644 (file)
index 0000000..e25163c
--- /dev/null
@@ -0,0 +1,65 @@
+#include <antcc/common.h>
+#include <tasks/echoproperties.h>
+
+
+
+echoproperties::echoproperties()
+{
+}
+
+echoproperties::~echoproperties()
+{
+}
+
+antcc::task::eStatus 
+echoproperties::execute()
+{
+    task::eStatus l_return = EXEC_SUCCESS;
+    std::string _name;
+    if (getResolvedAttribute("destfile",_name))
+    {
+        getProject().log(*this,eINFO,"save properties tofile %s",_name.c_str());
+    } else
+    {
+        ANTCC_LOG_ERROR("echoproperties::%s  "
+            ,__FUNCTION__);
+    }
+    return l_return;
+}
+///
+void
+echoproperties::setFile(const std::string &_v)
+{
+}
+///
+void
+echoproperties::setFormat(const std::string &_v)
+{
+}
+
+void 
+echoproperties::addChild(const char *_name,antcc::antElement *_task)
+{
+        ANTCC_LOG_ERROR("echoproperties::%s TODO "
+            ,__FUNCTION__);
+}
+
+///
+bool 
+echoproperties::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false; 
+    if  ( (l_ok = antElement::addAttribute<echoproperties>(this,echoproperties::gAttr,_name,_v)) == true) 
+    {                                                                                                         
+       antElement::addAttribute(_name,_v);                                                                   
+    }                                                                                                         
+    return l_ok;                                                                                              
+}
+///
+antcc::xml::element_attributes<echoproperties> echoproperties::gAttr[] =
+{
+  {"destfile",&echoproperties::setFile}
+  ,{"format",&echoproperties::setFormat}
+  ,{NULL,NULL}
+} ;
+
diff --git a/src/tasks/echoproperties.h b/src/tasks/echoproperties.h
new file mode 100644 (file)
index 0000000..b2614b6
--- /dev/null
@@ -0,0 +1,43 @@
+#ifndef __TASK_ECHOPROPERTIES_H__
+#define __TASK_ECHOPROPERTIES_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ * There four ways to use this 
+ * ->   format :  value to set one echoproperties
+ * ->   file        : to read properties from a file.
+ */
+class echoproperties : public antcc::task
+{
+    public:
+        ///
+        echoproperties() ;
+        ///
+        virtual ~echoproperties();
+        ///
+        virtual eStatus execute() ;
+    private:
+       ///
+       void setFile(const std::string &_v);
+       ///
+       void setFormat(const std::string &_v);
+       ///
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;         
+        ///
+       virtual bool addAttribute(const std::string &_name,const std::string &_v)  ; 
+        template <typename C>                                                        
+        friend  struct element_attributes;                                           
+       ///
+       static antcc::xml::element_attributes<echoproperties>                                  
+        gAttr []; 
+       std::string m_File;
+       std::string m_Format;
+};
+
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/exec.cpp b/src/tasks/exec.cpp
new file mode 100644 (file)
index 0000000..ada417c
--- /dev/null
@@ -0,0 +1,224 @@
+#include <antcc/common.h>
+
+#include <sstream>
+#include <fstream>
+#include <string.h>
+#include <tasks/exec.h>
+
+#include <utils/aeb/sys/popen_streambuf.h>
+#include <os/execute.h>
+
+
+namespace antcc 
+{
+       
+/**
+ * Attributes supported by exec
+ */
+xml::element_attributes<exec> exec::gAttr[] = {
+  {"dir",&exec::setDefault}
+  , {"append",&exec::setDefault}
+  , {"executable",&exec::setDefault}
+  , {"failonerror",&exec::setDefault}
+  , {"failifexecutionfails",&exec::setDefault}
+  , {"resultproperty",&exec::setDefault}
+  , {"outputproperty",&exec::setDefault}
+  , {"output",&exec::setDefault}
+  , {"vmlauncher",&exec::setDefault}
+  , {"spawn",&exec::setDefault}
+  , {NULL,NULL}
+}; 
+
+
+exec::exec()
+    : m_Params(""),m_Append(false),m_FailOnError(false)
+{
+}
+
+exec::~exec()
+{
+}
+
+task::eStatus exec::execute()
+{
+    task::eStatus l_return = EXEC_SUCCESS;
+    std::string _exe;
+    if (getResolvedAttribute("executable",_exe))
+    {
+        os::execute         e;
+        std::istream        is(NULL);
+        std::ostringstream  l_oss;
+        std::string         l_op,l_result;
+        char                c;
+        _exe.append(m_Params);
+        ANTCC_LOG_DEBUG("%s runCommand %s"
+                ,__FUNCTION__
+                ,_exe.c_str());
+        e.runCommand(this,_exe,is);
+        while (is.read(&c,1))
+        {
+                l_oss<<c;
+        }
+        int l_exec_result = static_cast<popen_streambuf *>(is.rdbuf())->close();
+
+        getProject().log(*this,eINFO,"execute %s ",_exe.c_str()); 
+        if (getResolvedAttribute("output",l_op))
+        {
+            getResolvedAttribute("append",m_Append);
+            if (m_Append)
+            {
+                std::ofstream l_os(l_op.c_str(),std::ios_base::app);
+                l_os<<l_oss.str();
+                l_os.close();
+            }else
+            {
+                std::ofstream l_os(l_op.c_str(),std::ios_base::out);
+                l_os<<l_oss.str();
+                l_os.close();
+            }
+        } else if (getResolvedAttribute("outputproperty",l_op))
+        {
+            std::string l_output_p = l_oss.str();
+            if (l_output_p.size() > 1)
+                l_output_p.pop_back();
+            getProject().setProperty(l_op,l_output_p);
+        } else 
+        {
+            getProject().log(*this,eDEBUG,l_oss.str());
+        }
+        // Get errrno result should work
+        if (getResolvedAttribute("resultproperty",l_result))
+        {
+            l_oss.str("");
+            l_oss<<l_exec_result;
+            ANTCC_LOG_DEBUG("%s set resultproperty(%s)=<%s> "
+                    ,__FUNCTION__
+                    ,l_result.c_str()
+                    ,l_oss.str().c_str());
+            getProject().setProperty(l_result,l_oss.str());
+        }
+        // free resource allocated by runCommand
+        delete is.rdbuf();
+    } else {
+        ANTCC_LOG_ERROR("%s executable undefined ",__FUNCTION__);
+    }
+    return l_return;
+}
+
+/**
+ * @brief antcall children are  mainly parameter to the call
+ * these parameters are actually used to set properties
+ */
+void 
+exec::addChild(const char *_name,antcc::antElement *_elt)
+{
+    if (_elt && _elt->isArgument())
+    {
+        antcc::arg *l_arg = static_cast<antcc::arg *>(_elt);
+        ANTCC_LOG_DEBUG("exec::%s  add arg %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        m_Params.append(" ");
+        m_Params.append(l_arg->getLine());
+        //delete l_arg;
+
+    } else 
+    {
+        ANTCC_LOG_DEBUG("exec::%s tag %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+    }
+
+}
+
+bool 
+exec::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<exec>(this,exec::gAttr,_name,_v)) == true)
+    {
+       antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+/* Setters */
+void
+exec::setAppend(const std::string &s) 
+{
+}
+void
+exec::setOutput(const std::string &s)
+{
+    m_Output = getProject().resolveFile(antcc::file(s));
+}
+
+void
+exec::setOutputProperty(const std::string &s)
+{
+}
+
+void
+exec::setResultProperty(const std::string &s)
+{
+}
+void
+exec::setFailOnError(const std::string &s)
+{
+}
+/* Also provide arg element .... */
+
+
+/**
+ * Attributes supported by exec
+ */
+xml::element_attributes<arg>
+gExecArgAttr [] = {
+  {"line",&arg::setLine}
+  ,{"value",&arg::setLine}
+  , {NULL,NULL}
+}; 
+
+
+
+
+arg::arg()
+  : projectComponent(antElement::eArgument)
+  , m_Line("")
+{
+}
+
+arg::~arg()
+{
+}
+
+const std::string  
+arg::getLine() const
+{
+
+    return getProject().resolveValue(m_Line);
+    //return m_Line;
+}
+
+void 
+arg::setLine(const std::string &_v)
+{
+    m_Line = _v;
+    //m_Line = getProject().resolveValue(_v);
+}
+
+bool 
+arg::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<arg>(this,gExecArgAttr,_name,_v)) == true)
+    {
+       antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+
+
+}
diff --git a/src/tasks/exec.h b/src/tasks/exec.h
new file mode 100644 (file)
index 0000000..3269fc8
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef __ANTCC_EXEC_H__
+#define __ANTCC_EXEC_H__
+
+namespace antcc {
+/**
+ * @brief exec task that forks and launches the executable with it's arguments.
+ */
+class exec : public task
+{
+    public:
+        /// Default constructor
+        exec() ;
+        /// Default Desctructor
+        virtual ~exec();
+        /// Execute the operation
+        virtual eStatus execute() ;
+
+        /// general entry point used by the SAX parser to add child elements
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+
+        /// general entry point used by the SAX parser to add attributes
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+        void setDefault(const std::string &s) {};
+        void setAppend(const std::string &s) ;
+        void setOutput(const std::string &s);
+        void setOutputProperty(const std::string &s);
+        void setResultProperty(const std::string &s);
+        void setFailOnError(const std::string &s);
+    private:
+        bool        m_Append;         //! output mode append. avoids overwrite
+        bool        m_FailOnError;    //! output mode append. avoids overwrite
+        antcc::file m_Output;         //! If set, write console output to file
+        antcc::file m_OutputProperty; //! If set, write console output to property
+        std::string m_Params;
+        /// Allowed attributes array
+        static xml::element_attributes<exec> gAttr []; 
+};
+
+/**
+ *
+ */
+class arg : public projectComponent
+{
+    public:
+        arg() ;
+        virtual ~arg();
+
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        
+        const std::string getLine() const;
+
+        void setLine(const std::string &s);
+    private:
+        std::string m_Line;
+};
+}
+#endif
diff --git a/src/tasks/fail.cpp b/src/tasks/fail.cpp
new file mode 100644 (file)
index 0000000..196eecf
--- /dev/null
@@ -0,0 +1,80 @@
+#include <antcc/common.h>
+#include <tasks/fail.h>
+
+
+/**
+ * Attributes supported by exec
+ */
+antcc::xml::element_attributes<fail> fail::gAttr[] = 
+{
+  {"unless",&fail::setUnless}
+  , {"message",&fail::setMessage}
+  , {"status",&fail::setStatus}
+  , {NULL,NULL}
+}; 
+
+
+fail::fail()
+{
+}
+
+fail::~fail()
+{
+}
+
+antcc::task::eStatus 
+fail::execute()
+{
+    eStatus l_return = EXEC_FAILED;
+    std::string _name;
+    std::string l_unless;
+    if (getResolvedAttribute("unless",l_unless))
+    {
+        std::string l_prop;
+
+        if (getProject().getProperty(l_unless,l_prop))
+        {
+            l_return = EXEC_SUCCESS;
+
+        } else {
+            getProject().log(*this,eINFO,"unless %s ",l_prop.c_str());
+       }
+    }
+    if ( (l_return == EXEC_FAILED) && getResolvedAttribute("message",_name))
+    {
+        getProject().log(*this,eINFO,_name);
+    } else
+    {
+        ANTCC_LOG_DEBUG("fail::%s  success condition is met"
+            ,__FUNCTION__);
+    }
+    return l_return;
+}
+
+///
+bool 
+fail::addAttribute(const std::string &_name,const std::string &_v)  
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<fail>(this,fail::gAttr,_name,_v)) == true)
+    {
+        antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+///
+void 
+fail::setUnless(const std::string &s)
+{
+}
+///
+void 
+fail::setMessage(const std::string &s)
+{
+}
+///
+void 
+fail::setStatus(const std::string &s)
+{
+}
+
diff --git a/src/tasks/fail.h b/src/tasks/fail.h
new file mode 100644 (file)
index 0000000..0d55d85
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef __TASK_FAIL_H__
+#define __TASK_FAIL_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ */
+class fail : public antcc::task
+{
+    public:
+        ///
+        fail() ;
+        ///
+        virtual ~fail();
+        ///
+        virtual eStatus execute() ;
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+        ///
+        ///
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        ///
+        void setUnless(const std::string &s);
+        ///
+        void setMessage(const std::string &s);
+        ///
+        void setStatus(const std::string &s);
+    private:
+        std::string m_Message;
+        std::string m_Status;
+        std::string m_Unless; // Should be a condition
+        static ::antcc::xml::element_attributes<fail> gAttr []; 
+};
+
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/fileop.cpp b/src/tasks/fileop.cpp
new file mode 100644 (file)
index 0000000..5395d94
--- /dev/null
@@ -0,0 +1,447 @@
+#include <antcc/common.h>
+
+#include <types/datatype.h>
+#include <types/fileset.h>
+
+#include <tasks/fileop.h>
+
+namespace antcc 
+{
+
+#define FILEOP(antcall,exe,child,attr)       \
+fileop_ ## antcall::fileop_ ## antcall()     \
+{                              \
+}                              \
+                               \
+fileop_##antcall::~fileop_##antcall()        \
+{                              \
+}                              \
+                               \
+task::eStatus fileop_##antcall::execute()    \
+{\
+  exe  \
+} \
+void fileop_##antcall::addChild(const char *_name,antcc::antElement *_task)    \
+{\
+  child \
+}\
+bool fileop_##antcall::addAttribute(const std::string &_name,const std::string &_v)  \
+{\
+    bool l_ok = false; \
+    if  ( (l_ok = antElement::addAttribute<fileop_##antcall>(this,fileop_##antcall::gAttr,_name,_v)) == true) \
+    {                                                                                                         \
+            antElement::addAttribute(_name,_v);                                                               \
+        attr                                                                                                  \
+    }                                                                                                         \
+    return l_ok;                                                                                              \
+} \
+void fileop_##antcall::setDefault(const std::string &_v)  \
+{ }
+
+
+fileop::fileop()
+{
+}
+
+fileop::~fileop()
+{
+}
+
+xml::element_attributes<fileop_mkdir> fileop_mkdir::gAttr[] =
+{
+  {"dir",&fileop_mkdir::setDir}
+  ,{NULL,NULL}
+};
+
+xml::element_attributes<fileop_copy> fileop_copy::gAttr[] =
+{
+{"file",&fileop_copy::setFile}
+,{"tofile",&fileop_copy::setToFile}
+,{"todir",&fileop_copy::setToDir}
+,{"overwrite",&fileop_copy::setOverwrite}
+,{"flatten",&fileop_copy::setFlatten}
+,{"failonerror",&fileop_copy::setFailOnError}
+,{"verbose",&fileop_copy::setVerbose}
+,{NULL,NULL}
+};
+
+xml::element_attributes<fileop_move> fileop_move::gAttr[] =
+{
+ {"file",&fileop_move::setFile}
+ ,{"tofile",&fileop_move::setToFile}
+ ,{"overwrite",&fileop_move::setOverwrite}
+ ,{NULL,NULL}
+} ;
+
+xml::element_attributes<fileop_delete> fileop_delete::gAttr[] =
+{
+  {"file",&fileop_delete::setFile}
+  ,{"dir",&fileop_delete::setDir}
+  ,{"includeemptydirs",&fileop_delete::setDefault}
+  ,{"quiet",&fileop_delete::setDefault}
+  ,{"failonerror",&fileop_delete::setDefault}
+  ,{"verbose",&fileop_delete::setDefault}
+  ,{NULL,NULL}
+} ;
+
+xml::element_attributes<fileop_basename> fileop_basename::gAttr[] =
+{
+  {"file",&fileop_basename::setFile}
+  ,{"property",&fileop_basename::setProperty}
+  ,{"suffix",&fileop_basename::setSuffix}
+  ,{NULL,NULL}
+} ;
+
+xml::element_attributes<fileop_dirname> fileop_dirname::gAttr[] =
+{
+  {"file",&fileop_dirname::setFile}
+  ,{"property",&fileop_dirname::setProperty}
+  ,{NULL,NULL}
+} ;
+
+xml::element_attributes<fileop_available> fileop_available::gAttr[] =
+{
+  {"file",&fileop_available::setFile}
+  ,{"property",&fileop_available::setProperty}
+  ,{"type",&fileop_available::setDefault}
+  ,{NULL,NULL}
+} ;
+
+FILEOP(mkdir,{
+    std::string _dir;
+   
+    if (getResolvedAttribute("dir",_dir) )
+    {
+        path l_p(getProject().resolveFile(_dir));
+
+        getProject().log(*this,eINFO,"Create dir %s %s"
+                            ,_dir.c_str()
+                            ,l_p.c_str());
+        l_p.create();
+    }
+    else
+    {
+        getProject().log(*this,eINFO,"todo "); 
+    }
+    return EXEC_SUCCESS;
+},{},{})
+
+void fileop_mkdir::setDir(const std::string &_sv)
+{
+    m_Dir = _sv;
+}
+
+FILEOP(copy,{
+    std::string _todir;
+    if (getResolvedAttribute("todir",_todir) )
+    {
+        file dest  = getProject().resolveFile(_todir);
+        const path lpath = dest.getPath();
+        getProject().log(*this,eINFO,"todir %s %s"
+                ,_todir.c_str()
+                ,lpath.c_str());
+        // ! it is const and move might behave differently.
+        for ( auto it =  fileSet().begin() 
+              ; it != fileSet().end()
+              ; ++it)
+        {
+            file ld = lpath.append( (*it).basename());
+            getProject().log(*this,eINFO,"%s todir %s"
+                    ,(*it).name().c_str()
+                    ,dest.name().c_str());
+            (*it).move(ld.name(),true);
+        }
+    }
+    else
+    {
+    }
+    return EXEC_SUCCESS;
+},{},{})
+
+void fileop_copy::setFile(const std::string &_sv)
+{
+    fileSet().setFile(getProject().resolveFile(_sv)  );
+}
+
+void fileop_copy::setToFile(const std::string &_sv)
+{
+}
+
+void fileop_copy::setToDir(const std::string &_sv)
+{
+}
+
+void fileop_copy::setFlatten(const std::string &_sv)
+{
+}
+
+void fileop_copy::setOverwrite(const std::string &_sv)
+{
+}
+
+void fileop_copy::setFailOnError(const std::string &_sv)
+{
+}
+
+void fileop_copy::setVerbose(const std::string &_sv)
+{
+}
+
+
+FILEOP(move,{
+    std::string _todir;
+    eStatus     l_return = EXEC_SUCCESS;
+    
+    if (getResolvedAttribute("todir",_todir) )
+    {
+        file dest        = getProject().resolveFile(_todir);
+        const path lpath = dest.getPath();
+
+        getProject().log(*this,eINFO,"todir %s %s"
+                ,_todir.c_str()
+                ,lpath.c_str());
+        // ! it is const and move might behave differently.
+        auto it =  fileSet().begin() ;
+        for (  // outside for it might not be const
+              ; it != fileSet().end()
+              ; ++it)
+        {
+            file ld = lpath.append( (*it).basename());
+            getProject().log(*this,eINFO,"%s todir %s"
+                    ,(*it).name().c_str()
+                    ,dest.name().c_str());
+            (*it).move(ld.name(),false);
+        }
+    } 
+    else if (getResolvedAttribute("tofile",_todir) )
+    {
+        auto   it =  fileSet().begin() ;
+        file dest = getProject().resolveFile(_todir);
+        
+        if (fileSet().size() == 1)
+        {
+            getProject().log(*this,eINFO,"%s tofile %s"
+                    ,(*it).name().c_str()
+                    ,dest.name().c_str());
+            (*it).move(dest.name(),false);
+        }
+        else
+        {
+            getProject().log(*this,eERROR,"%s tofile %s wrong size %d"
+                    ,(*it).name().c_str()
+                    ,dest.name().c_str()
+                    ,fileSet().size());
+            l_return = EXEC_FAILED;
+        }
+    }
+    else
+    {
+        l_return = EXEC_FAILED;
+    }
+    return l_return;
+},{},{})
+
+void fileop_move::setFile(const std::string &_sv)
+{
+    fileSet().setFile(getProject().resolveFile(_sv)  );
+}
+
+void fileop_move::setToFile(const std::string &_sv)
+{
+}
+
+
+void fileop_move::setOverwrite(const std::string &_sv)
+{
+}
+
+FILEOP(delete,{
+    std::string _dir;
+
+    // be sure fileset can resolve names and so on
+    
+    fileSet().setProject(&getProject());
+
+    if (getResolvedAttribute("dir",_dir) )
+    {
+        path l_p(getProject().resolveFile(_dir));
+        fileSet().setDir(l_p.c_str());
+        
+        antcc::types::fileset::fileset_iterator it = fileSet().begin();
+        for ( ; it != fileSet().end(); ++it)
+        {
+            getProject().log(*this,eINFO,"delete %s file %s"
+                            ,_dir.c_str()
+                            ,(*it).name().c_str()
+                            );
+            file  l_file((*it).name());
+            
+            if (l_file.isDir())
+            {
+                l_file.getPath().remove();
+            }
+            else
+            {
+                l_file.remove();
+            }
+        }
+    }
+    else if (getResolvedAttribute("file",_dir) )
+    {
+        getProject().log(*this,eINFO,"file %s",_dir.c_str()); 
+    }
+    else
+    {
+        getProject().log(*this,eINFO," no dir check datatype"); 
+    }
+    return EXEC_SUCCESS;
+},{},{} )
+
+void fileop_delete::setFile(const std::string &_sv)
+{
+    m_File = getProject().resolveValue(_sv);
+}
+
+void fileop_delete::setDir(const std::string &_sv)
+{
+    m_Path = getProject().resolveValue(_sv);
+}
+
+void fileop_delete::setVerbose(const std::string &_sv)
+{
+}
+
+void fileop_delete::setQuiet(const std::string &_sv)
+{
+}
+
+
+
+
+FILEOP(basename, {
+    std::string _file;
+    if (!m_Property.empty() && getResolvedAttribute("file",_file))
+    {
+        antcc::file l_f(_file);
+        std::string l_dn = l_f.basename();
+        
+        getProject().log(*this,eINFO,"Set %s to %s"
+                ,m_Property.c_str()
+                ,l_dn.c_str()); 
+        getProject().setProperty(m_Property,l_dn);
+    }
+    else
+    {
+        getProject().log(*this,eERROR,"Set property or file misssing"); 
+    }
+    return EXEC_SUCCESS;
+},{},{})
+
+void fileop_basename::setFile(const std::string &_v)
+{
+    m_File = _v;
+}
+
+void fileop_basename::setProperty(const std::string &_v)
+{
+    m_Property = _v;
+}
+
+void fileop_basename::setSuffix(const std::string &_v)
+{
+    m_Suffix = _v;
+}
+
+
+FILEOP(dirname, {
+    std::string _prop;
+    std::string _file;
+    if (! m_Property.empty() && getResolvedAttribute("file",_file))
+    {
+        antcc::file l_f(_file);
+        std::string l_dn = l_f.dirname();
+        
+        getProject().log(*this,eINFO,"Set %s to %s from %s"
+                ,m_Property.c_str()
+                ,l_dn.c_str()
+                ,_file.c_str()); 
+        
+        getProject().setProperty(m_Property,l_dn);
+    } 
+    else
+    {
+        getProject().log(*this,eERROR,"Set property or file misssing"); 
+    }
+    return EXEC_SUCCESS;
+},{},{})
+
+void fileop_dirname::setFile(const std::string &_v)
+{
+    m_File = _v;
+}
+
+void fileop_dirname::setProperty(const std::string &_v)
+{
+    m_Property = _v;
+}
+
+
+
+
+FILEOP(available, {
+    std::string l_file;
+    std::string l_prop;
+    bool        lb_available = false;
+
+    if (getResolvedAttribute("file",l_file) )
+    {
+        file l_f(getProject().resolveFile(l_file));
+        lb_available =   l_f.exists();
+        // getProject().log(*this,eINFO,"file %s ",l_file.c_str()); 
+    }
+    else
+    {
+         ANTCC_LOG_DEBUG("available::%s check datatype %s todo "
+                          ,__FUNCTION__
+                          ,l_file.c_str()); 
+    }
+
+    if (getResolvedAttribute("property",l_prop) )
+    {
+        std::string l_tmpv;
+        
+        getProject().log(*this,eINFO,"property %s %s"
+                ,l_prop.c_str()
+                ,(lb_available)?"set":"not set") ;
+        
+        if (lb_available && ! getProject().getProperty(l_prop,l_tmpv))
+        {
+            getProject().setProperty(l_prop,"1");
+        }
+        else
+        {
+           ANTCC_LOG_DEBUG("available::%s property=%s attribute not set available = %d"
+                          ,__FUNCTION__
+                          ,l_prop.c_str(),lb_available); 
+        }
+    }
+    else
+    {
+         ANTCC_LOG_DEBUG("available::%s property=%s attribute missing !! "
+                          ,__FUNCTION__
+                          ,l_prop.c_str()); 
+    }
+    return EXEC_SUCCESS;
+},{},{} )
+
+void fileop_available::setFile(const std::string &_v)
+{
+    m_File = _v;
+}
+
+void fileop_available::setProperty(const std::string &_v)
+{
+    m_Property = _v;
+}
+
+}
diff --git a/src/tasks/fileop.h b/src/tasks/fileop.h
new file mode 100644 (file)
index 0000000..99a761b
--- /dev/null
@@ -0,0 +1,209 @@
+#ifndef __FILEOP_H__
+#define __FILEOP_H__
+
+namespace antcc {
+  namespace types {
+    class fileset;
+  }
+
+/**
+ * @brief base class for all file operations
+ * - try to avoid reimplentation of addAttribute
+ *   over and over. Maybe a template class
+ */
+class  fileop : public task
+{
+    public:
+        fileop ();
+        virtual ~fileop ();
+    protected:
+        antcc::types::fileset &fileSet()
+        { return m_Fileset; }
+    private:
+        /// fileset on which to operate
+        antcc::types::fileset m_Fileset;
+};
+
+
+/**
+ *
+ */
+class  fileop_mkdir : public fileop
+{
+    public:
+        fileop_mkdir ();
+        virtual ~fileop_mkdir ();
+        virtual eStatus execute() ;
+    private:
+        void setDefault(const std::string &_sv);
+        void setDir(const std::string &_sv);
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        template <typename C>                                                        
+        friend  struct element_attributes;
+        static xml::element_attributes<fileop_mkdir> gAttr []; 
+        antcc::path m_Dir;
+};
+
+/**
+ * @brief copy files or directories depending 
+ * in the attributes
+ *
+ */
+class  fileop_copy : public fileop
+{
+    public:
+        fileop_copy ();
+        virtual ~fileop_copy ();
+        virtual eStatus execute() ;
+    private:
+        void setDefault(const std::string &_sv);
+        void setFile(const std::string &_sv);
+        void setToDir(const std::string &_sv);
+        void setToFile(const std::string &_sv);
+        void setFlatten(const std::string &_sv);
+        void setFailOnError(const std::string &_sv);
+        void setOverwrite(const std::string &_sv);
+        void setVerbose(const std::string &_sv);
+
+        /// Can have a fileset as child. In that case,
+       /// We need to process the set.
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        template <typename C>                                                        
+        friend  struct element_attributes;
+        static xml::element_attributes<fileop_copy> gAttr []; 
+        antcc::file m_File;
+       bool        m_Verbose;
+};
+
+       
+/**
+ * @ move a file from 
+ */
+class  fileop_move : public fileop
+{
+    public:
+        fileop_move ();
+        virtual ~fileop_move ();
+        virtual eStatus execute() ;
+    private:
+        void setDefault(const std::string &_sv);
+        void setFile(const std::string &_sv);
+        void setToFile(const std::string &_sv);
+        void setOverwrite(const std::string &_sv);
+        void setSuffix(const std::string &_sv);
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        template <typename C>                                                        
+        friend  struct element_attributes;
+        static xml::element_attributes<fileop_move> gAttr []; 
+        antcc::file m_File;
+        std::string m_ToFile;
+        bool        m_Overwrite;
+};
+
+
+/**
+ *
+ */
+class  fileop_delete : public fileop
+{
+    public:
+        fileop_delete ();
+        virtual ~fileop_delete ();
+        virtual eStatus execute() ;
+    private:
+        // perform the delete operation
+
+        // Setter function called by parser
+        void setDefault(const std::string &_sv);
+        void setFile(const std::string &_sv);
+        void setDir(const std::string &_sv);
+        void setSuffix(const std::string &_sv);
+        void setVerbose(const std::string &_sv);
+        void setQuiet(const std::string &_sv);
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        template <typename C>
+        friend  struct element_attributes;
+        static xml::element_attributes<fileop_delete> gAttr []; 
+        antcc::file m_File;   ///! resolved file during parsing phase
+        antcc::path m_Path;   ///! resolved path during parsing phase
+        std::string m_Suffix; ///! TODO
+};
+
+/**
+ *
+ */
+class  fileop_basename : public task
+{
+    public:
+        fileop_basename ();
+        virtual ~fileop_basename ();
+        virtual eStatus execute() ;
+    private:
+        void setDefault(const std::string &_sv);
+        void setFile(const std::string &_sv);
+        void setProperty(const std::string &_sv);
+        void setSuffix(const std::string &_sv);
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        template <typename C>                                                        
+        friend  struct element_attributes;
+        static xml::element_attributes<fileop_basename> gAttr []; 
+        antcc::file m_File;
+        std::string m_Property;
+        std::string m_Suffix;
+};
+
+
+/**
+ *
+ */
+class  fileop_dirname : public task
+{
+    public:
+        fileop_dirname ();
+        virtual ~fileop_dirname ();
+        virtual eStatus execute() ;
+    private:
+        void setDefault(const std::string &_sv);
+        void setFile(const std::string &_sv);
+        void setProperty(const std::string &_sv);
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        template <typename C>                                                        
+        friend  struct element_attributes;
+        static xml::element_attributes<fileop_dirname> gAttr []; 
+        antcc::file m_File;
+        std::string m_Property;
+};
+
+
+/**
+ *
+ */
+class  fileop_available : public task
+{
+    public:
+        fileop_available ();
+        virtual ~fileop_available ();
+        virtual eStatus execute() ;
+    private:
+        void setDefault(const std::string &_sv);
+        void setFile(const std::string &_sv);
+        void setProperty(const std::string &_sv);
+        virtual void addChild(const char *_name,antcc::antElement *_task)  ;
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        template <typename C>                                                        
+        friend  struct element_attributes;
+        static xml::element_attributes<fileop_available> gAttr []; 
+        antcc::file m_File;
+        std::string m_Property;
+};
+
+
+#undef FILEOP
+}
+#endif
diff --git a/src/tasks/ifelse.cpp b/src/tasks/ifelse.cpp
new file mode 100644 (file)
index 0000000..dc6bda3
--- /dev/null
@@ -0,0 +1,129 @@
+#include <antcc/common.h>
+#include <tasks/ifelse.h>
+
+
+
+ifelse::ifelse()
+    : m_Else(NULL)
+{
+}
+
+ifelse::~ifelse()
+{
+}
+
+antcc::task::eStatus 
+ifelse::execute()
+{
+    std::string l_name;
+    std::string l_value;
+    std::string l_prop_name;
+    bool        l_test;
+    
+    if ( ! getResolvedAttribute("name",l_name))
+    {
+        getProject().log(*this,eERROR,"name not set");
+    }
+
+    if (getResolvedAttribute("value",l_value)
+            && getProject().getProperty(l_name,l_prop_name))
+    {
+        ANTCC_LOG_DEBUG("ifelse::%s got value %s"
+            ,__FUNCTION__
+            ,l_value.c_str());
+        if (!l_value.compare(l_prop_name))
+        {
+            getProject().log(*this,eINFO,"test prop %s = %s true"
+                            ,l_name.c_str()
+                            ,l_value.c_str());
+            return performTasks();
+        } else
+        {
+            getProject().log(*this,eINFO," test prop %s = %s false"
+                            ,l_name.c_str()
+                            ,l_value.c_str()
+                            );
+            if (m_Else != NULL)
+            {
+                return m_Else->execute();
+            }
+        }
+    }
+    else if (getResolvedAttribute("exists",l_test))
+    {
+        std::string l_prop;
+        if ( getProject().getProperty(l_name,l_prop) 
+                && l_test) 
+        {
+            getProject().log(*this,eINFO," property %s exists tests=%d"
+                             ,l_name.c_str()
+                             ,l_test
+                             );
+            return performTasks();
+        } else {
+            getProject().log(*this,eINFO," property %s exists tests=%d perform else"
+                             ,l_name.c_str()
+                             ,l_test
+                             );
+            if (m_Else != NULL)
+              return m_Else->execute();
+        }
+    }
+    else
+    {
+        ANTCC_LOG_ERROR("ifelse::%s  "
+            ,__FUNCTION__);
+        return performTasks();
+    }
+    return EXEC_SUCCESS;
+}
+/**
+ * @brief if and else  children are  mainly parameter to the call
+ * these parameters are actually used to set properties
+ */
+void 
+ifelse::addChild(const char *_name,antcc::antElement *_elt)
+{
+    if (_elt && _elt->isTask())
+    {
+        antcc::task *l_arg = static_cast<antcc::task *>(_elt);
+        ANTCC_LOG_DEBUG("ifelse::%s  add task %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        //_param->setProject(&getProject());
+        // m_Params.push_back(_param);
+        if (!std::string("else").compare(_name) )
+        {
+            m_Else = l_arg;
+        } else {
+            m_Tasks.push_back(l_arg);
+        }
+    } else 
+    {
+        ANTCC_LOG_DEBUG("ifelse::%s tag %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+    }
+
+}
+
+
+antcc::task::eStatus 
+ifelse::performTasks()
+{
+    eStatus l_return;
+    for (taskList_const_iterator it = m_Tasks.begin()
+            ; it != m_Tasks.end()
+            ; ++it)
+    {
+        if ( ( l_return  = (*it)->execute()) == EXEC_FAILED)
+        {
+            break;
+        }
+    }
+    return l_return;
+}
+
+
diff --git a/src/tasks/ifelse.h b/src/tasks/ifelse.h
new file mode 100644 (file)
index 0000000..9247f61
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef __TASK_IFELSE_H__
+#define __TASK_IFELSE_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ * There four ways to use this 
+ * ->   name and value to set one ifelse
+ * ->   file        : to read properties from a file.
+ * ->   url         : to retrived properties from the internel
+ * ->   environment : all environment variables will be imported as properties with as follow
+ *                    the environment prefix dot environment variable name.
+ */
+class ifelse : public antcc::task
+{
+    public:
+        typedef std::vector<task *>                 taskList_type;
+        typedef std::vector<task *>::iterator       taskList_iterator;
+        typedef std::vector<task *>::const_iterator taskList_const_iterator;
+        ///
+        ifelse() ;
+        ///
+        virtual ~ifelse();
+        ///
+        virtual eStatus execute() ;
+        ///
+        void addChild(const char *_name,antcc::antElement *_elt);
+    protected:
+        eStatus performTasks();
+    private:
+        task *m_Else;
+        taskList_type m_Tasks;
+};
+
+
+class ifelse_else : public ifelse
+{
+    public:
+        ifelse_else() {};
+        virtual ~ifelse_else() {};
+        virtual eStatus execute()
+        { return performTasks(); } ;
+};
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/import.cpp b/src/tasks/import.cpp
new file mode 100644 (file)
index 0000000..2da3fb3
--- /dev/null
@@ -0,0 +1,80 @@
+#include <antcc/common.h>
+#include <fstream>
+#include <tasks/import.h>
+
+#include <expat.h>
+#include <location.h>
+#include <xml/parser/parser_base.h>
+#include <xml/parser/ant_elements_parser.h>
+#include <xml/parser/document.h>
+
+
+
+/**
+ * Attributes supported by exec
+ */
+antcc::xml::element_attributes<import> import::gAttr[] = 
+{
+  {"file",&import::setFile}
+  , {"as",&import::setAs}
+  , {NULL,NULL}
+}; 
+
+
+import::import()
+{
+}
+
+import::~import()
+{
+}
+
+antcc::task::eStatus 
+import::execute()
+{
+    eStatus l_return = EXEC_FAILED;
+    antcc::project &l_Project = getProject();
+    l_Project.setImport(true);
+    ::antcc::parser::ProjectParser  project_parser(&l_Project,&l_Project);
+    ::antcc::parser::Document doc(project_parser,"project");
+    std::ifstream bf(m_File.name());
+    if (bf.is_open())
+    {
+        getProject().log(*this,eINFO,"file %s"
+                       ,m_File.name().c_str()
+                       ) ;
+        doc.parse(bf);
+        eStatus l_return = EXEC_SUCCESS;
+    } else
+    {
+        getProject().log(*this,eINFO,"could not open %s "
+                       ,m_File.name().c_str()
+                       );
+    }
+    l_Project.setImport(false);
+    return l_return;
+}
+
+///
+bool 
+import::addAttribute(const std::string &_name,const std::string &_v)  
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<import>(this,import::gAttr,_name,_v)) == true)
+    {
+        antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+///
+void 
+import::setFile(const std::string &_str)
+{
+    m_File = getProject().resolveFile(antcc::file(_str));
+}
+///
+void 
+import::setAs(const std::string &s)
+{
+}
+
diff --git a/src/tasks/import.h b/src/tasks/import.h
new file mode 100644 (file)
index 0000000..11cadb7
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef __TASK_IMPORT_H__
+#define __TASK_IMPORT_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ */
+class import : public antcc::task
+{
+    public:
+        ///
+        import() ;
+        ///
+        virtual ~import();
+        ///
+        virtual eStatus execute() ;
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+       ///
+        ///
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        ///
+        void setFile(const std::string &s);
+        ///
+        void setAs(const std::string &s);
+    private:
+       antcc::file m_File;
+        std::string m_As;
+       static ::antcc::xml::element_attributes<import> gAttr []; 
+};
+
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/loadfile.cpp b/src/tasks/loadfile.cpp
new file mode 100644 (file)
index 0000000..7de2719
--- /dev/null
@@ -0,0 +1,44 @@
+#include <antcc/common.h>
+#include <tasks/loadfile.h>
+
+
+
+/**
+ * Attributes supported by exec
+ */
+antcc::xml::element_attributes<loadfile> loadfile::gAttr[] = 
+{
+  {"property",&loadfile::setDefault}
+  , {"srcFile",&loadfile::setDefault}
+  , {"failonerror",&loadfile::setDefault}
+  , {NULL,NULL}
+}; 
+
+loadfile::loadfile()
+{
+    ANTCC_LOG_DEBUG("loadfile::loadfile created  %s","");
+}
+
+loadfile::~loadfile()
+{
+}
+
+antcc::task::eStatus 
+loadfile::execute()
+{
+    getProject().log(*this,eINFO,"TODO");
+    return EXEC_SUCCESS;   
+}
+
+bool 
+loadfile::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<loadfile>(this,loadfile::gAttr,_name,_v)) == true)
+    {
+       antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+
diff --git a/src/tasks/loadfile.h b/src/tasks/loadfile.h
new file mode 100644 (file)
index 0000000..043adf5
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __LOAD_FILE_H__
+#define __LOAD_FILE_H__
+
+
+
+/**
+ *
+ */
+class loadfile : public antcc::task
+{
+    public:
+        ///
+        loadfile() ;
+        ///
+        virtual ~loadfile();
+        ///
+        virtual eStatus execute() ;
+
+       bool 
+       addAttribute(const std::string &_name,const std::string &_v);
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+       ///
+       void setDefault(const std::string &_v) {};
+    private:
+       static ::antcc::xml::element_attributes<loadfile> gAttr []; 
+};
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/loadproperties.cpp b/src/tasks/loadproperties.cpp
new file mode 100644 (file)
index 0000000..aea235e
--- /dev/null
@@ -0,0 +1,22 @@
+#include <antcc/common.h>
+#include <tasks/loadproperties.h>
+
+
+
+loadproperties::loadproperties()
+{
+    ANTCC_LOG_DEBUG("loadproperties::loadproperties created  %s","");
+}
+
+loadproperties::~loadproperties()
+{
+}
+
+antcc::task::eStatus 
+loadproperties::execute()
+{
+    return EXEC_SUCCESS;   
+}
+
+
+
diff --git a/src/tasks/loadproperties.h b/src/tasks/loadproperties.h
new file mode 100644 (file)
index 0000000..f6b2d6d
--- /dev/null
@@ -0,0 +1,22 @@
+#ifndef __LOAD_PROPERTIES_H__
+#define __LOAD_PROPERTIES_H__
+
+
+
+/**
+ *
+ */
+class loadproperties : public antcc::task
+{
+    public:
+        ///
+        loadproperties() ;
+        ///
+        virtual ~loadproperties();
+        ///
+        virtual eStatus execute() ;
+    private:
+};
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/macrodef.cpp b/src/tasks/macrodef.cpp
new file mode 100644 (file)
index 0000000..2777c82
--- /dev/null
@@ -0,0 +1,255 @@
+#include <antcc/common.h>
+
+#include <tasks/ITaskContainer.h>
+#include <tasks/taskContainer.h>
+#include <tasks/macrodef.h>
+
+namespace antcc {
+
+/**
+ *
+ *
+ */
+class macroInstance  : public task
+{
+    public:
+        ///
+        macroInstance(const char *id)
+        {
+            antElement::setName(id);
+        }
+        ///
+        virtual ~macroInstance()
+        {
+        }
+        /**
+         * @brief how do we execute the macro ?
+         * The task list is in macrodef object.
+         * Should I clone the task list ?
+         *
+         */
+        virtual eStatus execute() 
+        {
+            antcc::task::eStatus l_return = antcc::task::EXEC_NONE;
+            ANTCC_LOG_DEBUG("macroInstance::%s exectute %s"
+                    ,__FUNCTION__
+                    ,getName());
+
+           getProject().log(*this,eINFO,"see %s",getName());
+           
+            if (m_Model == nullptr)
+           {
+               getProject().log(*this,eERROR,"%s Model is NULL  very bad",getName());
+           } else
+            {
+                const antcc::ITaskContainer::taskList_type &tl = m_Model->getTaskList();
+                for (auto it = tl.begin();  it != tl.end();++it)
+                { 
+                    if ( (l_return = (*it)->execute()) != EXEC_SUCCESS)
+                    {
+                        break;
+                    }
+                }
+            }
+            return l_return;
+        }
+
+        ///
+        virtual void addChild(const char *_name,antcc::antElement *_task)
+        {
+            ANTCC_LOG_WARN("macroInstance::%s %s unsupported for tag %s "
+                    ,__FUNCTION__
+                   ,_name
+                    ,getName());
+        }
+
+        ///
+        virtual bool addAttribute(const std::string &_name,const std::string &_val)
+        {
+           if (m_Model->isAttributeAllowed(_name))
+           {
+                antElement::addAttribute(_name,_val);
+                return true;
+           } else {
+              ANTCC_LOG_WARN("macroInstance::%s %s unsupported for tag %s "
+                    ,__FUNCTION__
+                   ,_name.c_str()
+                    ,getName());
+           }
+            return false;
+        }
+        
+        ///
+        virtual void setProject(project *_p)
+        {
+            projectComponent::setProject(_p);
+            // Get macro !!!
+            m_Model = static_cast<macrodef *>(_p->getMacro(getName()));
+           if (m_Model == nullptr)
+           {
+               getProject().log(*this,eERROR,"Undefined macro %s",getName());
+           }
+        }
+        ///
+        virtual void setLocation(const Location &_loc)
+        {
+            projectComponent::setLocation(_loc);
+        }
+    private:
+        macrodef  *m_Model;
+};
+
+}
+
+
+/**
+ * Attributes supported by exec
+ */
+antcc::xml::element_attributes<macrodef> macrodef::gAttr[] = 
+{
+  {"name",&macrodef::setName}
+  , {"optional",&macrodef::setOptional}
+  , {"trim",&macrodef::setTrim}
+  , {NULL,NULL}
+}; 
+
+
+macrodef::macrodef()
+{
+}
+
+macrodef::~macrodef()
+{
+}
+
+antcc::task::eStatus 
+macrodef::execute()
+{
+    eStatus l_return = EXEC_FAILED;
+
+    antcc::antLibElementFactoryRegistration<antcc::macroInstance> _r(m_MacroName.c_str());
+    return l_return;
+}
+
+/**
+ *
+ */
+void 
+macrodef::addChild(const char *_name,antcc::antElement *_elt)
+{
+    if (_elt  && !std::string("attribute").compare(_name))
+    {
+        macro_arg *_arg = static_cast<macro_arg *>(_elt);
+        /// Maybe a simple list is enough
+        m_AllowedAttributes[_arg->getArgumentName()] = _arg->getArgumentName();
+        delete _elt;
+    } else if (_elt  && !std::string("element").compare(_name))
+    {
+        ANTCC_LOG_WARN("macrodef()::%s  add element %s "
+                ,__FUNCTION__
+                ,_name
+                );
+        delete _elt;
+    }else if (_elt && _elt->isTask() )
+    {
+        antcc::task *_task = static_cast<antcc::task *>(_elt);
+        addTask(_task);
+    } else 
+    {
+        ANTCC_LOG_WARN("%s tag %s no supported _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        delete _elt;
+    }
+}
+///
+bool 
+macrodef::addAttribute(const std::string &_name,const std::string &_v)  
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<macrodef>(this,macrodef::gAttr,_name,_v)) == true)
+    {
+        antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+///
+void 
+macrodef::setName(const std::string &s)
+{
+    m_MacroName = s;
+}
+///
+void 
+macrodef::setOptional(const std::string &s)
+{
+}
+///
+void 
+macrodef::setTrim(const std::string &s)
+{
+}
+
+///
+bool 
+macrodef::isAttributeAllowed(const std::string &_name) const
+{
+    antcc::antElement::attrMap_const_iterator it = m_AllowedAttributes.find(_name);
+    return (it != m_AllowedAttributes.end() );
+}
+
+/**
+ * marcro_arg
+ */
+
+/**
+ * Attributes supported by exec
+ */
+antcc::xml::element_attributes<macro_arg> macro_arg::gAttr[] = 
+{
+  {"name",&macro_arg::setName}
+  , {NULL,NULL}
+}; 
+
+
+macro_arg::macro_arg()
+ :antcc::projectComponent(eArgument)
+{
+}
+
+macro_arg::~macro_arg()
+{
+}
+
+/**
+ *
+ */
+void 
+macro_arg::addChild(const char *_name,antcc::antElement *_elt)
+{
+        ANTCC_LOG_WARN("macro_arg()::%s  add attribute elt %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        delete _elt;
+}
+
+///
+bool 
+macro_arg::addAttribute(const std::string &_name,const std::string &_v)  
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<macro_arg>(this,macro_arg::gAttr,_name,_v)) == true)
+    {
+        antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+///
+void 
+macro_arg::setName(const std::string &s)
+{
+    m_ArgName = s;
+}
diff --git a/src/tasks/macrodef.h b/src/tasks/macrodef.h
new file mode 100644 (file)
index 0000000..80ce228
--- /dev/null
@@ -0,0 +1,80 @@
+#ifndef __TASK_MACRODEF_H__
+#define __TASK_MACRODEF_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ */
+class macrodef : public taskContainer
+{
+    public:
+        ///
+        macrodef() ;
+        ///
+        virtual ~macrodef();
+        ///
+        virtual eStatus execute() ;
+       ///
+       bool isAttributeAllowed(const std::string &_name) const;
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+        ///
+        /// filter out element and attribute, the reset goes to
+       /// the container
+       virtual void addChild(const char *_name,antcc::antElement *_task);
+        ///
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        ///  Set Macro Name
+        void setName(const std::string &s);
+        ///
+        void setOptional(const std::string &s);
+        ///
+        void setDescription(const std::string &s);
+        ///
+        void setTrim(const std::string &s);
+    private:
+        std::string m_Trim;
+        std::string m_Description;
+        std::string m_MacroName; //! name of the macro beeing defined
+        static ::antcc::xml::element_attributes<macrodef> gAttr []; 
+       antcc::antElement::attrMap_type m_AllowedAttributes;
+};
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ */
+class macro_arg : public antcc::projectComponent
+{
+    public:
+        ///
+        macro_arg() ;
+        ///
+        virtual ~macro_arg();
+       ///
+       const std::string &getArgumentName() const
+       { return m_ArgName; }
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+        ///
+        /// filter out element and attribute, the reset goes to
+       /// the container
+       virtual void addChild(const char *_name,antcc::antElement *_task);
+        ///
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        ///  Set Macro Name
+        void setName(const std::string &s);
+    private:
+        std::string m_ArgName; //! name of the macro beeing defined
+        static ::antcc::xml::element_attributes<macro_arg> gAttr []; 
+};
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/property.cpp b/src/tasks/property.cpp
new file mode 100644 (file)
index 0000000..efbad5e
--- /dev/null
@@ -0,0 +1,82 @@
+#include <antcc/common.h>
+#include <tasks/property.h>
+
+#include <properties/reference_parser.h>
+extern "C" char **environ;
+
+/**
+ * Attributes supported by exec
+ */
+antcc::xml::element_attributes<property> property::gAttr[] = {
+  {"name",&property::setDefault}
+  , {"value",&property::setDefault}
+  , {"file",&property::setDefault}
+  , {"environment",&property::setDefault}
+  , {NULL,NULL}
+}; 
+
+property::property()
+{
+    ANTCC_LOG_DEBUG("property::property created  %s","");
+}
+
+property::~property()
+{
+}
+
+antcc::task::eStatus 
+property::execute()
+{
+    std::string l_name,l_value;
+    if (getAttribute("name",l_name) 
+            && getResolvedAttribute("value",l_value))
+    {
+        antcc::prop::parser p(getProject());
+
+        std::string l_resolved;
+        l_resolved = p.resolve(l_value);
+        ANTCC_LOG_DEBUG("property::%s  set simple name %s resolved %s"
+            ,__FUNCTION__
+            ,l_name.c_str()
+            ,l_resolved.c_str());
+        getProject().log(*this,eINFO,"Set %s to %s",l_name.c_str(),l_value.c_str());
+        getProject().setProperty(l_name,l_value);
+    } else if (getResolvedAttribute("file",l_value))
+    {
+        ANTCC_LOG_DEBUG("property::%s  file=%s"
+            ,__FUNCTION__
+            ,l_value.c_str());
+    } else if (getResolvedAttribute("environment",l_value))
+    {
+        //TODO: find a better way, put this in the OS class
+        // provide a better interface to iterate of the VARIABLES
+        l_value.append(".");
+        for (int i = 0 ; environ[i] != 0 ; ++i)
+        {
+            std::string l_env(environ[i]);
+            size_t _pos = l_env.find_last_of('=');
+            std::string l_env_val = l_env.substr(_pos+1);
+            std::string l_p = l_env.substr(0,_pos);
+            l_p.insert(0,l_value);
+            getProject().setProperty(l_p,l_env_val);
+        }
+    }else
+    {
+        ANTCC_LOG_DEBUG("property::%s  "
+            ,__FUNCTION__);
+    }
+    return EXEC_SUCCESS;
+}
+
+bool 
+property::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<property>(this,property::gAttr,_name,_v)) == true)
+    {
+       antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+
diff --git a/src/tasks/property.h b/src/tasks/property.h
new file mode 100644 (file)
index 0000000..8165baa
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef __PROPERTY_H__
+#define __PROPERTY_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ * There four ways to use this 
+ * ->   name and value to set one property
+ * ->   file        : to read properties from a file.
+ * ->   url         : to retrived properties from the internel
+ * ->   environment : all environment variables will be imported as properties with as follow
+ *                    the environment prefix dot environment variable name.
+ */
+class property : public antcc::task
+{
+    public:
+        ///
+        property() ;
+        ///
+        virtual ~property();
+        ///
+        virtual eStatus execute() ;
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+        void setDefault(const std::string &s) {};
+    private:
+       static antcc::xml::element_attributes<property> gAttr []; 
+};
+
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/sleep.cpp b/src/tasks/sleep.cpp
new file mode 100644 (file)
index 0000000..7b05750
--- /dev/null
@@ -0,0 +1,37 @@
+#include <antcc/common.h>
+#include <tasks/sleep.h>
+
+
+
+sleep::sleep()
+{
+}
+
+sleep::~sleep()
+{
+}
+
+/**
+ * possible attributes are
+ * hours
+ * minutes
+ * seconds
+ * milliseconds
+ * failonerror
+ */
+antcc::task::eStatus 
+sleep::execute()
+{
+    std::string _name;
+    if (getResolvedAttribute("milliseconds",_name))
+    {
+        getProject().log(*this,eINFO,_name);
+    } else
+    {
+        ANTCC_LOG_ERROR("sleep::%s  "
+            ,__FUNCTION__);
+    }
+    return EXEC_SUCCESS;
+}
+
+
diff --git a/src/tasks/sleep.h b/src/tasks/sleep.h
new file mode 100644 (file)
index 0000000..b2dfe0f
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef __TASK_SLEEP_H__
+#define __TASK_SLEEP_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ * There four ways to use this 
+ * ->   name and value to set one sleep
+ * ->   file        : to read properties from a file.
+ * ->   url         : to retrived properties from the internel
+ * ->   environment : all environment variables will be imported as properties with as follow
+ *                    the environment prefix dot environment variable name.
+ */
+class sleep : public antcc::task
+{
+    public:
+        ///
+        sleep() ;
+        ///
+        virtual ~sleep();
+        ///
+        virtual eStatus execute() ;
+    private:
+};
+
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/ssh/sshBase.h b/src/tasks/ssh/sshBase.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/tasks/ssh/sshExec.h b/src/tasks/ssh/sshExec.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/tasks/ssh/sshScp.h b/src/tasks/ssh/sshScp.h
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/tasks/subant.cpp b/src/tasks/subant.cpp
new file mode 100644 (file)
index 0000000..27473b1
--- /dev/null
@@ -0,0 +1,32 @@
+#include <antcc/common.h>
+#include <tasks/subant.h>
+
+namespace antcc 
+{
+
+subant::subant()
+{
+    ANTCC_LOG_DEBUG("subant::subant %s","");
+}
+
+subant::~subant()
+{
+}
+
+task::eStatus subant::execute()
+{
+    std::string   l_antfile;
+    task::eStatus l_status = EXEC_SUCCESS;
+
+    if ( (l_status == EXEC_SUCCESS) && getAttribute("antfile",l_antfile) )
+    {
+         ANTCC_LOG_DEBUG("subant::%s antfile=%s todo "
+                         ,__FUNCTION__
+                         ,l_antfile.c_str()); 
+    } else {
+    }
+
+    return l_status;
+}
+
+}
diff --git a/src/tasks/subant.h b/src/tasks/subant.h
new file mode 100644 (file)
index 0000000..28e73c4
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef __SUBANT_H__
+#define __SUBANT_H__
+
+namespace antcc {
+/**
+ *
+ */
+class subant : public task
+{
+    public:
+        subant() ;
+       virtual ~subant();
+        virtual eStatus execute() ;
+    private:
+};
+
+}
+#endif
diff --git a/src/tasks/task.h b/src/tasks/task.h
new file mode 100644 (file)
index 0000000..114c769
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __ANTCC_TASK_H__
+#define __ANTCC_TASK_H__
+
+namespace antcc
+{
+    class target;
+/**
+ * @brief interface for all tasks.
+ * what's common ? The name, dependencies
+ */
+class task : public projectComponent 
+{
+  public:
+    enum eStatus {EXEC_NONE,EXEC_SUCCESS,EXEC_FAILED,EXEC_FAILED_CONTINUE};
+  public:
+    task() : projectComponent(antElement::eTask) {};
+    virtual ~task() {};
+
+    virtual eStatus execute() = 0 ;
+
+    void setOwningTarget(target *_target)
+    { m_OwningTarget = _target; };
+    
+    target *getOwningTarget() const
+    { return m_OwningTarget;    };
+  private:
+    target *m_OwningTarget;
+};
+
+}
+
+#define ANTCC_LIBRARY_MAKER(cls,tag)     \
+extern "C" {                             \
+        cls * tag ## _maker() {           \
+                return new cls();        \
+        }                                \
+        void tag ## _destroyer( cls *p) { \
+                delete p;                \
+        }                                \
+}                                          
+
+#endif
diff --git a/src/tasks/taskContainer.cpp b/src/tasks/taskContainer.cpp
new file mode 100644 (file)
index 0000000..0e4b8b7
--- /dev/null
@@ -0,0 +1,85 @@
+#include <antcc/common.h>
+#include <tasks/ITaskContainer.h>
+#include <tasks/taskContainer.h>
+
+
+/**
+ * Attributes supported by exec
+ */
+antcc::xml::element_attributes<taskContainer> taskContainer::gAttr[] = 
+{
+{"unless",&taskContainer::setDefault}
+, {NULL,NULL}
+}; 
+
+
+taskContainer::taskContainer()
+{
+}
+
+taskContainer::~taskContainer()
+{
+}
+
+antcc::task::eStatus 
+taskContainer::execute()
+{
+    antcc::task::eStatus l_return = antcc::task::EXEC_NONE;
+    getProject().log(*this,eINFO,"todo %s ",__FUNCTION__);
+    for ( taskList_const_iterator it = m_Tasks.begin()
+           ; it != m_Tasks.end()
+           ; ++it)
+    {
+        if ( (l_return = (*it)->execute()) == antcc::task::EXEC_FAILED)
+        {
+             ANTCC_LOG_ERROR("%s execution failed "
+                     ,__FUNCTION__);
+             break;
+        }
+    }
+    return l_return;
+}
+
+void 
+taskContainer::addChild(const char *_name,antcc::antElement *_elt)
+{
+    if (_elt && _elt->isTask())
+    {
+        antcc::task *_task = static_cast<antcc::task *>(_elt);
+        ANTCC_LOG_DEBUG("taskContainer()::%s  add task %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+        addTask(_task);
+    } else 
+    {
+        ANTCC_LOG_WARN("%s tag %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+    }
+}
+///
+bool 
+taskContainer::addAttribute(const std::string &_name,const std::string &_v)  
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<taskContainer>(this,taskContainer::gAttr,_name,_v)) == true)
+    {
+        antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+void 
+taskContainer::addTask(antcc::task *_task)
+{
+    //_task->setOwningTarget(this);
+    _task->setProject(&getProject());
+    m_Tasks.push_back(_task);
+}
+void 
+taskContainer::setDefault(const std::string &_s)
+{
+}
+
diff --git a/src/tasks/taskContainer.h b/src/tasks/taskContainer.h
new file mode 100644 (file)
index 0000000..f955c9e
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef __TASK_TASKCONTAINER_H__
+#define __TASK_TASKCONTAINER_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ * project. The properties once set cannot be changed anymore.
+ *
+ */
+class taskContainer : public antcc::task, public virtual antcc::ITaskContainer
+{
+    public:
+        /// Default constructor
+        taskContainer() ;
+        /// Destructor
+        virtual ~taskContainer();
+        /// task container execution depends on type of container !!!
+       /// There is nothing executed in Macrodef, only instances of macrodef
+       /// are executed
+        virtual eStatus execute() ;
+        /// add task to container.
+        virtual void addTask(antcc::task *_t) ;
+        /// needs to be reimplemented
+       virtual void addChild(const char *_name,antcc::antElement *_task);
+       /// return the task list
+       const taskList_type &getTaskList() const
+       { return m_Tasks; }
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+        ///
+        ///
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+        ///
+       void setDefault(const std::string &_s);
+    private:
+        static ::antcc::xml::element_attributes<taskContainer> gAttr [];
+               taskList_type m_Tasks;
+};
+
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/tasks/taskdef.cpp b/src/tasks/taskdef.cpp
new file mode 100644 (file)
index 0000000..10587c0
--- /dev/null
@@ -0,0 +1,190 @@
+#include <antcc/common.h>
+#include <tasks/taskdef.h>
+
+#include <ltdl.h>
+
+
+
+
+namespace antcc 
+{
+
+/**
+ * @brief protected class that transfers all calls to the underlying task
+ * in the dynamic library. The main reason for the existance of this object
+ * is to be sure that we will call the right delete operator for the 
+ * dynamically created task
+ *
+ * TODO: Missing virtual method to transfer the attributes to the underlying 
+ * object
+ */
+class  taskdef_wrapper : public task
+{
+    public:
+        taskdef_wrapper(const char *id)
+        {
+                m_Task = taskdef::getMakerMap()[id].m_Maker();
+                m_Task->setName(id);
+        }
+        virtual ~taskdef_wrapper()
+        {
+        }
+
+        virtual eStatus execute() 
+        {
+            ANTCC_LOG_DEBUG("taskdef_wrapper::%s",__FUNCTION__);
+            return m_Task->execute();
+        }
+        virtual void addChild(const char *_name,antcc::antElement *_task)
+        {
+            m_Task->addChild(_name,_task);
+        }
+
+        virtual bool addAttribute(const std::string &_name,const std::string &_val)
+        {
+            return m_Task->addAttribute(_name,_val);
+        }
+        
+        virtual void setProject(project *_p)
+        {
+            m_Task->setProject(_p);
+        }
+         
+        virtual void setLocation(const Location &_loc)
+        {
+            m_Task->setLocation(_loc);
+        }
+    private:
+        task *m_Task;
+};
+
+
+
+/**
+ *
+ */
+taskdef::taskdef()
+{
+    ANTCC_LOG_DEBUG("taskdef::taskdef %s","");
+    taskdef::getLibraryMap();
+}
+
+/**
+ *
+ */
+taskdef::~taskdef()
+{
+}
+
+/**
+ *
+ */
+task::eStatus taskdef::execute()
+{
+    ANTCC_LOG_DEBUG("taskdef::%s",__FUNCTION__);
+    registerTaskFactory();
+    return EXEC_SUCCESS;
+}
+
+taskdef::library_handle
+taskdef::getLibrary(const std::string &s)
+{
+    return taskdef::getLibraryMap()[s];
+}
+
+taskdef::library_handle
+taskdef::addLibrary(const std::string &s)
+{
+    library_handle l_handle = nullptr;
+   // Check if Library is loaded
+   // If so, return the handle no need to reload the library
+   // If not,Load new library,
+   if ((l_handle = lt_dlopen(s.c_str())) != nullptr)
+   {
+       taskdef::getLibraryMap()[s] = l_handle;
+   } else 
+   {
+        ANTCC_LOG_ERROR("taskdef::%s failed %s erro=%s"
+                ,__FUNCTION__
+                ,s.c_str()
+                ,lt_dlerror()
+               );
+   }
+   // insert into map, and return library handle
+   return l_handle;
+}
+
+/**
+ *
+ */
+bool
+taskdef::registerTaskFactory()
+{
+    libTaskMaker l_m;
+    std::string l_lib;
+    bool l_ok = true;
+    if ((l_ok = getAttribute("name",l_m.m_TaskName)) == true)
+    {
+    }
+    if (l_ok
+        && (l_ok =getResolvedAttribute("lib",l_lib)))
+    {
+        library_handle l_handler = addLibrary(l_lib);
+        // Ok, get maker and destroy
+        if ( l_handler != nullptr)
+        {
+            std::string l_maker(l_m.m_TaskName);
+            l_maker.append("_maker");
+            std::string l_destroyer(l_m.m_TaskName);
+            l_destroyer.append("_destroyer");
+            if (( l_m.m_Maker = (maker)(lt_dlsym(l_handler,l_maker.c_str()))) == nullptr)
+            {
+                l_ok = false;
+                ANTCC_LOG_ERROR("taskdef::%s failed no maker",__FUNCTION__);
+            }
+            if (( l_m.m_Destroyer = (destroyer)lt_dlsym(l_handler,l_destroyer.c_str())) == nullptr)
+            {
+                l_ok = false;
+            }
+            if (l_ok)
+            {
+                antLibElementFactoryRegistration<taskdef_wrapper> _r(l_m.m_TaskName.c_str());
+                taskdef::getMakerMap()[l_m.m_TaskName] = l_m;
+            }
+        } else {
+            l_ok = false; 
+            ANTCC_LOG_ERROR("taskdef::%s failed lib=%s"
+                    ,__FUNCTION__
+                    ,l_lib.c_str());
+        }
+    }
+    return l_ok;
+}
+
+/**
+ *
+ */
+taskdef::libraryMap&
+taskdef::getLibraryMap()
+{
+    static libraryMap gLibraryMap;
+    static int _init = 0;
+    if (!_init)
+    {
+        lt_dlinit();
+        _init = 1;
+    }
+    return gLibraryMap;
+}
+
+/**
+ *
+ */
+taskdef::makerMap     &
+taskdef::getMakerMap()
+{
+    static makerMap gMakerMap;
+    return gMakerMap;
+}
+
+}
diff --git a/src/tasks/taskdef.h b/src/tasks/taskdef.h
new file mode 100644 (file)
index 0000000..9e94c80
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef __TASKDEF_H__
+#define __TASKDEF_H__
+
+struct lt_dlhandle_struct;
+namespace antcc {
+/**
+ *
+ */
+class taskdef : public task
+{
+    public:
+        typedef antcc::task *(*maker)();
+        typedef void (*destroyer)(antcc::task *);
+        typedef struct lt_dlhandle_struct *library_handle;
+
+        typedef struct  _objMapper
+        {
+            std::string m_TaskName;
+            maker       m_Maker;
+            destroyer   m_Destroyer;
+        } libTaskMaker;
+        typedef std::unordered_map<std::string,library_handle> libraryMap;
+        typedef std::unordered_map<std::string,libTaskMaker>   makerMap;
+
+        taskdef() ;
+        virtual ~taskdef();
+        virtual eStatus execute() ;
+        static makerMap     &getMakerMap();
+
+    private:
+        library_handle getLibrary(const std::string &s);
+        library_handle addLibrary(const std::string &s);
+        bool           registerTaskFactory();
+        static libraryMap     &getLibraryMap();
+};
+
+}
+#endif
diff --git a/src/tasks/xslt.cpp b/src/tasks/xslt.cpp
new file mode 100644 (file)
index 0000000..452d20c
--- /dev/null
@@ -0,0 +1,133 @@
+#include <antcc/common.h>
+#include <tasks/xslt.h>
+
+#include <libxml/xmlmemory.h>
+#include <libxml/debugXML.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/xmlIO.h>
+#include <libxml/xinclude.h>
+#include <libxml/catalog.h>
+#include <libxslt/xslt.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
+
+extern "C" {
+
+   xslt * xslt_maker()
+   { return new xslt(); }
+   void xslt_destroyer(antcc::task *p)
+   { delete p; }
+};
+
+/**
+ *
+ */
+class xsltproc
+{
+    public:
+        typedef std::vector<std::string > paramArray;
+
+        xsltproc(const std::string &_in,const std::string &_style)
+        {
+            xmlSubstituteEntitiesDefault(1);
+            xmlLoadExtDtdDefaultValue = 1;
+            m_cur = xsltParseStylesheetFile ( (const xmlChar *)_style.c_str());
+            m_doc = xmlParseFile(_in.c_str());
+        }
+        /// Perfom cleanup
+        ~xsltproc()
+        {
+            xsltFreeStylesheet(m_cur);
+            xmlFreeDoc(m_doc);
+            xmlFreeDoc(m_res);
+            xsltCleanupGlobals();
+            xmlCleanupParser();
+        }
+        
+        void apply(const std::string &_out,paramArray &_params)
+        {
+            const char *l_params[20] ;
+            l_params[0] = NULL;
+            m_res = xsltApplyStylesheet(m_cur,m_doc,l_params);
+            FILE *l_out = fopen(_out.c_str(),"w");
+            if (l_out)
+            {
+                xsltSaveResultToFile(l_out,m_res,m_cur);
+                fclose(l_out);
+            } else
+            {
+                xsltSaveResultToFile(stdout,m_res,m_cur);
+            }
+        }
+
+    protected:
+        xmlDocPtr         m_doc,m_res;
+        xsltStylesheetPtr m_cur;
+};
+
+
+/**
+ * Attributes supported by exec
+ */
+antcc::xml::element_attributes<xslt> xslt::gAttr[] = 
+{
+  {"in",&xslt::setInput}
+  , {"out",&xslt::setOutput}
+  , {"style",&xslt::setStylesheet}
+  , {NULL,NULL}
+}; 
+
+
+
+xslt::xslt()
+{
+}
+
+xslt::~xslt()
+{
+}
+
+/**
+ * attributes
+ * in,out,style
+ */
+antcc::task::eStatus 
+xslt::execute()
+{
+    xsltproc::paramArray l_p;
+    getProject().log(*this,eINFO,"load stylesheet %s",m_Stylesheet.basename().c_str());
+    xsltproc l_proc(m_Input.name(),m_Stylesheet.name());
+    getProject().log(*this,eINFO,"generating %s",m_Output.basename().c_str());
+    l_proc.apply(m_Output.name(),l_p);
+    return EXEC_SUCCESS;
+}
+
+bool
+xslt::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<xslt>(this,xslt::gAttr,_name,_v)) == true)
+    {
+        antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+void
+xslt::setStylesheet(const std::string &_str)
+{ 
+    m_Stylesheet = getProject().resolveFile(antcc::file(_str));
+}
+
+void 
+xslt::setInput(const std::string &_str)
+{ 
+    m_Input = getProject().resolveFile(antcc::file(_str));
+}
+
+void 
+xslt::setOutput(const std::string &_str)
+{ 
+    m_Output = getProject().resolveFile(antcc::file(_str));
+}
diff --git a/src/tasks/xslt.h b/src/tasks/xslt.h
new file mode 100644 (file)
index 0000000..2461bf0
--- /dev/null
@@ -0,0 +1,41 @@
+#ifndef __TASK_XSLT_H__
+#define __TASK_XSLT_H__
+
+
+/**
+ * @brief This tag sets one or multiple proproties for the
+ *
+ * attributes
+ * in
+ * out
+ * style
+ */
+class xslt : public antcc::task
+{
+    public:
+        ///
+        xslt() ;
+        ///
+        virtual ~xslt();
+        ///
+        virtual eStatus execute() ;
+    private:
+        void setStylesheet(const std::string &_str);
+        
+        void setInput(const std::string &_str);
+        
+        void setOutput(const std::string &_str);
+    protected:
+        virtual bool addAttribute(const std::string &_name,const std::string &_val);
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+    private:
+        static ::antcc::xml::element_attributes<xslt> gAttr []; 
+        antcc::file m_Input,m_Output,m_Stylesheet;
+};
+
+
+
+#endif
+/* vim:et:sw=4:ts=4:list: */
diff --git a/src/types/datatype.h b/src/types/datatype.h
new file mode 100644 (file)
index 0000000..9696929
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef __DATATYPE_H__
+#define __DATATYPE_H__
+
+namespace antcc {
+namespace types {
+/**
+ *
+ */
+class datatype : public projectComponent
+{
+    public:
+        datatype() : projectComponent(eType) { };
+       virtual ~datatype() {};
+    protected:
+       /// Methods that can be used by sub classe
+    private:
+};
+
+} // end ns type
+} // end ns antcc
+#endif
diff --git a/src/types/dregister.cpp b/src/types/dregister.cpp
new file mode 100644 (file)
index 0000000..1bb0503
--- /dev/null
@@ -0,0 +1,33 @@
+#include <antcc/common.h>
+
+#include <tasks/property.h>
+#include <tasks/loadproperties.h>
+
+#include <tasks/ITaskContainer.h>
+#include <target.h>
+
+#include <types/datatype.h>
+#include <types/fileset.h>
+#include <types/include.h>
+
+namespace antcc {
+
+void register_types ()
+{
+#define REGISTER(cls,tag) \
+  antcc::antElementFactoryRegistration< antcc::types::  cls > _##cls(#tag);
+
+
+  REGISTER(fileset,fileset)
+  REGISTER(include,include)
+  
+  /**
+   * Missing types
+   */
+  /**
+   * fileset,include
+   */
+}
+
+
+}
diff --git a/src/types/fileset.cpp b/src/types/fileset.cpp
new file mode 100644 (file)
index 0000000..375bc5d
--- /dev/null
@@ -0,0 +1,151 @@
+#include <antcc/common.h>
+#include <list>
+#include <sstream>
+
+#include <os/directory.h>
+#include <types/datatype.h>
+#include <types/fileset.h>
+#include <types/include.h>
+
+namespace antcc {
+namespace types {
+
+
+/**
+ * Attributes supported by exec
+ */
+::antcc::xml::element_attributes<fileset> fileset::gAttr[] = {
+  {"dir",&fileset::setDir}
+  ,{"file",&fileset::setFile}
+  , {"includes",&fileset::setIncludes}
+  , {"excludes",&fileset::setIncludes}
+  , {"casesensitive",&fileset::setIncludes}
+  , {NULL,NULL}
+}; 
+
+        
+fileset::fileset()
+        : m_Dir("./"),datatype()
+{
+}
+
+void 
+fileset::addChild(const char *_name,antcc::antElement *_elt)
+{
+    if (_elt && _elt->isType())
+    {
+        antcc::types::include *l_inc = static_cast<antcc::types::include *>(_elt);
+        setIncludes(l_inc->getIncludeName());
+        delete l_inc;
+    } else 
+    {
+        ANTCC_LOG_DEBUG("%s tag %s _elt=%0x"
+                ,__FUNCTION__
+                ,_name
+                ,_elt);
+    }
+}
+
+///
+void 
+fileset::setIncludes(const std::string &_f)
+{ 
+    ANTCC_LOG_INFO("%s %s todo"
+                ,__FUNCTION__
+                ,_f.c_str());
+    //m_Set.insert(f);
+}
+///
+void 
+fileset::setExcludes(const std::string &_f)
+{ 
+    ANTCC_LOG_INFO("%s %s r=%s"
+                ,__FUNCTION__
+                ,_f.c_str()
+                , getProject().resolveValue(_f).c_str());
+    //m_Set.insert(f);
+}
+
+///
+void 
+fileset::setCaseSensitive(const std::string &_f)
+{ 
+    ANTCC_LOG_INFO("%s %s r=%s"
+                ,__FUNCTION__
+                ,_f.c_str()
+                , getProject().resolveValue(_f).c_str());
+    //m_Set.insert(f);
+}
+
+///
+void 
+fileset::setDir(const std::string &_f)
+{ 
+    file l_f = getProject().resolveFile(_f);
+    ANTCC_LOG_INFO("%s %s r=%s"
+                ,__FUNCTION__
+                ,_f.c_str()
+                , getProject().resolveValue(_f).c_str());
+    std::stack<file> l_stack;
+    l_stack.push(l_f);
+    do 
+    {
+        file c_f = l_stack.top();
+        path l_path = c_f.getPath();
+        
+        l_stack.pop();
+        m_Set.insert(c_f);
+
+        antcc::os::directory_iterator it(l_path.c_str());
+        for( ; it != antcc::os::directory_iterator() ; ++it)
+        { 
+            // ignore . and ..
+            if ( ! std::string("..").compare((*it).name())
+                 || !std::string(".").compare((*it).name()))
+            {
+                continue;
+            }
+            // process file
+            if ((*it).isFile())
+            {
+                file l_current_file(std::string((*it).name()));
+
+                m_Set.insert(l_path.append(l_current_file));
+            } else if ((*it).isDirectory())
+            {
+                file l_current_file(std::string((*it).name()));
+                l_stack.push(l_path.append(l_current_file));
+            }
+        }
+    } while( ! l_stack.empty());
+}
+///
+void 
+fileset::setFile(antcc::file &f)
+{ 
+    m_Set.insert(f);
+}
+///
+void 
+fileset::setFile(const std::string &f)
+{ 
+    m_Set.insert(file(f));
+}
+
+
+///
+bool 
+fileset::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<fileset>(this,fileset::gAttr,_name,_v)) == true)
+    {
+      //antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+
+
+}
+}
diff --git a/src/types/fileset.h b/src/types/fileset.h
new file mode 100644 (file)
index 0000000..0f13716
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __ANTCC_FILESET_H__
+#define __ANTCC_FILESET_H__
+#include <set>
+namespace antcc {
+namespace types {
+/**
+ *
+ */
+class fileset : public datatype
+{
+    public:
+        typedef std::set<antcc::file >  fileset_type;
+        typedef std::set<antcc::file >::const_iterator  fileset_const_iterator;
+        typedef std::set<antcc::file >::iterator        fileset_iterator;
+
+        fileset();
+        
+        virtual ~fileset() {};
+        /// 
+        virtual void addChild(const char *_name,antcc::antElement *_elt);
+
+        /// Iterators
+        fileset_const_iterator begin() const
+        { return m_Set.begin();}
+        ///
+        fileset_const_iterator end() const
+        { return m_Set.end();}
+        
+        fileset_iterator begin()
+        { return m_Set.begin();}
+        ///
+        fileset_iterator end()
+        { return m_Set.end();}
+
+        const size_t size() const
+        { return m_Set.size() ; }
+
+        ///
+        void setIncludes(const std::string &_f);
+        ///
+        void setDir(const std::string &_f);
+        ///
+        void setFile(antcc::file &f);
+        ///
+        void setFile(const std::string &f);
+    protected:
+        ///
+        void setCaseSensitive(const std::string &_f);
+        ///
+        void setExcludes(const std::string &_f);
+        /// Methods that can be used by sub classe
+        template <typename C> 
+        friend  struct element_attributes; 
+        ////
+        virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+    private:
+        static ::antcc::xml::element_attributes<fileset> gAttr []; 
+        fileset_type      m_Set;
+        const antcc::path m_Dir;
+};
+
+} // end ns type
+} // end ns antcc
+#endif
diff --git a/src/types/include.cpp b/src/types/include.cpp
new file mode 100644 (file)
index 0000000..c6450b6
--- /dev/null
@@ -0,0 +1,38 @@
+#include <antcc/common.h>
+#include <list>
+#include <sstream>
+
+#include <types/datatype.h>
+#include <types/fileset.h>
+#include <types/include.h>
+
+
+namespace antcc {
+namespace types { 
+
+/**
+ * Attributes supported by exec
+ */
+::antcc::xml::element_attributes<include> include::gAttr[] = {
+  {"name",&include::setIncludeName}
+  , {NULL,NULL}
+}; 
+
+bool 
+include::addAttribute(const std::string &_name,const std::string &_v)
+{
+    bool l_ok = false;
+    if  ( (l_ok = antElement::addAttribute<include>(this,include::gAttr,_name,_v)) == true)
+    {
+      //antElement::addAttribute(_name,_v);
+    }
+    return l_ok;
+}
+
+void include::setIncludeName(const std::string &_s)
+{
+    m_IncludeName = _s;
+}
+
+}
+}
diff --git a/src/types/include.h b/src/types/include.h
new file mode 100644 (file)
index 0000000..56d7ac6
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef __INCLUDE_H__
+#define __INCLUDE_H__
+
+namespace antcc {
+namespace types {
+/**
+ *
+ */
+class include : public projectComponent
+{
+    public:
+        include() : projectComponent(eType) { };
+       virtual ~include() {};
+        /// set the include name
+       void setIncludeName(const std::string &s);
+        ///
+        const std::string &getIncludeName() const
+       { return m_IncludeName; } ;
+    private:
+        template <typename C> 
+        friend  struct element_attributes; 
+        ////
+       virtual bool addAttribute(const std::string &_name,const std::string &_v)  ;
+    private:
+        std::string m_IncludeName;
+       static ::antcc::xml::element_attributes<include> gAttr []; 
+    protected:
+       /// Methods that can be used by sub classe
+    private:
+};
+
+} // end ns type
+} // end ns antcc
+#endif
diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8b376fa
--- /dev/null
@@ -0,0 +1,5 @@
+PROJECT(antxml)
+cmake_minimum_required(VERSION 2.8)
+
+SUBDIRS(parser)
+
diff --git a/src/xml/parser/CMakeLists.txt b/src/xml/parser/CMakeLists.txt
new file mode 100644 (file)
index 0000000..11b226c
--- /dev/null
@@ -0,0 +1,83 @@
+PROJECT(antcc_libxmlparser)
+
+INCLUDE_DIRECTORIES(${antcc_libxmlparser_SOURCE_DIR})
+INCLUDE_DIRECTORIES(/usr/local/include)
+# Check with BOOTSTRAP_expat too
+IF(NOT WIN32)
+  FIND_PACKAGE(EXPAT REQUIRED)
+ELSE(NOT WIN32)
+  #    C:\Tools\Expat 2.2.10\Source\lib
+  SET(EXPAT_INCLUDE_DIR "c:/Tools/Expat 2.2.10/Source/lib" CACHE STRING "Expat include dir")
+  SET(EXPAT_LIBRARY "c:/Tools/Expat 2.2.10/Bin/libexpat.lib" CACHE STRING "Expat library")
+  INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR})
+ENDIF(NOT WIN32)
+
+INCLUDE_DIRECTORIES(${EXPAT_INCLUDE_DIR})
+ADD_DEFINITIONS(-DBUILD_DLL)
+ADD_LIBRARY(libantcc_parser STATIC 
+                ant_elements_parser.cpp 
+                ant_elements_parser_root.cpp 
+               document.cpp
+               ant_element_factory.cpp
+               )
+
+TARGET_LINK_LIBRARIES(libantcc_parser  ${EXPAT_LIBRARY})
+EXPORT(TARGETS libantcc_parser FILE libxsdLibraries.cmake)
+
+## ADD_LIBRARY(libantcc_parserd STATIC ant_elements_parser.cpp  document.cpp)
+## ADD_LIBRARY(xsdd STATIC ant_elements_parser.cpp document.cpp)
+#SET_TARGET_PROPERTIES(libantcc_parserd
+#      PROPERTIES
+#      CLEAN_DIRECT_OUTPUT 1
+#      COMPILE_FLAGS "-DDEBUG -DPARSER_DEBUG=1"
+#    )
+#
+# Install stuff
+#
+IF (0)
+INSTALL(TARGETS libxsd
+        EXPORT libxsd
+        ARCHIVE
+        DESTINATION lib
+        COMPONENT   Libraries)
+INSTALL(EXPORT libxsd DESTINATION lib)
+
+INSTALL(TARGETS xsdd
+        EXPORT xsdd
+        ARCHIVE
+        DESTINATION lib
+        COMPONENT   Libraries)
+INSTALL(EXPORT xsdd DESTINATION lib)
+
+INSTALL(FILES
+        ${libxsd_SOURCE_DIR}/document_expat.cpp
+        ${libxsd_SOURCE_DIR}/elements.cpp
+        ${libxsd_SOURCE_DIR}/parser.cpp
+        DESTINATION lib/src
+        COMPONENT   Headers
+    )
+INSTALL(FILES 
+        ${libxsd_SOURCE_DIR}/../include/xsd/xsd.h
+        DESTINATION include/xsd
+        COMPONENT   Headers
+        )
+INSTALL(FILES 
+        ${libxsd_SOURCE_DIR}/../include/xsd/parser/parser.h
+        ${libxsd_SOURCE_DIR}/../include/xsd/parser/elements.h
+        ${libxsd_SOURCE_DIR}/../include/xsd/parser/document.h
+#        ${libxsd_SOURCE_DIR}/../include/xsd/parser/xml-schema.h
+        DESTINATION include/xsd/parser
+        COMPONENT   Headers
+        )
+INSTALL(FILES 
+        ${libxsd_SOURCE_DIR}/../include/xsd/parser/expat/elements.h
+        DESTINATION include/xsd/parser/expat
+        COMPONENT   Headers
+        )
+
+INSTALL(FILES 
+        ${libxsd_SOURCE_DIR}/../include/xmlSerialize.h
+        DESTINATION include/
+        COMPONENT   Headers
+        )
+ENDIF(0)
diff --git a/src/xml/parser/ant_element_factory.cpp b/src/xml/parser/ant_element_factory.cpp
new file mode 100644 (file)
index 0000000..43f1016
--- /dev/null
@@ -0,0 +1,46 @@
+#include <ios>\r
+#include <iostream>\r
+#include <antcc/config.h>\r
+#include <logger.h>\r
+#include <ant_element_factory.h>\r
+#include <ant_elements.h>\r
+\r
+namespace antcc {\r
+\r
+antElementFactory::antElementFactory()\r
+{\r
+}\r
+\r
+antElementFactory::~antElementFactory()\r
+{\r
+}\r
+\r
+antElementFactory &antElementFactory::get()\r
+{\r
+  static antElementFactory instance;\r
+  return instance;\r
+}\r
+\r
+\r
+antElement* antElementFactory::orderElement(const char* typeName)\r
+{\r
+  auto it = m_generators.find(typeName);\r
+  if ( it != m_generators.end()) {\r
+    ANTCC_PARSER_DEBUG("antElementFactory::orderElement %s",typeName);\r
+    antElement *_elt = it->second(typeName);\r
+    _elt->setName(typeName);\r
+    return _elt;\r
+  }\r
+  ANTCC_LOG_ERROR("antElementFactory::orderElement <%s> failed not found ",typeName);\r
+  return nullptr;\r
+}\r
+\r
+bool antElementFactory::registerGenerator(\r
+                        const char* typeName,\r
+                        const antElementGenerator& funcCreate)\r
+{\r
+  ANTCC_LOG_DEBUG("antElementFactory::registerGenerator %s",typeName);\r
+  return m_generators.insert(std::make_pair(typeName,funcCreate)).second;\r
+}\r
+\r
+}\r
diff --git a/src/xml/parser/ant_element_factory.h b/src/xml/parser/ant_element_factory.h
new file mode 100644 (file)
index 0000000..4678070
--- /dev/null
@@ -0,0 +1,79 @@
+#pragma once\r
+#include <string>\r
+#include <unordered_map>\r
\r
+#ifdef N_WIN32\r
+#ifdef BUILD_DLL\r
+#define DLL_INTERFACE __declspec(dllexport)\r
+#else\r
+#define DLL_INTERFACE __declspec(dllimport)\r
+#endif\r
+#else\r
+#define DLL_INTERFACE\r
+#endif\r
\r
+namespace antcc {\r
+\r
+struct antElement;\r
\r
+typedef antElement*(*antElementGenerator)(const char *_typeName);\r
\r
+class antElementFactory\r
+{\r
+public:\r
+    DLL_INTERFACE static antElementFactory& get();\r
\r
+    DLL_INTERFACE antElement* orderElement(const char* typeName);\r
+    DLL_INTERFACE bool registerGenerator(\r
+                            const char* typeName,\r
+                            const antElementGenerator& funcCreate);\r
\r
+private:\r
+    antElementFactory();\r
+    antElementFactory(const antElementFactory&);\r
+    ~antElementFactory();\r
\r
+    std::unordered_map<std::string, antElementGenerator> m_generators;\r
+};\r
+\r
+template <typename T>\r
+class antElementFactoryRegistration\r
+{\r
+  private:\r
+    static antElement *create(const char *_id)\r
+    {\r
+        return new T() ;\r
+    }\r
+  public:\r
+    antElementFactoryRegistration(const char *id) \r
+    {\r
+      antElementFactory::get().registerGenerator(\r
+        id\r
+        ,antElementFactoryRegistration<T>::create );\r
+    }\r
+};\r
+\r
+template <typename T>\r
+class antLibElementFactoryRegistration\r
+{\r
+  private:\r
+    static antElement *create(const char *_name)\r
+    {\r
+        return new T(_name) ;\r
+    }\r
+  public:\r
+    antLibElementFactoryRegistration(const char *id) \r
+    {\r
+      antElementFactory::get().registerGenerator(\r
+        id\r
+        ,antLibElementFactoryRegistration<T>::create );\r
+    }\r
+};\r
+\r
+/**\r
+ * How to use registration\r
+ * in antElements cpp file simply create an object\r
+ * antElementFactoryRegistration<property> _Property("property");\r
+ * should do the trick\r
+ */\r
+} //end antcc\r
diff --git a/src/xml/parser/ant_elements.cpp b/src/xml/parser/ant_elements.cpp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/xml/parser/ant_elements.h b/src/xml/parser/ant_elements.h
new file mode 100644 (file)
index 0000000..9773455
--- /dev/null
@@ -0,0 +1,196 @@
+#ifndef XSD_H
+#define XSD_H
+
+#include <iostream>
+#include <string>
+#include <vector>
+#include <map>
+#include <memory>
+#include <antcc/config.h>
+#ifdef ANTCC_WITH_BOOST
+#include <boost/shared_ptr.hpp>
+#elif defined (ANTCC_WITH_AEB)
+#include <utils/aeb/shared_ptr.h>
+#endif
+
+namespace antcc {
+  class  task;
+  class  target;
+  class  project;
+  class  type;
+  struct Location;
+
+
+namespace xml {
+
+    template <typename T>
+    struct element_traits {
+        typedef T                               element_type;
+#ifdef XSD_WITH_BOOST
+        typedef typename boost::shared_ptr<element_type> element_sptr;
+#elif defined(XSD_WITH_AEB)
+        typedef typename aeb::shared_ptr<element_type> element_sptr;
+#else
+        typedef typename std::shared_ptr<element_type> element_sptr;
+#endif
+        typedef typename std::vector<element_sptr>       element_sequence;
+    };
+    /// Usefulle template to create a static 
+    // array of all avaialable attributes for an element
+    template <typename T>
+    struct element_attributes {
+       const char *m_Name;
+       void (T::*m_Setter)(const std::string &_v);
+    };     
+
+    template <typename T,bool ns>
+    struct element {
+        typedef typename element_traits<T>::element_type t_type;
+        typedef typename element_traits<T>::element_sptr t_sptr;
+        public:
+    };
+
+    template <typename T>
+    struct element<T,true > {
+        typedef typename element_traits<T>::element_type t_type;
+        typedef typename element_traits<T>::element_sptr t_sptr;
+        element(const t_sptr &s,const char *n) : m_content(s) ,m_name(n){};
+        friend std::ostream & operator <<(std::ostream &os,const element &e) 
+        {
+            os<<"<:"<<e.m_name;
+            e.m_content->serialize_attributes(os);
+            os<<">";
+            os<<*(e.m_content);
+            os<<"</:"<<e.m_name<<">";
+           return os;
+        };
+        t_sptr    m_content;
+        const char *m_name;
+    };
+    
+    template <typename T>
+    struct element<T,false> {
+        typedef typename element_traits<T>::element_type t_type;
+        typedef typename element_traits<T>::element_sptr t_sptr;
+        element(const t_sptr &s,const char *n) : m_content(s) ,m_name(n){};
+        friend std::ostream & operator <<(std::ostream &os,const element &e) 
+        {
+            os<<"<"<<e.m_name;
+            e.m_content->serialize_attributes(os);
+            os<<">";
+            os<<*(e.m_content);
+            os<<"<"<<e.m_name<<">";
+           return os;
+        };
+        t_sptr  m_content;
+        const   char *m_name;
+    };
+
+  } // end  xml ns
+
+    // Ok, lets define ant_element
+    struct  antElement
+    {
+        public:
+            enum eAntType {eNone,eProject,eTarget,eTask,eType,eArgument,eParameter,eCondition,eSelector};
+            typedef std::map<std::string,std::string> attrMap_type;
+            typedef std::map<std::string,std::string>::iterator attrMap_iterator;
+            typedef std::map<std::string,std::string>::const_iterator attrMap_const_iterator;
+            typedef typename antcc::xml::element_traits<antElement>::element_type t_type;
+            typedef typename antcc::xml::element_traits<antElement>::element_sptr t_sptr;
+            
+            antElement(int _type ) : m_Name("") , m_Type(_type) {}
+
+            antElement(const antElement &_e) : m_Name(_e.m_Name),m_Type(_e.m_Type)
+            {}
+            virtual ~antElement() {};
+            /// Element name !!! not the value of attribute name
+            inline void setName(const char *_name) { m_Name = _name; };
+            /// Return Element name
+            inline const char *getName() const { return m_Name.c_str(); };
+
+            // what are the public methods available on all elements ?
+            virtual void addChild(const char *_name,antcc::antElement *_task) {} ;
+            ///
+            virtual void setProject(project *_p) {};
+         
+            virtual void setLocation(const Location &_loc) {} ;
+            /**
+             * @brief add attribute to antcc element. 
+             * sub classes should check if attribute is allowed or not.
+             * @return false if the attribute is not supported
+             */
+            virtual bool addAttribute(const std::string &_name,const std::string &_val)
+            { m_Attributes[_name] = _val;  return true;}  ;
+
+            ///
+            const bool isTarget() const { return m_Type == eTarget; };
+
+            ///
+            const bool isTask() const { return m_Type == eTask; };
+            
+            ///
+            const bool isType() const { return m_Type == eType; };
+            
+            ///
+            const bool isParameter() const { return m_Type == eParameter; };
+
+            ///
+            const bool isNone() const { return m_Type == eNone; };
+
+            ///
+            const bool isCondition() const { return m_Type == eCondition; };
+
+            ///
+            const bool isSelector() const { return m_Type == eSelector; };
+            
+            ///
+            const bool isArgument() const { return m_Type == eArgument; };
+            /// Check if element has attribute
+            bool hasAttribute(const std::string _name) const
+            {
+                attrMap_const_iterator it = m_Attributes.find(_name);
+                return (it != m_Attributes.end() );
+            }
+        protected:
+            template<class C>
+            bool addAttribute(C *_this,struct xml::element_attributes<C> *gProjectAttr,const std::string &_n,const std::string &val)
+            {
+              bool l_ok = false;
+              long l_i  = 0;
+              do
+              {
+                if (gProjectAttr[l_i].m_Name == NULL)
+                {
+                  break;
+                }
+                if (! _n.compare(gProjectAttr[l_i].m_Name) )
+                {
+                  (_this->*gProjectAttr[l_i].m_Setter)(val);
+                  l_ok = true;
+                  break;
+                }
+              } while (++l_i);
+
+              return l_ok;
+            }
+
+            bool getAttribute(const std::string _name,std::string &_value) const
+            { 
+                attrMap_const_iterator it = m_Attributes.find(_name);
+                if (it != m_Attributes.end() )
+                {
+                    _value = it->second;
+                    return true;
+                } else
+                {
+                    return false;
+                }
+            }
+        private:
+            attrMap_type  m_Attributes;
+            std::string   m_Name;
+            int           m_Type;
+    };
+}
+#endif
diff --git a/src/xml/parser/ant_elements_parser.cpp b/src/xml/parser/ant_elements_parser.cpp
new file mode 100644 (file)
index 0000000..6583562
--- /dev/null
@@ -0,0 +1,906 @@
+#include <ios>
+#include <iostream>
+#include <antcc/config.h>
+#include <os/path.h>
+#include <os/file.h>
+#include <location.h>
+#include <parser_base.h>
+#include <logger.h>
+#include <ant_elements.h>
+#include <ant_elements_parser.h>
+#include <ant_element_factory.h>
+
+#include <project.h>
+#include <projectComponent.h>
+
+//#define PARSER_DEBUG 1
+namespace antcc {
+    namespace parser {
+
+
+
+EmptyElement::EmptyElement(antcc::antElement *_elt ) 
+            : m_str(""), m_CurrentElement(_elt)
+{
+  ANTCC_PARSER_DEBUG("%s(%0x) ctor m_CurrentElement=%0x"
+                      ,__FUNCTION__
+                      ,this
+                      ,_elt);
+}
+
+
+ void EmptyElement::_Attribute(const std::string &ns,const std::string &name,const std::string &val)
+ {
+     if( !this->AttributeImpl(ns,name,val) )
+     {
+         std::cout<<"Any attribute "<<name<<" val="<<val<<std::endl;
+         anyAttribute(ns,name,val);
+     }
+ }
+
+ /**
+ * Implement SimpleElement parsing function 
+ */
+
+void SimpleElement::_Characters(const std::string &val)
+{
+    if (! _CharactersImpl(val))
+         m_str+=val;
+}
+
+void SimpleElement::_Attribute(const std::string &ns,const std::string &name,const std::string &val)
+{
+    if (!this->AttributeImpl(ns,name,val))
+    {
+        anyAttribute(ns,name,val);
+        std::cout<<" SimpleElement::_Attribute unknown attr "<<name<<"\n";
+    } else {
+    }
+}
+
+void 
+SimpleElement::updateLocation(const antcc::Location &l)
+{
+    if (m_CurrentElement)
+    {
+        m_CurrentElement->setLocation(l);
+    }
+}
+
+
+/**
+ * Implement ComplexElement parsing function 
+ */
+
+ComplexElement::ComplexElement(antcc::antElement *_elt ) 
+  : EmptyElement(_elt)
+{
+    ANTCC_PARSER_DEBUG("Cplx(%0x)::Cplx ctor m_CurElt=%0x"
+                   ,this
+                   ,m_CurrentElement);
+}
+
+ComplexElement::ComplexElement(const ComplexElement &c)
+       : antcc::parser::EmptyElement(c.m_CurrentElement)
+{
+    ANTCC_PARSER_DEBUG("Cplx(%0x)::Cplx copy c.m_CurElt=%0x"
+                        ,this
+                        ,c.m_CurrentElement);
+}
+
+void ComplexElement::preImpl()
+{
+    m_context.push_back(State());
+    ANTCC_PARSER_DEBUG("Cplx(%0x)::preImpl m_context size=%d call preInternal"
+                        ,this
+                        ,m_context.size());
+    this->preInternal();
+}
+
+void ComplexElement::postImpl()
+{
+    this->postInternal();
+    ANTCC_PARSER_DEBUG("Cplx(%0x)::postImpl after postInternal m_context size=%d"
+                        ,this
+                        ,m_context.size());
+    m_context.pop_back();
+    ANTCC_PARSER_DEBUG("Cplx::postImpl after m_context size=%d",m_context.size());
+}
+
+void ComplexElement::_startElement(const std::string &ns,const std::string &name,const std::string &type) 
+{
+    State       &s(m_context.back());
+    std::string space;
+    ANTCC_PARSER_DEBUG("%sCplxE(%0x)::_startElement Enter name=%s s.depth=%d context.size=%d"
+            ,space.insert(0,s.m_depth,' ').c_str()
+            ,this
+            ,name.c_str()
+            ,s.m_depth
+            ,m_context.size());
+    if (s.m_depth++ > 0) 
+    {
+        //Should check if it's any first 
+        if (s.m_parser)
+        {
+            ANTCC_PARSER_DEBUG("CplxE::_startElement call s.m_parser->_startElement : %s",name.c_str());
+            s.m_parser->_startElement(ns,name,type);
+        } else {
+            ANTCC_PARSER_ERROR("CplxE::_startElement no parser stacked (s.m_parser==NULL) : %s",name.c_str());
+        }
+    } else {
+        ANTCC_PARSER_DEBUG("CplxE::_startElement %s call startElementImpl",name.c_str());
+        if (!startElementImpl(ns,name,type)) 
+        {
+            ANTCC_PARSER_ERROR("CplxE::_startElement %s call startElementImpl returned false",name.c_str());
+#ifdef PARSER_DEBUG
+            std::cout<<"\tcplx _start call Any : unknown "<<name<<std::endl;
+#endif
+           // Unexpectect element 
+           //this->startAnyElement(ns,name);
+            /* Element not recogized by us*/
+        } else 
+        {
+            ANTCC_PARSER_DEBUG("CplxE::_startElement %s called startElementImpl returned true ",name.c_str());
+            if (s.m_parser != 0)
+            {
+                s.m_parser->preImpl();
+                /* Need to call pre */
+#ifdef PARSER_DEBUG
+            std::cout<<"\tcplx _start Need to call pre- : "<<name<<std::endl;
+#endif
+            }
+        }
+    }
+}
+
+
+void ComplexElement::_endElement(const std::string &ns,const std::string &name) 
+{
+    State &s(m_context.back());
+    std::string space;
+    ANTCC_PARSER_DEBUG("%sCplx(%0x)::_endElement Enter name=%s s.depth=%d context.size=%d"
+            ,space.insert(0,s.m_depth,' ').c_str()
+            ,this
+            ,name.c_str()
+            ,s.m_depth
+            ,m_context.size());
+    if (m_context.back().m_depth==0)
+    {
+        State &ss(m_context[m_context.size()-2]);
+        if (--ss.m_depth > 0)
+        {
+            // Indirect 
+            ANTCC_PARSER_DEBUG("CplxE::_endElement 1 name=%s ss.m_depth=%d m_context.size=%d"
+                            ,name.c_str()
+                            ,ss.m_depth
+                            ,m_context.size());
+            if (ss.m_parser)
+            {
+                ss.m_parser->_endElement(ns,name);
+            } else
+                std::cout<<"No parser ? "<<name<<std::endl;
+
+        } else
+        {
+            // Direct recursion
+            ANTCC_PARSER_DEBUG( "CplxE::_endElement %s 2 WARNING I pass by here Direct recursion: "
+                    ,name.c_str());
+            if (this == ss.m_parser.get())
+            {
+                ANTCC_PARSER_DEBUG( "CplxE::_endElement %s good this==ss.m_parser",name.c_str());
+                 
+                this->postImpl();
+                if (!endElementImpl(ns,name))
+                {
+                    ANTCC_PARSER_ERROR( "CplxE::_endElement %s endElementImpl call failed",name.c_str());
+                } 
+            } else 
+            {
+                ANTCC_PARSER_ERROR( "CplxE::_endElement %s Must NOT HAPPEN!!!",name.c_str());
+            }
+        }
+    }
+    else
+    {
+        State &s(m_context.back());
+        if (--s.m_depth > 0) 
+        {
+            space = "";
+            ANTCC_PARSER_DEBUG("%sCplx(%0x)::_endElement 3 name=%s s.depth=%d context.size=%d"
+                    ,space.insert(0,s.m_depth,' ').c_str()
+                    ,this
+                    ,name.c_str()
+                    ,s.m_depth
+                    ,m_context.size());
+            if (s.m_parser)
+            {
+                s.m_parser->_endElement(ns,name);
+            } else 
+                std::cout<<"No parser here\n";
+        
+        } else {
+            ANTCC_PARSER_DEBUG("CplxE(%0x)::_endElement %s 4 %s same parser "
+                    , this
+                    , name.c_str()
+                    , (this==s.m_parser.get())?"yes":"no");
+            if (s.m_parser )
+            {
+                ANTCC_PARSER_DEBUG("CplxE(%0x)::_endElement call postImpl %s"
+                                    ,this
+                                    ,name.c_str());
+                s.m_parser->postImpl();
+            }
+
+            if (!endElementImpl(ns,name))
+            {
+                ANTCC_PARSER_ERROR("CplxE::_endElement failed call endElementImpl %s"
+                        ,name.c_str());
+                // Wrong
+                //this->endAnyElement(ns,name);
+            }
+        }
+    }
+    ANTCC_PARSER_DEBUG("CplxE::_endElement LEAVE this=%0x name=%s,s.m_depth=%d m_context.size=%d"
+            , this
+            ,name.c_str()
+            ,s.m_depth
+            ,m_context.size()
+            );
+}
+
+/**
+ *
+ *
+ */
+ void ComplexElement::_Attribute(const std::string &ns,const std::string &name,const std::string &val)
+{
+    if (m_context.back().m_depth > 0) 
+    {
+        /// Handle Child Element Attributes of Current ComplexElement
+        State &s(m_context.back());
+        if (s.m_any)
+        {
+            ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre any name=%s",name.c_str());
+            anyAttribute(ns,name,val);
+        } else if (s.m_parser) 
+        {
+            ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre with parser name=%s",name.c_str());
+            s.m_parser->_Attribute(ns,name,val);
+        } 
+    } else 
+    {
+        /// Handle current  Complex Element Attributes 
+        ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre call this->AttributeImpl name=%s",name.c_str());
+        if ( ! this->AttributeImpl(ns,name,val) )
+       {
+            ANTCC_PARSER_ERROR("Cplx::_AttributeImpl name=%s unsupported"
+                           ,name.c_str());
+       }
+    }
+}
+
+/**
+ *
+ *
+ */
+void ComplexElement::_Characters(const std::string &val)
+{
+    State &s(m_context.back());
+    if (s.m_depth > 0)
+    {
+        if (s.m_parser) {
+#ifdef PARSER_DEBUG_CHARACTER
+            std::cout<<"CplxE::_characters"<<val<<" sz="<<m_context.size()<<"call parser@ "<<s.m_parser<<"\n";
+#endif
+            if (s.m_parser.get() == this) 
+            {
+              std::cerr<<"CplxE::_Characters ERROR: I have serious trouble treating -("<<val<<")"<<s.m_depth<<"\n";
+              if (!_CharactersImpl(val))
+              {
+                // Call any characters
+#ifdef PARSER_DEBUG_CHARATER
+          std::cout<<"CplxE::_Characters what to do? call any_characters :"<<val<<" depth="<<s.m_depth<<std::endl;
+#endif
+              }
+            } else
+              s.m_parser->_Characters(val);
+        } else {
+            std::cout<<"CplxE::_characters... what to do with char ("<<val<<") "<<m_context.size()<<" parser@="<<s.m_parser<<"\n";
+        }
+
+    } else {
+        if (!_CharactersImpl(val))
+        {
+          // Call any characters
+#ifdef PARSER_DEBUG_CHARATER
+    std::cout<<"CplxE::_Characters what to do? call any_characters :"<<val<<" depth="<<s.m_depth<<std::endl;
+#endif
+        }
+    }
+}
+            
+void 
+ComplexElement::updateLocation(const antcc::Location &l)
+{
+    State &s(m_context.back());
+    if (s.m_parser != NULL)
+    {
+        s.m_parser->updateLocation(l);
+    } else if (m_CurrentElement)
+    {
+        m_CurrentElement->setLocation(l);
+    }
+}
+
+ComplexElement::State::State() : m_any(0),m_depth(0),m_parser(0),m_data(0)
+{ 
+  //ANTCC_PARSER_DEBUG("State::State %d",m_depth);
+}
+
+ComplexElement::State::~State()
+{ 
+    //ANTCC_PARSER_DEBUG("State::~State %d",m_depth);
+    if (m_data)
+    {
+        ANTCC_PARSER_ERROR("State::~State error m_data != null %d",m_depth);
+    }
+}
+ComplexElement::State::State(const ComplexElement::State &p) 
+        : m_any(p.m_any),m_depth(p.m_depth),m_parser(p.m_parser),m_data(p.m_data)
+{
+        ANTCC_PARSER_DEBUG("State::State copy ctor depth=%d data=%0x"
+                    ,m_depth
+                    ,m_data
+                    );
+}
+// Local instance of parsers.
+//TargetParser gTargetParser;
+//TaskParser gTaskParser;
+
+/* Parser Implementations ...*/
+
+#define ROOT_PARSER(cls,start,end,attr) \
+cls :: cls(const cls &_c) : RootElement(_c.m_CurrentElement)                  \
+{ \
+  ANTCC_PARSER_DEBUG("%s::%s cp elt=%0x"                       \
+                    ,#cls                                      \
+                    ,#cls                                      \
+                    ,_c.m_CurrentElement                       \
+    );                                         \
+} \
+cls::cls(antcc::project *_project,antcc::antElement *_elt)    \
+        : m_Project(_project) ,RootElement(_elt)                   \
+{ \
+  ANTCC_PARSER_DEBUG("%s(%0x)::%s elt=%0x"  \
+                    ,#cls              \
+                    ,this              \
+                    ,#cls              \
+                    ,_elt              \
+    );                      \
+  if (_elt == NULL)                          \
+  { \
+      ANTCC_PARSER_ERROR("%s(%0x)::%s is NULL unsuported!!!"  \
+        ,#cls              \
+        ,this              \
+        ,#cls              \
+      );                   \
+  } else \
+  { \
+      _elt->setProject(_project);\
+  } \
+} \
+cls::~cls()    \
+{ \
+  ANTCC_PARSER_DEBUG("%s::~"  \
+                    ,#cls);                                         \
+} \
+bool cls::startElementImpl(const std::string &ns,const std::string &name,const std::string &type)    \
+{ \
+  State &s(m_context.back());  \
+  ANTCC_PARSER_DEBUG("%s::startElementImpl %s depth=%u size=%u"   \
+                    ,#cls                                        \
+                    ,name.c_str()                                \
+                    ,s.m_depth                                   \
+                    ,m_context.size());                          \
+  start \
+} \
+bool cls::endElementImpl(const std::string &ns,const std::string &name)                              \
+{ \
+  State &s(m_context.back());                                     \
+  if (s.m_parser && m_CurrentElement)                             \
+    m_CurrentElement->addChild(name.c_str(),s.m_parser->post());  \
+  end \
+} \
+bool cls::AttributeImpl(const std::string &ns,const std::string &name,const std::string &val)        \
+{ \
+  bool l_ok = false;                                  \
+  if (m_CurrentElement)                               \
+    l_ok = m_CurrentElement->addAttribute(name,val);  \
+  attr \
+} \
+void cls::preInternal()   \
+{ \
+  State &s(m_context.back());  \
+  ANTCC_PARSER_DEBUG("%s(%0x)::preInternal depth=%u size=%u m_CurElt=%0x"  \
+                    ,#cls                                            \
+                    ,this                                            \
+                    ,s.m_depth                                       \
+                    ,m_context.size()                                \
+                    ,m_CurrentElement);                              \
+  s.m_data = m_CurrentElement; \
+  \
+} \
+void cls::postInternal()   \
+{ \
+  State &s(m_context.back());  \
+  ANTCC_PARSER_DEBUG("%s::postInternal depth=%u size=%u m_CurElt=%0x"  \
+                    ,#cls                                             \
+                    ,s.m_depth                                        \
+                    ,m_context.size()                                 \
+                    ,m_CurrentElement                                 \
+  );                                                                  \
+  m_CurrentElement = s.m_data;  \
+  s.m_data = NULL;\
+} \
+
+
+#define COMPLEX_PARSER(cls,start,end,attr)                       \
+cls :: cls(const cls &_c) : ComplexElement(_c.m_CurrentElement)       \
+{ \
+  ANTCC_PARSER_DEBUG("%s::%s cp elt=%0x"                       \
+                    ,#cls                                      \
+                    ,#cls                                      \
+                    ,_c.m_CurrentElement                       \
+    );                                         \
+} \
+cls::cls(antcc::project *_project,antcc::antElement *_elt)    \
+        : m_Project(_project) ,ComplexElement(_elt)                   \
+{ \
+  ANTCC_PARSER_DEBUG("%s(%0x)::%s elt=%0x"  \
+                    ,#cls              \
+                    ,this              \
+                    ,#cls              \
+                    ,_elt              \
+    );                      \
+  if (_elt == NULL)                          \
+  { \
+      ANTCC_PARSER_ERROR("%s(%0x)::%s is NULL unsuported!!!"  \
+        ,#cls              \
+        ,this              \
+        ,#cls              \
+      );                   \
+  } else \
+  { \
+      _elt->setProject(_project);\
+  } \
+} \
+cls::~cls()    \
+{ \
+  ANTCC_PARSER_DEBUG("%s::~"  \
+                    ,#cls);                                         \
+} \
+bool cls::startElementImpl(const std::string &ns,const std::string &name,const std::string &type)    \
+{ \
+  State &s(m_context.back());  \
+  ANTCC_PARSER_DEBUG("%s::startElementImpl %s depth=%u size=%u"   \
+                    ,#cls                                        \
+                    ,name.c_str()                                \
+                    ,s.m_depth                                   \
+                    ,m_context.size());                          \
+  start \
+} \
+bool cls::endElementImpl(const std::string &ns,const std::string &name)                              \
+{ \
+  State &s(m_context.back());                                     \
+  if (s.m_parser && m_CurrentElement)                             \
+    m_CurrentElement->addChild(name.c_str(),s.m_parser->post());  \
+  end \
+} \
+bool cls::AttributeImpl(const std::string &ns,const std::string &name,const std::string &val)        \
+{ \
+  bool l_ok = false;                                  \
+  if (m_CurrentElement)                               \
+    l_ok = m_CurrentElement->addAttribute(name,val);  \
+  attr \
+} \
+void cls::preInternal()   \
+{ \
+  State &s(m_context.back());  \
+  ANTCC_PARSER_DEBUG("%s(%0x)::preInternal depth=%u size=%u m_CurElt=%0x"  \
+                    ,#cls                                            \
+                    ,this                                            \
+                    ,s.m_depth                                       \
+                    ,m_context.size()                                \
+                    ,m_CurrentElement);                              \
+  s.m_data = m_CurrentElement; \
+  \
+} \
+void cls::postInternal()   \
+{ \
+  State &s(m_context.back());  \
+  ANTCC_PARSER_DEBUG("%s::postInternal depth=%u size=%u m_CurElt=%0x"  \
+                    ,#cls                                             \
+                    ,s.m_depth                                        \
+                    ,m_context.size()                                 \
+                    ,m_CurrentElement                                 \
+  );                                                                  \
+  m_CurrentElement = s.m_data;  \
+  s.m_data = NULL;\
+} \
+
+#define SIMPLE_PARSER(cls,attr) \
+cls :: cls(const cls &_c) : SimpleElement()                    \
+{ \
+  ANTCC_PARSER_DEBUG("%s::%s cp elt=%0x"                       \
+                    ,#cls                                      \
+                    ,#cls                                      \
+                    ,_c.m_CurrentElement                       \
+    );                                         \
+} \
+cls::cls(antcc::project *_project,antcc::antElement *_elt)    \
+        : m_Project(_project) ,SimpleElement(_elt)                \
+{ \
+  ANTCC_PARSER_DEBUG("%s(%0x)::%s elt=%0x"  \
+                    ,#cls              \
+                    ,this              \
+                    ,#cls              \
+                    ,_elt              \
+    );                      \
+  if (_elt == NULL)                          \
+  { \
+      ANTCC_PARSER_DEBUG("%s(%0x)::%s is NULL unsuported!!!"  \
+        ,#cls              \
+        ,this              \
+        ,#cls              \
+      );                   \
+  } else \
+  { \
+      _elt->setProject(_project);\
+  } \
+} \
+cls::~cls()    \
+{ \
+  ANTCC_PARSER_DEBUG("%s::~"  \
+                    ,#cls);                                         \
+} \
+bool cls::AttributeImpl(const std::string &ns,const std::string &name,const std::string &val)        \
+{ \
+  bool l_ok = false;                                  \
+  if (m_CurrentElement)                               \
+    l_ok = m_CurrentElement->addAttribute(name,val);  \
+  attr \
+} \
+
+//Project Parser Impl
+ROOT_PARSER(ProjectParser,
+{
+if (name == "target" && ns.empty())
+{
+    s.m_parser = SHARED_PTR<TargetParser>(new TargetParser(m_Project
+                       , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+} else if (name == "project" && ns.empty())
+{
+    ANTCC_PARSER_ERROR("ProjectParser should not be called with %s element!!!",name.c_str());
+    return false;
+} else if (name == "description" && ns.empty())
+{
+    s.m_parser = SHARED_PTR<DescriptionParser>(new DescriptionParser(m_Project
+                       , NULL)
+                   );
+} else if (name == "macrodef" && ns.empty())
+{
+    s.m_parser = SHARED_PTR<MacrodefParser>(new MacrodefParser(m_Project
+                       , antcc::antElementFactory::get().orderElement(name.c_str())
+                      )
+                   );
+} else if (name == "property" && ns.empty())
+{
+    s.m_parser = SHARED_PTR<PropertyParser>(new PropertyParser(m_Project
+                       , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+} else
+{
+    s.m_parser = SHARED_PTR<TaskParser>(new TaskParser(m_Project
+                       , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+}
+return true;
+
+}
+,
+{ 
+ANTCC_PARSER_DEBUG_PROJECT("ProjectParser end  %s size=%u"
+                ,name.c_str()
+                ,m_context.size());
+  if (name == "description" && ns.empty())
+  {
+    std::string m_result;
+    s.m_parser->post(m_result);
+    m_Project->setDescription(m_result);
+  }
+return true;
+}
+,
+{ 
+ANTCC_PARSER_DEBUG_PROJECT("ProjectParser(%0x) Attribute:  %s-> %s"
+                ,m_CurrentElement
+               ,name.c_str()
+                ,val.c_str());
+return l_ok;
+})
+
+// Target Parser Implementation
+COMPLEX_PARSER(TargetParser, 
+  { 
+    if (name == "copy" && ns.empty())
+    {
+      s.m_parser = SHARED_PTR<CopyParser>(new CopyParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+    } else if (name == "exec" && ns.empty())
+    {
+      s.m_parser = SHARED_PTR<ExecParser>(new ExecParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+    }
+    else
+    {
+      s.m_parser = SHARED_PTR<TaskParser>(new TaskParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+    }
+    return true;
+
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TARGET("TargetParser end  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+    return true;
+  }
+  ,
+  { 
+    ANTCC_PARSER_DEBUG_TARGET("TargetParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+
+// Task Parser Implementation
+COMPLEX_PARSER(TaskParser, 
+  { 
+    s.m_parser = SHARED_PTR<TaskParser>(new TaskParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+    return true;
+
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("TaskParser end  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+    return true;
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("TaskParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+
+// Exec Parser Implementation
+COMPLEX_PARSER(ExecParser,
+  { 
+    if (name == "redirector" && ns.empty())
+    {
+      ANTCC_PARSER_DEBUG("ExecParser ignore  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+      s.m_parser = SHARED_PTR<RedirectorParser>(new RedirectorParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+    }
+    else if (name == "errormapper" && ns.empty())
+    {
+    } else
+    {
+      s.m_parser = SHARED_PTR<ExecParser>(new ExecParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+    }
+    return true;
+
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("ExecParser end  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+    return true;
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("ExecParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+// Copy Parser Implementation
+COMPLEX_PARSER(CopyParser,
+  { 
+    s.m_parser = SHARED_PTR<TypeParser>(new TypeParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+    return true;
+
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("CopyParser end  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+    return true;
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("CopyParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+// Type Parser Implementation
+COMPLEX_PARSER(TypeParser,
+  { 
+    // Not sure that I need sub element for the Type parser
+    if (name == "include" && ns.empty())
+    {
+      s.m_parser = SHARED_PTR<TypeParser>(new TypeParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+      return true;
+    }
+    return  false;
+
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("TypeParser end  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+    return true;
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("TypeParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+
+// Redirector Parser Implementation
+COMPLEX_PARSER(RedirectorParser,
+  { 
+    s.m_parser = SHARED_PTR<MapperParser>(new MapperParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+    return true;
+
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("RedirectorParser end  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+    return true;
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("RedirectorParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+
+// Macrodef Parser Implementation
+COMPLEX_PARSER(MacrodefParser,
+  { 
+    if (name == "attribute" && ns.empty())
+    {
+      ANTCC_PARSER_DEBUG("MacrodefParser ignore  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+      s.m_parser = SHARED_PTR<TaskParser>(new TaskParser(m_Project
+                   , antcc::antElementFactory::get().orderElement("attribute")
+                 ));
+      return true;
+    }
+    else if (name == "element" && ns.empty())
+    {
+      ANTCC_PARSER_DEBUG("MacrodefParser ignore  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+      s.m_parser = SHARED_PTR<TaskParser>(new TaskParser(m_Project
+                   , antcc::antElementFactory::get().orderElement("element")
+                 ));
+      return true;
+    }
+    else if (name == "sequential" && ns.empty())
+    {
+      ANTCC_PARSER_DEBUG("MacrodefParser ignore  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+      s.m_parser = SHARED_PTR<TaskParser>(new TaskParser(m_Project
+                    , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+      return true;
+    } else
+    {
+      s.m_parser = SHARED_PTR<TaskParser>(new TaskParser(m_Project
+                           , antcc::antElementFactory::get().orderElement(name.c_str())
+                 ));
+      return true;
+    }
+      return false;
+
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("MacrodefParser end  %s size=%u"
+                    ,name.c_str()
+                    ,m_context.size());
+    return true;
+  }
+  ,
+  {
+    ANTCC_PARSER_DEBUG_TASK("MacrodefParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+
+
+// Description Parser Implementation
+SIMPLE_PARSER(DescriptionParser, 
+  {
+    ANTCC_PARSER_DEBUG_TASK("DescriptionParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+// Property Parser Implementation
+SIMPLE_PARSER(PropertyParser, 
+  {
+    ANTCC_PARSER_DEBUG_TASK("PropertyParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return l_ok;
+  })
+
+
+// Description Parser Implementation
+SIMPLE_PARSER(MapperParser, 
+  {
+    ANTCC_PARSER_DEBUG_TASK("MapperParser Attribute:  %s-> %s"
+                    ,name.c_str()
+                    ,val.c_str());
+    return true;
+  })
+
+
+
+
+}
+}
diff --git a/src/xml/parser/ant_elements_parser.h b/src/xml/parser/ant_elements_parser.h
new file mode 100644 (file)
index 0000000..7c2f846
--- /dev/null
@@ -0,0 +1,323 @@
+#ifndef ANTCC_PARSER_PARSER_H
+#define ANTCC_PARSER_PARSER_H
+#include <antcc/config.h>
+#include <xml/parser/ant_elements.h>
+#include <vector>
+
+#include <stdlib.h>
+
+namespace antcc
+{
+    class project;
+    namespace parser
+    {
+        template <typename T>
+        struct _parser_data
+        { };
+
+        class EmptyElement : public antcc::parser::ParserBase
+        {
+            protected:
+            public:
+            EmptyElement(antcc::antElement *_elt ) ;
+            EmptyElement(const EmptyElement &_e)
+                        : m_str(""), m_CurrentElement(_e.m_CurrentElement) {}
+            virtual ~EmptyElement() {};
+            
+            virtual void preImpl() {m_str.clear(); };
+            
+            virtual void postImpl() {};
+            // Any Elements
+            //
+           virtual void startAnyElement(const std::string &ns , const std::string &name) {
+               std::cout<<"EmptyElement::startAny: "<<name<<"\n";
+           };
+           virtual void endAnyElement(const std::string &ns,const std::string &name) {
+               std::cout<<"EmptyElement::end Any: "<<name<<"\n";
+           };
+           virtual void anyAttribute(const std::string &ns,const std::string &name,const std::string &val) {};
+
+            //
+            // Implementation start functions ....
+            //
+
+            virtual void post(std::string &m) {m.swap(m_str);};
+            virtual void post(int &v) {v = atoi(m_str.c_str());};
+            virtual void post(short &v) {v = atoi(m_str.c_str());};
+            virtual void post(unsigned long &v) {v = atoi(m_str.c_str());};
+            virtual void post(unsigned int &v) {v = atoi(m_str.c_str());};
+            virtual void post(unsigned short &v) {v = atoi(m_str.c_str());};
+            virtual void post(unsigned char &v) {v = atoi(m_str.c_str());};
+            /* byte */
+            virtual void post(signed char &v) {v = (signed char) atoi(m_str.c_str()); };
+            virtual void post(float &v) {v = atof(m_str.c_str());};
+            virtual void post(double &v) {v = atof(m_str.c_str());};
+            virtual void post(bool &v) {
+                if (m_str[0] == '0') {
+                  v = 0;
+                } else if (m_str[0] == '1') {
+                  v = 1;
+                } else if (!m_str.compare("true")) {
+                  v = 1;
+                } else if (!m_str.compare("false")) {
+                  v = 0;
+                } else {
+                  std::cerr<<"post(bool) with bad value:"<<m_str<<std::endl;
+                }
+            };
+            virtual antcc::antElement *post() { return m_CurrentElement; };
+            //virtual void post(xsd::decimal &v) {v = atoi(m_str.c_str());};
+
+           //
+            // Called by document parse ...
+            //
+
+
+            virtual bool startElementImpl(const std::string &ns,const std::string &name,const std::string &type) {return false;};
+            virtual bool endElementImpl(const std::string &ns,const std::string &name) {return false;};
+            virtual bool AttributeImpl(const std::string &ns,const std::string &name,const std::string &val) {return false;};
+            virtual bool _CharactersImpl(const std::string &c) {return false;};
+//
+
+            virtual void _startElement(const std::string &ns,const std::string &name,const std::string &type){startElementImpl(ns,name,type);};
+            virtual void _endElement(const std::string &ns,const std::string &name) {endElementImpl(ns,name);};
+
+            virtual void _Characters(const std::string &c) {if (!_CharactersImpl(c)) m_str+=c;};
+            virtual void _Attribute(const std::string &ns,const std::string &name,const std::string &value) ;
+            protected:
+            /** Characters in element */
+            std::string        m_str;
+            antcc::antElement *m_CurrentElement;
+        };
+
+        /**
+         * \brief
+         *
+         * \author EBERSOLD Andre
+         * \date
+         * \param
+         *
+         */
+        class SimpleElement : public EmptyElement
+        {
+            public:
+            SimpleElement(antcc::antElement *_elt=NULL)
+                   : EmptyElement(_elt) {};
+            virtual ~SimpleElement() { };
+            private:
+            virtual void pre() {this->preInternal();};
+            virtual void preInternal() {m_str.clear();};
+            virtual bool _CharactersImpl(const std::string &c) { m_str+=c;return true;};
+            virtual void _Characters(const std::string &c);
+            virtual void _Attribute(const std::string &ns,const std::string &name,const std::string &val);
+            virtual void updateLocation(const antcc::Location &l) ;
+        };
+
+        /**
+         * \brief Complex Elements have choice, sequence, extension...
+         * This is probably the most complicated case
+         *  
+         *
+         * \author EBERSOLD Andre
+         * \date
+         * \param
+         *
+         */
+        class ComplexElement : public ::antcc::parser::EmptyElement
+        {
+            protected:
+                ComplexElement(const ComplexElement &c);
+            /**
+             * use preInternal to allocated data on newly create stack state.
+             */
+            virtual void preImpl() ;
+            /**
+             * calls postInternal before removing State from state stack.
+             *  postInternal can be used to perform processing in underling classes.
+             */
+            virtual void postImpl();
+            public:
+            ComplexElement(antcc::antElement *_elt ) ;
+            virtual ~ComplexElement() {};
+                
+            
+            virtual void _startElement(const std::string &ns,const std::string &name,const std::string &type) ;
+            virtual void _endElement(const std::string &ns,const std::string &name) ;
+        
+            virtual void _Attribute(const std::string &ns,const std::string &name,const std::string &val);
+            virtual void _Characters(const std::string &c);
+            virtual void updateLocation(const antcc::Location &l) ;
+            protected:
+                /**
+                 * Complex parser Stack States to handle tree
+                 */
+                struct State {
+                    public:
+                    State();
+                    State(const State &p);
+                    virtual ~State();
+                    bool                       m_any;
+                    int                        m_depth; /* I need to  find another name for this*/
+                    SHARED_PTR<antcc::parser::ParserBase> m_parser;
+                    antcc::antElement         *m_data;  /* To solve recurse issue ....*/
+                };
+                std::vector<State> m_context;
+        };
+
+        /**
+         * \brief This class implements the root element parser.
+         * There shall be only one root element per specification
+         * This is the only class that should hold a stack of parsers.
+         *  
+         *
+         * \author EBERSOLD Andre
+         * \date   31/10/2019
+         * \param
+         *
+         */
+        class RootElement : public ::antcc::parser::EmptyElement
+        {
+            private:
+                RootElement(const RootElement &c);
+                /**
+                 * use preInternal to allocated data on newly create stack state.
+                 */
+                virtual void preImpl() ;
+                /**
+                 * calls postInternal before removing State from state stack.
+                 *  postInternal can be used to perform processing in underling classes.
+                 */
+                virtual void postImpl();
+            public:
+                RootElement(antcc::antElement *_elt ) ;
+                virtual ~RootElement() {};
+                    
+                
+                virtual void _startElement(const std::string &ns,const std::string &name,const std::string &type) ;
+                virtual void _endElement(const std::string &ns,const std::string &name) ;
+            
+                virtual void _Attribute(const std::string &ns,const std::string &name,const std::string &val);
+                virtual void _Characters(const std::string &c);
+                virtual void updateLocation(const antcc::Location &l) ;
+            protected:
+                /**
+                 * Complex parser Stack States to handle tree
+                 */
+                struct State {
+                    public:
+                    State();
+                    State(const State &p);
+                    virtual ~State();
+                    bool                       m_any;
+                    int                        m_depth; /* I need to  find another name for this*/
+                    SHARED_PTR<antcc::parser::ParserBase> m_parser;
+                    antcc::antElement         *m_data;  /* To solve recurse issue ....*/
+                };
+                std::vector<State> m_context;
+        };
+
+/* Parser Foward declaration */
+#define COMPLEX_PARSER(nm,cls) class cls;
+#define ROOT_PARSER(nm,cls) class cls;
+#define SIMPLE_PARSER(nm,cls) class cls;
+        
+#include <xml/parser/parsers.h.inc>
+#undef SIMPLE_PARSER
+#undef COMPLEX_PARSER
+#undef ROOT_PARSER
+
+/* */
+#define COMPLEX_PARSER(nm,cls) \
+class cls : public ComplexElement     \
+{                              \
+  protected:                      \
+    cls(const cls &_c) ;       \
+  public:                      \
+    cls(antcc::project *_project,antcc::antElement *_elt = NULL ) ; \
+    virtual ~cls() ;           \
+                               \
+    virtual bool startElementImpl(const std::string &ns,const std::string &name,const std::string &type) ;   \
+                                                                                                             \
+    virtual bool endElementImpl(const std::string &ns,const std::string &name) ;                             \
+                                                                                                             \
+    virtual bool AttributeImpl(const std::string &ns,const std::string &name,const std::string &val);        \
+                                                                                                             \
+    virtual void preInternal() ;                              \
+                                                                                                             \
+    virtual void postInternal() ;                             \
+                                                                                                             \
+  private:                                                    \
+    antcc::project *m_Project;                                \
+                                                              \
+    _parser_data<cls> m_Data;                                 \
+};
+
+#define ROOT_PARSER(nm,cls) \
+class cls : public RootElement     \
+{                                  \
+  protected:                       \
+    cls(const cls &_c) ;       \
+  public:                      \
+    cls(antcc::project *_project,antcc::antElement *_elt = NULL ) ; \
+    virtual ~cls() ;           \
+                               \
+    virtual bool startElementImpl(const std::string &ns,const std::string &name,const std::string &type) ;   \
+                                                                                                             \
+    virtual bool endElementImpl(const std::string &ns,const std::string &name) ;                             \
+                                                                                                             \
+    virtual bool AttributeImpl(const std::string &ns,const std::string &name,const std::string &val);        \
+                                                                                                             \
+    virtual void preInternal() ;                              \
+                                                                                                             \
+    virtual void postInternal() ;                             \
+                                                                                                             \
+  private:                                                    \
+    antcc::project *m_Project;                                \
+                                                              \
+};
+
+#define SIMPLE_PARSER(nm,cls) \
+class cls : public SimpleElement     \
+{                                    \
+  protected:                         \
+    cls(const cls &_c) ;             \
+  public:                            \
+    cls(antcc::project *_project,antcc::antElement *_elt = NULL ) ; \
+    virtual ~cls() ;           \
+                               \
+    virtual bool AttributeImpl(const std::string &ns,const std::string &name,const std::string &val);        \
+                                                                                                             \
+  private:                                                    \
+    antcc::project *m_Project;                                \
+                                                              \
+};
+
+// Parser DataType Specialization before usage
+#define COMPLEX_DATA_PARSER(eltname,parse,data)                       \
+template <>                                                           \
+struct _parser_data< ::antcc::parser:: parse>                         \
+data ;                                                                \
+
+COMPLEX_DATA_PARSER(target,TargetParser,{
+  TaskParser *m_TaskParser;
+  CopyParser *m_CopyParser;
+  ExecParser *m_ExecParser;
+})
+COMPLEX_DATA_PARSER(task,TaskParser,{})
+COMPLEX_DATA_PARSER(exec,ExecParser,{})
+COMPLEX_DATA_PARSER(copy,CopyParser,{})
+COMPLEX_DATA_PARSER(fileset,TypeParser,{})
+COMPLEX_DATA_PARSER(redirector,RedirectorParser,{})
+COMPLEX_DATA_PARSER(macrodef,MacrodefParser,{})
+
+
+#include <xml/parser/parsers.h.inc>
+#undef COMPLEX_PARSER
+#undef ROOT_PARSER
+#undef SIMPLE_PARSER
+
+    }
+}
+
+
+#endif
diff --git a/src/xml/parser/ant_elements_parser_root.cpp b/src/xml/parser/ant_elements_parser_root.cpp
new file mode 100644 (file)
index 0000000..f320874
--- /dev/null
@@ -0,0 +1,306 @@
+#include <ios>
+#include <iostream>
+#include <antcc/config.h>
+#include <os/path.h>
+#include <os/file.h>
+#include <location.h>
+#include <parser_base.h>
+#include <logger.h>
+#include <ant_elements.h>
+#include <ant_elements_parser.h>
+#include <ant_element_factory.h>
+
+#include <project.h>
+#include <projectComponent.h>
+
+namespace antcc {
+    namespace parser {
+
+
+
+/**
+ * Implement RootElement parsing function 
+ */
+
+RootElement::RootElement(antcc::antElement *_elt ) 
+  : EmptyElement(_elt)
+{
+    ANTCC_PARSER_DEBUG("Cplx(%0x)::Cplx ctor m_CurElt=%0x"
+                   ,this
+                   ,m_CurrentElement);
+}
+
+RootElement::RootElement(const RootElement &c)
+       : antcc::parser::EmptyElement(c.m_CurrentElement)
+{
+    ANTCC_PARSER_DEBUG("Cplx(%0x)::Cplx copy c.m_CurElt=%0x"
+                        ,this
+                        ,c.m_CurrentElement);
+}
+
+void RootElement::preImpl()
+{
+    m_context.push_back(State());
+    ANTCC_PARSER_DEBUG("Cplx(%0x)::preImpl m_context size=%d call preInternal"
+                        ,this
+                        ,m_context.size());
+    this->preInternal();
+}
+
+void RootElement::postImpl()
+{
+    this->postInternal();
+    ANTCC_PARSER_DEBUG("Cplx(%0x)::postImpl after postInternal m_context size=%d"
+                        ,this
+                        ,m_context.size());
+    m_context.pop_back();
+    ANTCC_PARSER_DEBUG("Cplx::postImpl after m_context size=%d",m_context.size());
+}
+
+void RootElement::_startElement(const std::string &ns,const std::string &name,const std::string &type) 
+{
+    State       &s(m_context.back());
+    std::string space;
+    ANTCC_PARSER_DEBUG("%sCplxE(%0x)::_startElement Enter name=%s s.depth=%d context.size=%d"
+            ,space.insert(0,s.m_depth,' ').c_str()
+            ,this
+            ,name.c_str()
+            ,s.m_depth
+            ,m_context.size());
+    if (s.m_depth++ > 0) 
+    {
+        //Should check if it's any first 
+        if (s.m_parser)
+        {
+            ANTCC_PARSER_DEBUG("CplxE::_startElement call s.m_parser->_startElement : %s",name.c_str());
+            s.m_parser->_startElement(ns,name,type);
+        } else {
+            ANTCC_PARSER_ERROR("CplxE::_startElement no parser stacked (s.m_parser==NULL) : %s",name.c_str());
+        }
+    } else {
+        ANTCC_PARSER_DEBUG("CplxE::_startElement %s call startElementImpl",name.c_str());
+        if (!startElementImpl(ns,name,type)) 
+        {
+            ANTCC_PARSER_ERROR("CplxE::_startElement %s call startElementImpl returned false",name.c_str());
+#ifdef PARSER_DEBUG
+            std::cout<<"\tcplx _start call Any : unknown "<<name<<std::endl;
+#endif
+           // Unexpectect element 
+           //this->startAnyElement(ns,name);
+            /* Element not recogized by us*/
+        } else 
+        {
+            ANTCC_PARSER_DEBUG("CplxE::_startElement %s called startElementImpl returned true ",name.c_str());
+            if (s.m_parser != 0)
+            {
+                s.m_parser->preImpl();
+                /* Need to call pre */
+#ifdef PARSER_DEBUG
+            std::cout<<"\tcplx _start Need to call pre- : "<<name<<std::endl;
+#endif
+            }
+        }
+    }
+}
+
+
+void RootElement::_endElement(const std::string &ns,const std::string &name) 
+{
+    State &s(m_context.back());
+    std::string space;
+    ANTCC_PARSER_DEBUG("%sCplx(%0x)::_endElement Enter name=%s s.depth=%d context.size=%d"
+            ,space.insert(0,s.m_depth,' ').c_str()
+            ,this
+            ,name.c_str()
+            ,s.m_depth
+            ,m_context.size());
+    if (m_context.back().m_depth==0)
+    {
+        State &ss(m_context[m_context.size()-2]);
+        if (--ss.m_depth > 0)
+        {
+            // Indirect 
+            ANTCC_PARSER_DEBUG("CplxE::_endElement 1 name=%s ss.m_depth=%d m_context.size=%d"
+                            ,name.c_str()
+                            ,ss.m_depth
+                            ,m_context.size());
+            if (ss.m_parser)
+            {
+                ss.m_parser->_endElement(ns,name);
+            } else
+                std::cout<<"No parser ? "<<name<<std::endl;
+
+        } else
+        {
+            // Direct recursion
+            ANTCC_PARSER_DEBUG( "CplxE::_endElement %s 2 WARNING I pass by here Direct recursion: "
+                    ,name.c_str());
+            if (this == ss.m_parser.get())
+            {
+                ANTCC_PARSER_DEBUG( "CplxE::_endElement %s good this==ss.m_parser",name.c_str());
+                 
+                this->postImpl();
+                if (!endElementImpl(ns,name))
+                {
+                    ANTCC_PARSER_ERROR( "CplxE::_endElement %s endElementImpl call failed",name.c_str());
+                } 
+            } else 
+            {
+                ANTCC_PARSER_ERROR( "CplxE::_endElement %s Must NOT HAPPEN!!!",name.c_str());
+            }
+        }
+    }
+    else
+    {
+        State &s(m_context.back());
+        if (--s.m_depth > 0) 
+        {
+            space = "";
+            ANTCC_PARSER_DEBUG("%sCplx(%0x)::_endElement 3 name=%s s.depth=%d context.size=%d"
+                    ,space.insert(0,s.m_depth,' ').c_str()
+                    ,this
+                    ,name.c_str()
+                    ,s.m_depth
+                    ,m_context.size());
+            if (s.m_parser)
+            {
+                s.m_parser->_endElement(ns,name);
+            } else 
+                std::cout<<"No parser here\n";
+        
+        } else {
+            ANTCC_PARSER_DEBUG("CplxE(%0x)::_endElement %s 4 %s same parser "
+                    , this
+                    , name.c_str()
+                    , (this==s.m_parser.get())?"yes":"no");
+            if (s.m_parser )
+            {
+                ANTCC_PARSER_DEBUG("CplxE(%0x)::_endElement call postImpl %s"
+                                    ,this
+                                    ,name.c_str());
+                s.m_parser->postImpl();
+            }
+
+            if (!endElementImpl(ns,name))
+            {
+                ANTCC_PARSER_ERROR("CplxE::_endElement failed call endElementImpl %s"
+                        ,name.c_str());
+                // Wrong
+                //this->endAnyElement(ns,name);
+            }
+        }
+    }
+    ANTCC_PARSER_DEBUG("CplxE::_endElement LEAVE this=%0x name=%s,s.m_depth=%d m_context.size=%d"
+            , this
+            ,name.c_str()
+            ,s.m_depth
+            ,m_context.size()
+            );
+}
+
+/**
+ *
+ *
+ */
+ void RootElement::_Attribute(const std::string &ns,const std::string &name,const std::string &val)
+{
+    if (m_context.back().m_depth > 0) 
+    {
+        State &s(m_context.back());
+        if (s.m_any)
+        {
+            ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre any name=%s",name.c_str());
+            anyAttribute(ns,name,val);
+        } else if (s.m_parser) 
+        {
+            ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre with parser name=%s",name.c_str());
+            s.m_parser->_Attribute(ns,name,val);
+        } 
+    } else 
+    {
+        ANTCC_PARSER_DEBUG_CPLX_ATTR("Cplx::_Attributre call this->AttributeImpl name=%s",name.c_str());
+        if ( ! this->AttributeImpl(ns,name,val) )
+       {
+            ANTCC_PARSER_ERROR("Cplx::_AttributeImpl name=%s unsupported"
+                           ,name.c_str());
+       }
+    }
+}
+
+/**
+ *
+ *
+ */
+void RootElement::_Characters(const std::string &val)
+{
+    State &s(m_context.back());
+    if (s.m_depth > 0)
+    {
+        if (s.m_parser) {
+#ifdef PARSER_DEBUG_CHARACTER
+            std::cout<<"CplxE::_characters"<<val<<" sz="<<m_context.size()<<"call parser@ "<<s.m_parser<<"\n";
+#endif
+            if (s.m_parser.get() == this) 
+            {
+              std::cerr<<"CplxE::_Characters ERROR: I have serious trouble treating -("<<val<<")"<<s.m_depth<<"\n";
+              if (!_CharactersImpl(val))
+              {
+                // Call any characters
+#ifdef PARSER_DEBUG_CHARATER
+          std::cout<<"CplxE::_Characters what to do? call any_characters :"<<val<<" depth="<<s.m_depth<<std::endl;
+#endif
+              }
+            } else
+              s.m_parser->_Characters(val);
+        } else {
+            std::cout<<"CplxE::_characters... what to do with char ("<<val<<") "<<m_context.size()<<" parser@="<<s.m_parser<<"\n";
+        }
+
+    } else {
+        if (!_CharactersImpl(val))
+        {
+          // Call any characters
+#ifdef PARSER_DEBUG_CHARATER
+    std::cout<<"CplxE::_Characters what to do? call any_characters :"<<val<<" depth="<<s.m_depth<<std::endl;
+#endif
+        }
+    }
+}
+            
+void 
+RootElement::updateLocation(const antcc::Location &l)
+{
+    State &s(m_context.back());
+    if (s.m_parser != NULL)
+    {
+        s.m_parser->updateLocation(l);
+    } else if (m_CurrentElement)
+    {
+        m_CurrentElement->setLocation(l);
+    }
+}
+
+RootElement::State::State() : m_any(0),m_depth(0),m_parser(0),m_data(0)
+{ 
+  //ANTCC_PARSER_DEBUG("State::State %d",m_depth);
+}
+
+RootElement::State::~State()
+{ 
+    //ANTCC_PARSER_DEBUG("State::~State %d",m_depth);
+    if (m_data)
+    {
+        ANTCC_PARSER_ERROR("State::~State error m_data != null %d",m_depth);
+    }
+}
+RootElement::State::State(const RootElement::State &p) 
+        : m_any(p.m_any),m_depth(p.m_depth),m_parser(p.m_parser),m_data(p.m_data)
+{
+        ANTCC_PARSER_DEBUG("State::State copy ctor depth=%d data=%0x"
+                    ,m_depth
+                    ,m_data
+                    );
+}
+
+}
+}
diff --git a/src/xml/parser/document.cpp b/src/xml/parser/document.cpp
new file mode 100644 (file)
index 0000000..2de3b38
--- /dev/null
@@ -0,0 +1,179 @@
+#include <cstring>
+#include <iostream>
+#include <expat.h>
+#include <antcc/config.h>
+#include <logger.h>
+#include <location.h>
+#include <xml/parser/ant_elements.h>
+#include <xml/parser/parser_base.h>
+#include <xml/parser/document.h>
+
+namespace antcc
+{
+    namespace parser
+    {
+
+
+            /**
+             * Funny fact to parse a xml entity....
+             */
+            bool Document::parse(std::istream &is)
+            {
+                char buf[16384];
+                parser_auto_ptr parser = XML_ParserCreateNS(0,XML_Char(' '));
+                m_parser = parser;
+                parser_init();
+                do 
+                {
+                        is.read(buf,sizeof(buf));
+                        if (is.bad() || (is.fail() && !is.eof()))
+                        {
+                            break; /* End of parsing */
+                        }
+                        if (XML_Parse ( m_parser,buf,is.gcount(),is.eof()) == XML_STATUS_ERROR)
+                        {
+                            break;
+                        }
+                } while (! is.eof());
+                parser_clear();
+               return true;
+            }
+
+            void Document::parser_init()
+            {
+                XML_SetUserData(m_parser,this);
+                XML_SetStartElementHandler(m_parser,startElement_glb);
+                XML_SetEndElementHandler(m_parser,endElement_glb);
+                XML_SetCharacterDataHandler(m_parser,characters_glb);
+                /**
+                 * XML_SetNamespaveDecHandler(m_parser,start,end);
+                 */
+                XML_SetNamespaceDeclHandler(m_parser,startNamespace_glb,endNamespace_glb);
+            }
+
+            void Document::parser_clear()
+            {
+                XML_SetUserData(m_parser,0);
+                XML_SetStartElementHandler(m_parser,0);
+                XML_SetEndElementHandler(m_parser,0);
+                XML_SetNamespaceDeclHandler(m_parser,0,0);
+            }
+
+            void Document::startElement_glb(void *d,const XML_Char *ns, const XML_Char **attr)
+            {
+                Document &doc = (*reinterpret_cast<Document*>(d));
+                doc.startElement(ns,attr);
+            }
+
+            void Document::endElement_glb(void *d,const XML_Char *ns)
+            {
+                Document &doc = (*reinterpret_cast<Document*>(d));
+                doc.endElement(ns);
+            }
+            
+            void Document::characters_glb(void *d,const XML_Char *ns,int ds)
+            {
+                Document &doc = (*reinterpret_cast<Document*>(d));
+                doc.Characters(ns,ds);
+            }
+
+            void Document::split_name(const XML_Char *s,const char *&ns,size_t &ns_s,
+                            const char *&name,size_t &name_s)
+            {
+                const char *p = std::strchr(s,' ');
+                ns=s;
+                if (p)
+                {
+                    ns_s=p-s;
+                    name=p+1;
+                } else
+                {
+                    ns_s =0;
+                    name=s;
+                }
+                name_s = strlen(name);
+
+            }
+            /**
+             * Well first see how it works. Right now, I do not really now
+             * But it's important for soap.
+             *
+             */
+            void Document::startNamespace_glb(void *d,const XML_Char *prefix, const XML_Char *uri)
+            {
+                Document &doc = (*reinterpret_cast<Document*>(d));
+            }
+            void Document::endNamespace_glb(void *d,const XML_Char *prefix)
+            {
+                Document &doc = (*reinterpret_cast<Document*>(d));
+            }
+
+            /* Ok, call the parser objects with the given events ... */
+            void Document::startElement(const XML_Char *name,const XML_Char **attr)
+            {
+                const char *ns;
+                const char *nm;
+                size_t ns_s,nm_s;
+
+                split_name(name,ns,ns_s,nm,nm_s);
+                updateLocation();
+                if (m_depth++ > 0 ) 
+                {
+                    /* under root */
+                    m_root_parser._startElement(std::string(ns,ns_s),std::string(nm,nm_s),std::string(""));
+                    ANTCC_PARSER_DEBUG("**** Document after having called _startElement %s *****",name);
+                    m_root_parser.updateLocation(m_location);
+                } else
+                {
+                    ANTCC_PARSER_DEBUG("**** Document root start %s*****",name);
+                    /* root element */
+                    std::string n(nm,nm_s);
+                    if (n == m_name) 
+                    {
+                        /* Yes we are right */
+                        //std::cout<<" Yes, start root "<<m_name<<std::endl;
+                        m_root_parser.preImpl();
+                        m_root_parser.updateLocation(m_location);
+                    } else 
+                    {
+                        ANTCC_LOG_CRITICAL("**** Document wrong root start %s-%s*****",m_name,n);
+                    }
+                    /* I think I shoud proceed with the attributes now */
+                }
+                const XML_Char **p = attr;
+                for (p ; *p != 0 ; p+=2)
+                {   
+                    split_name(*p,ns,ns_s,nm,nm_s);
+                    Attribute(std::string(ns,ns_s),std::string(nm,nm_s),std::string(*(p+1)));
+                }
+            }
+            void Document::endElement(const XML_Char *name)
+            {
+                const char *ns;
+                const char *nm;
+                size_t ns_s,nm_s;
+                split_name(name,ns,ns_s,nm,nm_s);
+                if (--m_depth > 0)
+                {
+                    m_root_parser._endElement(std::string(ns,ns_s),std::string(nm,nm_s));
+                } else
+                {
+                    /* end root element */
+                    m_root_parser.postImpl();
+                }
+            }
+            void Document::Characters(const XML_Char *name,size_t sz)
+            {
+                m_root_parser._Characters(std::string(name,sz));
+            }
+            void Document::Attribute(const std::string &ns,const std::string &n,const std::string &val)
+            {
+                m_root_parser._Attribute(ns,n,val);
+            }
+            void Document::updateLocation()
+            {
+                m_location.m_Column = XML_GetCurrentColumnNumber(m_parser);
+                m_location.m_Line   = XML_GetCurrentLineNumber(m_parser);
+            }
+    } /* end ns parser */
+}
diff --git a/src/xml/parser/document.h b/src/xml/parser/document.h
new file mode 100644 (file)
index 0000000..435e2d8
--- /dev/null
@@ -0,0 +1,110 @@
+#ifndef  XSD_PARSER_DOC_H 
+#define  XSD_PARSER_DOC_H
+#include <iostream>
+namespace antcc
+{
+
+    namespace parser 
+    {
+
+        /**
+         *
+         */
+        class DocumentBase
+        {
+                public:
+                    DocumentBase(ParserBase &p,const char *root) : m_depth(0) , m_root_parser(p),m_name(root) {};
+                    virtual ~DocumentBase() {};
+
+                    virtual void  startElement(std::string &ns,std::string &name,std::string tp){};
+                protected:
+                    ParserBase &m_root_parser;
+                    std::size_t m_depth;
+                    std::string m_name;         /* Root name of the document */
+        };
+
+
+      struct parser_auto_ptr
+      {
+          ~parser_auto_ptr()
+          {
+            if (m_parser!= 0) 
+            {
+                XML_ParserFree(m_parser);
+            }
+          };
+        parser_auto_ptr(XML_Parser  p = 0) :m_parser(p) {};
+
+        parser_auto_ptr& operator =(XML_Parser p)
+        {
+            if(m_parser != 0) XML_ParserFree(m_parser);
+            m_parser = p;
+            return *this;
+        }
+          public:
+            operator XML_Parser()
+            {
+                return m_parser;
+            };
+          private:
+            XML_Parser m_parser;
+      };
+
+
+      /**
+       * \brief First try to parse an xml document
+       * I do not yet have all the information.
+       *
+       * \author EBERSOLD Andre
+       * \date   11/09/09
+       */
+      class Document : public DocumentBase {
+        public:
+            /**
+             * \brief default constructor, see ParseBase
+             * \param root, is the root element we want to parse
+             * \param root_element_name is the name of the root element
+             */
+          Document( ParserBase &root,const char *root_element_name) 
+                : antcc::parser::DocumentBase(root,root_element_name),m_location(NULL,0,0) {};
+            /* What do I realy need */
+          ~Document() { };
+          bool    parse(std::string filename);
+        /**
+         *
+         */
+          bool parse(std::istream &is);
+        private:
+        void split_name(const XML_Char *s,const char *&ns,size_t &ns_s, const char *&name,size_t &name_s);
+            /* For expact we need static functions .... */
+
+        static void XMLCALL startElement_glb(void *, const XML_Char *,const XML_Char **attr);
+        static void XMLCALL endElement_glb(void *,const XML_Char *name);
+        static void XMLCALL characters_glb(void *d,const XML_Char *ns,int dt);
+
+        static void XMLCALL startNamespace_glb(void *, const XML_Char *prefix,const XML_Char *uri);
+        static void XMLCALL endNamespace_glb(void *, const XML_Char *prefix);
+        /*
+         *
+         */
+        void parser_init();
+        /**
+         *
+         *
+         */
+        void parser_clear();
+
+        void startElement(const XML_Char *name,const XML_Char **attr);
+        void endElement(const XML_Char *name);
+        void Characters(const XML_Char *name,size_t sz);
+        void Attribute(const std::string &ns,const std::string &name,const std::string &val);
+        void updateLocation();
+        protected:
+            XML_Parser m_parser;
+            antcc::Location m_location;
+      };
+
+
+    } // End ns
+}
+#endif
diff --git a/src/xml/parser/parser_base.h b/src/xml/parser/parser_base.h
new file mode 100644 (file)
index 0000000..64f92a1
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef ANTCC_PARSER_ELEMENTS_H
+#define ANTCC_PARSER_ELEMENTS_H
+#include <iostream>
+namespace antcc
+{
+    struct antElement;
+    namespace parser {
+       class Document;
+       class ComplexElement;
+       class SimpleElement;
+       class RootElement;
+        /**
+         * \brief Abstract class to implement the parser
+         *
+         */
+        class ParserBase 
+        {
+           private:
+                ParserBase(const ParserBase &p) {};
+            public: 
+                ParserBase() {};
+
+                virtual void pre() {};
+                virtual antElement *post() { return NULL; };
+
+                virtual void preInternal() {};
+                virtual void postInternal() {};
+                
+                virtual void preImpl() {preInternal();};
+                virtual void postImpl() {postInternal();};
+    
+                // 
+                virtual void startAnyElement(const std::string &ns , const std::string &name) {};
+                virtual void endAnyElement(const std::string &ns,const std::string &name) {};
+                virtual void anyAttribute(const std::string &ns,const std::string &name,const std::string &val) {};
+
+                // post functions 
+                virtual void  post(std::string &) {std::cout<<"Should not behere\n";}; 
+                //virtual void  post(xsd::decimal &) {std::cout<<"Should not behere\n";}; 
+                virtual void  post(float &) {std::cout<<"Should not behere\n";}; 
+                virtual void  post(double &) {std::cout<<"Should not behere\n";}; 
+                virtual void  post(int &) {};
+                virtual void  post(short &) {};
+                
+           // Function coded once called by the Documents.
+           protected:
+                virtual void _startElement(const std::string &ns,const std::string &name,const std::string &type) = 0;
+                virtual void _endElement(const std::string &ns,const std::string &name) = 0;
+                virtual void _Characters(const std::string &) = 0;
+                virtual void _Attribute(const std::string &ns,const std::string &name,const std::string &value) = 0;
+                
+                virtual const std::string &dynamicType() {static std::string s="base";return s;};
+
+                virtual void updateLocation(const antcc::Location &l) {};
+                friend class antcc::parser::Document;
+                friend class antcc::parser::ComplexElement;
+                friend class antcc::parser::RootElement;
+                friend class antcc::parser::SimpleElement;
+
+
+      };
+    
+    }
+
+
+}
+
+#endif
diff --git a/src/xml/parser/parsers.h.inc b/src/xml/parser/parsers.h.inc
new file mode 100644 (file)
index 0000000..535b76e
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef COMPLEX_PARSER
+#define COMPLEX_PARSER(nm,cls)
+#endif
+#ifndef ROOT_PARSER
+#define ROOT_PARSER(nm,cls)
+#endif
+#ifndef SIMPLE_PARSER
+#define SIMPLE_PARSER(nm,cls)
+#endif
+
+ROOT_PARSER(project,ProjectParser)
+COMPLEX_PARSER(target,TargetParser)
+COMPLEX_PARSER(task,TaskParser)
+COMPLEX_PARSER(exec,ExecParser)
+COMPLEX_PARSER(copy,CopyParser)
+COMPLEX_PARSER(fileset,TypeParser)
+COMPLEX_PARSER(redirector,RedirectorParser)
+COMPLEX_PARSER(macrodef,MacrodefParser)
+SIMPLE_PARSER(description,DescriptionParser)
+SIMPLE_PARSER(mapper,MapperParser)
+SIMPLE_PARSER(property,PropertyParser)