Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5546 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Nov 11, 2005, 4:48:16 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: taken out LoadParamDescription into a file of its own

Location:
trunk/src
Files:
11 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/orxonox.cc

    r5510 r5546  
    5252#include "shell_buffer.h"
    5353
    54 #include "load_param.h"
     54#include "load_param_description.h"
    5555
    5656#include <string.h>
  • trunk/src/subprojects/collision_detection/Makefile.am

    r5486 r5546  
    55bin_PROGRAMS = collision
    66
    7 collision_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a \
     7collision_LDADD = $(MAINSRCDIR)/util/libORXutils.a \
     8                  $(MAINSRCDIR)/lib/physics/libORXphysics.a \
    89                  $(MAINSRCDIR)/lib/collision_detection/libORXcd.a \
    910                  $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a \
     
    2425                   collision_detection.cc \
    2526                   \
    26                    $(MAINSRCDIR)/util/loading/factory.cc \
    27                    $(MAINSRCDIR)/util/loading/resource_manager.cc \
    28                    $(MAINSRCDIR)/util/loading/load_param.cc \
    29                    $(MAINSRCDIR)/util/animation/animation.cc \
    30                    $(MAINSRCDIR)/util/animation/animation_player.cc \
    31                    $(MAINSRCDIR)/util/animation/animation3d.cc \
    32                    $(MAINSRCDIR)/util/state.cc \
    33                    \
    3427                   $(MAINSRCDIR)/lib/util/helper_functions.cc \
    3528                   $(MAINSRCDIR)/lib/util/substring.cc \
     
    4740                   collision_test_entity.cc
    4841
    49 noinst_HEADERS  =  collision_test_entity.h 
     42noinst_HEADERS  =  collision_test_entity.h
  • trunk/src/subprojects/collision_detection/Makefile.in

    r5486 r5546  
    5555am_collision_OBJECTS = collision-framework.$(OBJEXT) \
    5656        collision-collision_detection.$(OBJEXT) \
    57         collision-factory.$(OBJEXT) \
    58         collision-resource_manager.$(OBJEXT) \
    59         collision-load_param.$(OBJEXT) collision-animation.$(OBJEXT) \
    60         collision-animation_player.$(OBJEXT) \
    61         collision-animation3d.$(OBJEXT) collision-state.$(OBJEXT) \
    6257        collision-helper_functions.$(OBJEXT) \
    6358        collision-substring.$(OBJEXT) collision-ini_parser.$(OBJEXT) \
     
    7065collision_OBJECTS = $(am_collision_OBJECTS)
    7166am__DEPENDENCIES_1 =
    72 collision_DEPENDENCIES = $(MAINSRCDIR)/lib/physics/libORXphysics.a \
     67collision_DEPENDENCIES = $(MAINSRCDIR)/util/libORXutils.a \
     68        $(MAINSRCDIR)/lib/physics/libORXphysics.a \
    7369        $(MAINSRCDIR)/lib/collision_detection/libORXcd.a \
    7470        $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a \
     
    205201target_vendor = @target_vendor@
    206202MAINSRCDIR = ../..
    207 collision_LDADD = $(MAINSRCDIR)/lib/physics/libORXphysics.a \
     203collision_LDADD = $(MAINSRCDIR)/util/libORXutils.a \
     204                  $(MAINSRCDIR)/lib/physics/libORXphysics.a \
    208205                  $(MAINSRCDIR)/lib/collision_detection/libORXcd.a \
    209206                  $(MAINSRCDIR)/lib/graphics/importer/libORXimporter.a \
     
    222219                   collision_detection.cc \
    223220                   \
    224                    $(MAINSRCDIR)/util/loading/factory.cc \
    225                    $(MAINSRCDIR)/util/loading/resource_manager.cc \
    226                    $(MAINSRCDIR)/util/loading/load_param.cc \
    227                    $(MAINSRCDIR)/util/animation/animation.cc \
    228                    $(MAINSRCDIR)/util/animation/animation_player.cc \
    229                    $(MAINSRCDIR)/util/animation/animation3d.cc \
    230                    $(MAINSRCDIR)/util/state.cc \
    231                    \
    232221                   $(MAINSRCDIR)/lib/util/helper_functions.cc \
    233222                   $(MAINSRCDIR)/lib/util/substring.cc \
     
    245234                   collision_test_entity.cc
    246235
    247 noinst_HEADERS = collision_test_entity.h 
     236noinst_HEADERS = collision_test_entity.h
    248237all: all-am
    249238
     
    312301        -rm -f *.tab.c
    313302
    314 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-animation.Po@am__quote@
    315 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-animation3d.Po@am__quote@
    316 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-animation_player.Po@am__quote@
    317303@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-base_object.Po@am__quote@
    318304@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-camera.Po@am__quote@
     
    321307@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-collision_test_entity.Po@am__quote@
    322308@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-color.Po@am__quote@
    323 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-factory.Po@am__quote@
    324309@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-framework.Po@am__quote@
    325310@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-gui_gtk.Po@am__quote@
    326311@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-helper_functions.Po@am__quote@
    327312@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-ini_parser.Po@am__quote@
    328 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-load_param.Po@am__quote@
    329313@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-null_parent.Po@am__quote@
    330314@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-p_node.Po@am__quote@
    331 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-resource_manager.Po@am__quote@
    332 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-state.Po@am__quote@
    333315@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-substring.Po@am__quote@
    334316@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/collision-vector.Po@am__quote@
     
    376358@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    377359@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-collision_detection.obj `if test -f 'collision_detection.cc'; then $(CYGPATH_W) 'collision_detection.cc'; else $(CYGPATH_W) '$(srcdir)/collision_detection.cc'; fi`
    378 
    379 collision-factory.o: $(MAINSRCDIR)/util/loading/factory.cc
    380 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-factory.o -MD -MP -MF "$(DEPDIR)/collision-factory.Tpo" -c -o collision-factory.o `test -f '$(MAINSRCDIR)/util/loading/factory.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/factory.cc; \
    381 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-factory.Tpo" "$(DEPDIR)/collision-factory.Po"; else rm -f "$(DEPDIR)/collision-factory.Tpo"; exit 1; fi
    382 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/factory.cc' object='collision-factory.o' libtool=no @AMDEPBACKSLASH@
    383 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    384 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-factory.o `test -f '$(MAINSRCDIR)/util/loading/factory.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/factory.cc
    385 
    386 collision-factory.obj: $(MAINSRCDIR)/util/loading/factory.cc
    387 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-factory.obj -MD -MP -MF "$(DEPDIR)/collision-factory.Tpo" -c -o collision-factory.obj `if test -f '$(MAINSRCDIR)/util/loading/factory.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/factory.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/factory.cc'; fi`; \
    388 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-factory.Tpo" "$(DEPDIR)/collision-factory.Po"; else rm -f "$(DEPDIR)/collision-factory.Tpo"; exit 1; fi
    389 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/factory.cc' object='collision-factory.obj' libtool=no @AMDEPBACKSLASH@
    390 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    391 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-factory.obj `if test -f '$(MAINSRCDIR)/util/loading/factory.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/factory.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/factory.cc'; fi`
    392 
    393 collision-resource_manager.o: $(MAINSRCDIR)/util/loading/resource_manager.cc
    394 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-resource_manager.o -MD -MP -MF "$(DEPDIR)/collision-resource_manager.Tpo" -c -o collision-resource_manager.o `test -f '$(MAINSRCDIR)/util/loading/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/resource_manager.cc; \
    395 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-resource_manager.Tpo" "$(DEPDIR)/collision-resource_manager.Po"; else rm -f "$(DEPDIR)/collision-resource_manager.Tpo"; exit 1; fi
    396 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/resource_manager.cc' object='collision-resource_manager.o' libtool=no @AMDEPBACKSLASH@
    397 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    398 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-resource_manager.o `test -f '$(MAINSRCDIR)/util/loading/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/resource_manager.cc
    399 
    400 collision-resource_manager.obj: $(MAINSRCDIR)/util/loading/resource_manager.cc
    401 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-resource_manager.obj -MD -MP -MF "$(DEPDIR)/collision-resource_manager.Tpo" -c -o collision-resource_manager.obj `if test -f '$(MAINSRCDIR)/util/loading/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/resource_manager.cc'; fi`; \
    402 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-resource_manager.Tpo" "$(DEPDIR)/collision-resource_manager.Po"; else rm -f "$(DEPDIR)/collision-resource_manager.Tpo"; exit 1; fi
    403 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/resource_manager.cc' object='collision-resource_manager.obj' libtool=no @AMDEPBACKSLASH@
    404 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    405 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-resource_manager.obj `if test -f '$(MAINSRCDIR)/util/loading/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/resource_manager.cc'; fi`
    406 
    407 collision-load_param.o: $(MAINSRCDIR)/util/loading/load_param.cc
    408 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-load_param.o -MD -MP -MF "$(DEPDIR)/collision-load_param.Tpo" -c -o collision-load_param.o `test -f '$(MAINSRCDIR)/util/loading/load_param.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/load_param.cc; \
    409 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-load_param.Tpo" "$(DEPDIR)/collision-load_param.Po"; else rm -f "$(DEPDIR)/collision-load_param.Tpo"; exit 1; fi
    410 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/load_param.cc' object='collision-load_param.o' libtool=no @AMDEPBACKSLASH@
    411 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    412 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-load_param.o `test -f '$(MAINSRCDIR)/util/loading/load_param.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/load_param.cc
    413 
    414 collision-load_param.obj: $(MAINSRCDIR)/util/loading/load_param.cc
    415 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-load_param.obj -MD -MP -MF "$(DEPDIR)/collision-load_param.Tpo" -c -o collision-load_param.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param.cc'; fi`; \
    416 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-load_param.Tpo" "$(DEPDIR)/collision-load_param.Po"; else rm -f "$(DEPDIR)/collision-load_param.Tpo"; exit 1; fi
    417 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/load_param.cc' object='collision-load_param.obj' libtool=no @AMDEPBACKSLASH@
    418 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    419 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-load_param.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param.cc'; fi`
    420 
    421 collision-animation.o: $(MAINSRCDIR)/util/animation/animation.cc
    422 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-animation.o -MD -MP -MF "$(DEPDIR)/collision-animation.Tpo" -c -o collision-animation.o `test -f '$(MAINSRCDIR)/util/animation/animation.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/animation/animation.cc; \
    423 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-animation.Tpo" "$(DEPDIR)/collision-animation.Po"; else rm -f "$(DEPDIR)/collision-animation.Tpo"; exit 1; fi
    424 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/animation/animation.cc' object='collision-animation.o' libtool=no @AMDEPBACKSLASH@
    425 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    426 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-animation.o `test -f '$(MAINSRCDIR)/util/animation/animation.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/animation/animation.cc
    427 
    428 collision-animation.obj: $(MAINSRCDIR)/util/animation/animation.cc
    429 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-animation.obj -MD -MP -MF "$(DEPDIR)/collision-animation.Tpo" -c -o collision-animation.obj `if test -f '$(MAINSRCDIR)/util/animation/animation.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/animation/animation.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/animation/animation.cc'; fi`; \
    430 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-animation.Tpo" "$(DEPDIR)/collision-animation.Po"; else rm -f "$(DEPDIR)/collision-animation.Tpo"; exit 1; fi
    431 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/animation/animation.cc' object='collision-animation.obj' libtool=no @AMDEPBACKSLASH@
    432 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    433 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-animation.obj `if test -f '$(MAINSRCDIR)/util/animation/animation.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/animation/animation.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/animation/animation.cc'; fi`
    434 
    435 collision-animation_player.o: $(MAINSRCDIR)/util/animation/animation_player.cc
    436 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-animation_player.o -MD -MP -MF "$(DEPDIR)/collision-animation_player.Tpo" -c -o collision-animation_player.o `test -f '$(MAINSRCDIR)/util/animation/animation_player.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/animation/animation_player.cc; \
    437 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-animation_player.Tpo" "$(DEPDIR)/collision-animation_player.Po"; else rm -f "$(DEPDIR)/collision-animation_player.Tpo"; exit 1; fi
    438 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/animation/animation_player.cc' object='collision-animation_player.o' libtool=no @AMDEPBACKSLASH@
    439 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    440 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-animation_player.o `test -f '$(MAINSRCDIR)/util/animation/animation_player.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/animation/animation_player.cc
    441 
    442 collision-animation_player.obj: $(MAINSRCDIR)/util/animation/animation_player.cc
    443 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-animation_player.obj -MD -MP -MF "$(DEPDIR)/collision-animation_player.Tpo" -c -o collision-animation_player.obj `if test -f '$(MAINSRCDIR)/util/animation/animation_player.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/animation/animation_player.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/animation/animation_player.cc'; fi`; \
    444 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-animation_player.Tpo" "$(DEPDIR)/collision-animation_player.Po"; else rm -f "$(DEPDIR)/collision-animation_player.Tpo"; exit 1; fi
    445 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/animation/animation_player.cc' object='collision-animation_player.obj' libtool=no @AMDEPBACKSLASH@
    446 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    447 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-animation_player.obj `if test -f '$(MAINSRCDIR)/util/animation/animation_player.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/animation/animation_player.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/animation/animation_player.cc'; fi`
    448 
    449 collision-animation3d.o: $(MAINSRCDIR)/util/animation/animation3d.cc
    450 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-animation3d.o -MD -MP -MF "$(DEPDIR)/collision-animation3d.Tpo" -c -o collision-animation3d.o `test -f '$(MAINSRCDIR)/util/animation/animation3d.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/animation/animation3d.cc; \
    451 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-animation3d.Tpo" "$(DEPDIR)/collision-animation3d.Po"; else rm -f "$(DEPDIR)/collision-animation3d.Tpo"; exit 1; fi
    452 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/animation/animation3d.cc' object='collision-animation3d.o' libtool=no @AMDEPBACKSLASH@
    453 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    454 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-animation3d.o `test -f '$(MAINSRCDIR)/util/animation/animation3d.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/animation/animation3d.cc
    455 
    456 collision-animation3d.obj: $(MAINSRCDIR)/util/animation/animation3d.cc
    457 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-animation3d.obj -MD -MP -MF "$(DEPDIR)/collision-animation3d.Tpo" -c -o collision-animation3d.obj `if test -f '$(MAINSRCDIR)/util/animation/animation3d.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/animation/animation3d.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/animation/animation3d.cc'; fi`; \
    458 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-animation3d.Tpo" "$(DEPDIR)/collision-animation3d.Po"; else rm -f "$(DEPDIR)/collision-animation3d.Tpo"; exit 1; fi
    459 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/animation/animation3d.cc' object='collision-animation3d.obj' libtool=no @AMDEPBACKSLASH@
    460 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    461 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-animation3d.obj `if test -f '$(MAINSRCDIR)/util/animation/animation3d.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/animation/animation3d.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/animation/animation3d.cc'; fi`
    462 
    463 collision-state.o: $(MAINSRCDIR)/util/state.cc
    464 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-state.o -MD -MP -MF "$(DEPDIR)/collision-state.Tpo" -c -o collision-state.o `test -f '$(MAINSRCDIR)/util/state.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/state.cc; \
    465 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-state.Tpo" "$(DEPDIR)/collision-state.Po"; else rm -f "$(DEPDIR)/collision-state.Tpo"; exit 1; fi
    466 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/state.cc' object='collision-state.o' libtool=no @AMDEPBACKSLASH@
    467 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    468 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-state.o `test -f '$(MAINSRCDIR)/util/state.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/state.cc
    469 
    470 collision-state.obj: $(MAINSRCDIR)/util/state.cc
    471 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT collision-state.obj -MD -MP -MF "$(DEPDIR)/collision-state.Tpo" -c -o collision-state.obj `if test -f '$(MAINSRCDIR)/util/state.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/state.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/state.cc'; fi`; \
    472 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/collision-state.Tpo" "$(DEPDIR)/collision-state.Po"; else rm -f "$(DEPDIR)/collision-state.Tpo"; exit 1; fi
    473 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/state.cc' object='collision-state.obj' libtool=no @AMDEPBACKSLASH@
    474 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    475 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(collision_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o collision-state.obj `if test -f '$(MAINSRCDIR)/util/state.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/state.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/state.cc'; fi`
    476360
    477361collision-helper_functions.o: $(MAINSRCDIR)/lib/util/helper_functions.cc
  • trunk/src/subprojects/importer/Makefile.am

    r5485 r5546  
    2727                  $(MAINSRCDIR)/lib/coord/null_parent.cc \
    2828                  $(MAINSRCDIR)/util/loading/load_param.cc \
     29                  $(MAINSRCDIR)/util/loading/load_param_description.cc \
    2930                  $(MAINSRCDIR)/lib/util/helper_functions.cc \
    3031                  $(MAINSRCDIR)/lib/util/substring.cc \
  • trunk/src/subprojects/importer/Makefile.in

    r5485 r5546  
    5858        importer-ini_parser.$(OBJEXT) importer-p_node.$(OBJEXT) \
    5959        importer-null_parent.$(OBJEXT) importer-load_param.$(OBJEXT) \
     60        importer-load_param_description.$(OBJEXT) \
    6061        importer-helper_functions.$(OBJEXT) \
    6162        importer-substring.$(OBJEXT) importer-color.$(OBJEXT) \
     
    213214                  $(MAINSRCDIR)/lib/coord/null_parent.cc \
    214215                  $(MAINSRCDIR)/util/loading/load_param.cc \
     216                  $(MAINSRCDIR)/util/loading/load_param_description.cc \
    215217                  $(MAINSRCDIR)/lib/util/helper_functions.cc \
    216218                  $(MAINSRCDIR)/lib/util/substring.cc \
     
    294296@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/importer-ini_parser.Po@am__quote@
    295297@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/importer-load_param.Po@am__quote@
     298@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/importer-load_param_description.Po@am__quote@
    296299@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/importer-null_parent.Po@am__quote@
    297300@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/importer-p_node.Po@am__quote@
     
    482485@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    483486@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(importer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o importer-load_param.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param.cc'; fi`
     487
     488importer-load_param_description.o: $(MAINSRCDIR)/util/loading/load_param_description.cc
     489@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(importer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT importer-load_param_description.o -MD -MP -MF "$(DEPDIR)/importer-load_param_description.Tpo" -c -o importer-load_param_description.o `test -f '$(MAINSRCDIR)/util/loading/load_param_description.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/load_param_description.cc; \
     490@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/importer-load_param_description.Tpo" "$(DEPDIR)/importer-load_param_description.Po"; else rm -f "$(DEPDIR)/importer-load_param_description.Tpo"; exit 1; fi
     491@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/load_param_description.cc' object='importer-load_param_description.o' libtool=no @AMDEPBACKSLASH@
     492@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     493@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(importer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o importer-load_param_description.o `test -f '$(MAINSRCDIR)/util/loading/load_param_description.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/load_param_description.cc
     494
     495importer-load_param_description.obj: $(MAINSRCDIR)/util/loading/load_param_description.cc
     496@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(importer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT importer-load_param_description.obj -MD -MP -MF "$(DEPDIR)/importer-load_param_description.Tpo" -c -o importer-load_param_description.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param_description.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param_description.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param_description.cc'; fi`; \
     497@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/importer-load_param_description.Tpo" "$(DEPDIR)/importer-load_param_description.Po"; else rm -f "$(DEPDIR)/importer-load_param_description.Tpo"; exit 1; fi
     498@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/load_param_description.cc' object='importer-load_param_description.obj' libtool=no @AMDEPBACKSLASH@
     499@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     500@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(importer_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o importer-load_param_description.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param_description.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param_description.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param_description.cc'; fi`
    484501
    485502importer-helper_functions.o: $(MAINSRCDIR)/lib/util/helper_functions.cc
  • trunk/src/subprojects/particles/Makefile.am

    r5485 r5546  
    3636                   $(MAINSRCDIR)/lib/util/substring.cc \
    3737                   $(MAINSRCDIR)/util/loading/load_param.cc \
     38                   $(MAINSRCDIR)/util/loading/load_param_description.cc \
    3839                   $(MAINSRCDIR)/lib/util/helper_functions.cc \
    3940                   $(MAINSRCDIR)/util/loading/factory.cc \
  • trunk/src/subprojects/particles/Makefile.in

    r5485 r5546  
    6262        particles-gui_gtk.$(OBJEXT) particles-substring.$(OBJEXT) \
    6363        particles-load_param.$(OBJEXT) \
     64        particles-load_param_description.$(OBJEXT) \
    6465        particles-helper_functions.$(OBJEXT) \
    6566        particles-factory.$(OBJEXT) particles-color.$(OBJEXT) \
     
    233234                   $(MAINSRCDIR)/lib/util/substring.cc \
    234235                   $(MAINSRCDIR)/util/loading/load_param.cc \
     236                   $(MAINSRCDIR)/util/loading/load_param_description.cc \
    235237                   $(MAINSRCDIR)/lib/util/helper_functions.cc \
    236238                   $(MAINSRCDIR)/util/loading/factory.cc \
     
    316318@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-light.Po@am__quote@
    317319@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-load_param.Po@am__quote@
     320@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-load_param_description.Po@am__quote@
    318321@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-null_parent.Po@am__quote@
    319322@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/particles-p_node.Po@am__quote@
     
    562565@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    563566@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particles-load_param.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param.cc'; fi`
     567
     568particles-load_param_description.o: $(MAINSRCDIR)/util/loading/load_param_description.cc
     569@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particles-load_param_description.o -MD -MP -MF "$(DEPDIR)/particles-load_param_description.Tpo" -c -o particles-load_param_description.o `test -f '$(MAINSRCDIR)/util/loading/load_param_description.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/load_param_description.cc; \
     570@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/particles-load_param_description.Tpo" "$(DEPDIR)/particles-load_param_description.Po"; else rm -f "$(DEPDIR)/particles-load_param_description.Tpo"; exit 1; fi
     571@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/load_param_description.cc' object='particles-load_param_description.o' libtool=no @AMDEPBACKSLASH@
     572@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     573@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particles-load_param_description.o `test -f '$(MAINSRCDIR)/util/loading/load_param_description.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/loading/load_param_description.cc
     574
     575particles-load_param_description.obj: $(MAINSRCDIR)/util/loading/load_param_description.cc
     576@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT particles-load_param_description.obj -MD -MP -MF "$(DEPDIR)/particles-load_param_description.Tpo" -c -o particles-load_param_description.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param_description.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param_description.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param_description.cc'; fi`; \
     577@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/particles-load_param_description.Tpo" "$(DEPDIR)/particles-load_param_description.Po"; else rm -f "$(DEPDIR)/particles-load_param_description.Tpo"; exit 1; fi
     578@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/loading/load_param_description.cc' object='particles-load_param_description.obj' libtool=no @AMDEPBACKSLASH@
     579@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     580@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(particles_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o particles-load_param_description.obj `if test -f '$(MAINSRCDIR)/util/loading/load_param_description.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/loading/load_param_description.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/loading/load_param_description.cc'; fi`
    564581
    565582particles-helper_functions.o: $(MAINSRCDIR)/lib/util/helper_functions.cc
  • trunk/src/util/Makefile.am

    r5479 r5546  
    55
    66libORXutils_a_SOURCES = fast_factory.cc \
     7                        loading/factory.cc \
    78                        garbage_collector.cc \
    89                        state.cc \
     
    1213                        animation/animation_player.cc \
    1314                        loading/resource_manager.cc \
    14                         loading/factory.cc \
    1515                        loading/game_loader.cc \
    1616                        loading/load_param.cc \
     17                        loading/load_param_description.cc \
    1718                        track/pilot_node.cc \
    1819                        track/track_manager.cc \
     
    3132                        loading/game_loader.h \
    3233                        loading/load_param.h \
     34                        loading/load_param_description.h \
    3335                        track/pilot_node.h \
    3436                        track/track_manager.h \
  • trunk/src/util/Makefile.in

    r5479 r5546  
    5454libORXutils_a_AR = $(AR) $(ARFLAGS)
    5555libORXutils_a_LIBADD =
    56 am_libORXutils_a_OBJECTS = fast_factory.$(OBJEXT) \
     56am_libORXutils_a_OBJECTS = fast_factory.$(OBJEXT) factory.$(OBJEXT) \
    5757        garbage_collector.$(OBJEXT) state.$(OBJEXT) \
    5858        user_control.$(OBJEXT) animation3d.$(OBJEXT) \
    5959        animation.$(OBJEXT) animation_player.$(OBJEXT) \
    60         resource_manager.$(OBJEXT) factory.$(OBJEXT) \
    61         game_loader.$(OBJEXT) load_param.$(OBJEXT) \
     60        resource_manager.$(OBJEXT) game_loader.$(OBJEXT) \
     61        load_param.$(OBJEXT) load_param_description.$(OBJEXT) \
    6262        pilot_node.$(OBJEXT) track_manager.$(OBJEXT) \
    6363        track_node.$(OBJEXT)
     
    190190noinst_LIBRARIES = libORXutils.a
    191191libORXutils_a_SOURCES = fast_factory.cc \
     192                        loading/factory.cc \
    192193                        garbage_collector.cc \
    193194                        state.cc \
     
    197198                        animation/animation_player.cc \
    198199                        loading/resource_manager.cc \
    199                         loading/factory.cc \
    200200                        loading/game_loader.cc \
    201201                        loading/load_param.cc \
     202                        loading/load_param_description.cc \
    202203                        track/pilot_node.cc \
    203204                        track/track_manager.cc \
     
    216217                        loading/game_loader.h \
    217218                        loading/load_param.h \
     219                        loading/load_param_description.h \
    218220                        track/pilot_node.h \
    219221                        track/track_manager.h \
     
    275277@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/garbage_collector.Po@am__quote@
    276278@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_param.Po@am__quote@
     279@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_param_description.Po@am__quote@
    277280@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pilot_node.Po@am__quote@
    278281@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
     
    296299@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    297300
     301factory.o: loading/factory.cc
     302@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT factory.o -MD -MP -MF "$(DEPDIR)/factory.Tpo" -c -o factory.o `test -f 'loading/factory.cc' || echo '$(srcdir)/'`loading/factory.cc; \
     303@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/factory.Tpo" "$(DEPDIR)/factory.Po"; else rm -f "$(DEPDIR)/factory.Tpo"; exit 1; fi
     304@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='loading/factory.cc' object='factory.o' libtool=no @AMDEPBACKSLASH@
     305@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     306@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o factory.o `test -f 'loading/factory.cc' || echo '$(srcdir)/'`loading/factory.cc
     307
     308factory.obj: loading/factory.cc
     309@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT factory.obj -MD -MP -MF "$(DEPDIR)/factory.Tpo" -c -o factory.obj `if test -f 'loading/factory.cc'; then $(CYGPATH_W) 'loading/factory.cc'; else $(CYGPATH_W) '$(srcdir)/loading/factory.cc'; fi`; \
     310@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/factory.Tpo" "$(DEPDIR)/factory.Po"; else rm -f "$(DEPDIR)/factory.Tpo"; exit 1; fi
     311@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='loading/factory.cc' object='factory.obj' libtool=no @AMDEPBACKSLASH@
     312@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     313@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o factory.obj `if test -f 'loading/factory.cc'; then $(CYGPATH_W) 'loading/factory.cc'; else $(CYGPATH_W) '$(srcdir)/loading/factory.cc'; fi`
     314
    298315animation3d.o: animation/animation3d.cc
    299316@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT animation3d.o -MD -MP -MF "$(DEPDIR)/animation3d.Tpo" -c -o animation3d.o `test -f 'animation/animation3d.cc' || echo '$(srcdir)/'`animation/animation3d.cc; \
     
    352369@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.obj `if test -f 'loading/resource_manager.cc'; then $(CYGPATH_W) 'loading/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/loading/resource_manager.cc'; fi`
    353370
    354 factory.o: loading/factory.cc
    355 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT factory.o -MD -MP -MF "$(DEPDIR)/factory.Tpo" -c -o factory.o `test -f 'loading/factory.cc' || echo '$(srcdir)/'`loading/factory.cc; \
    356 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/factory.Tpo" "$(DEPDIR)/factory.Po"; else rm -f "$(DEPDIR)/factory.Tpo"; exit 1; fi
    357 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='loading/factory.cc' object='factory.o' libtool=no @AMDEPBACKSLASH@
    358 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    359 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o factory.o `test -f 'loading/factory.cc' || echo '$(srcdir)/'`loading/factory.cc
    360 
    361 factory.obj: loading/factory.cc
    362 @am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT factory.obj -MD -MP -MF "$(DEPDIR)/factory.Tpo" -c -o factory.obj `if test -f 'loading/factory.cc'; then $(CYGPATH_W) 'loading/factory.cc'; else $(CYGPATH_W) '$(srcdir)/loading/factory.cc'; fi`; \
    363 @am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/factory.Tpo" "$(DEPDIR)/factory.Po"; else rm -f "$(DEPDIR)/factory.Tpo"; exit 1; fi
    364 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='loading/factory.cc' object='factory.obj' libtool=no @AMDEPBACKSLASH@
    365 @AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    366 @am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o factory.obj `if test -f 'loading/factory.cc'; then $(CYGPATH_W) 'loading/factory.cc'; else $(CYGPATH_W) '$(srcdir)/loading/factory.cc'; fi`
    367 
    368371game_loader.o: loading/game_loader.cc
    369372@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT game_loader.o -MD -MP -MF "$(DEPDIR)/game_loader.Tpo" -c -o game_loader.o `test -f 'loading/game_loader.cc' || echo '$(srcdir)/'`loading/game_loader.cc; \
     
    393396@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    394397@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o load_param.obj `if test -f 'loading/load_param.cc'; then $(CYGPATH_W) 'loading/load_param.cc'; else $(CYGPATH_W) '$(srcdir)/loading/load_param.cc'; fi`
     398
     399load_param_description.o: loading/load_param_description.cc
     400@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT load_param_description.o -MD -MP -MF "$(DEPDIR)/load_param_description.Tpo" -c -o load_param_description.o `test -f 'loading/load_param_description.cc' || echo '$(srcdir)/'`loading/load_param_description.cc; \
     401@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/load_param_description.Tpo" "$(DEPDIR)/load_param_description.Po"; else rm -f "$(DEPDIR)/load_param_description.Tpo"; exit 1; fi
     402@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='loading/load_param_description.cc' object='load_param_description.o' libtool=no @AMDEPBACKSLASH@
     403@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     404@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o load_param_description.o `test -f 'loading/load_param_description.cc' || echo '$(srcdir)/'`loading/load_param_description.cc
     405
     406load_param_description.obj: loading/load_param_description.cc
     407@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT load_param_description.obj -MD -MP -MF "$(DEPDIR)/load_param_description.Tpo" -c -o load_param_description.obj `if test -f 'loading/load_param_description.cc'; then $(CYGPATH_W) 'loading/load_param_description.cc'; else $(CYGPATH_W) '$(srcdir)/loading/load_param_description.cc'; fi`; \
     408@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/load_param_description.Tpo" "$(DEPDIR)/load_param_description.Po"; else rm -f "$(DEPDIR)/load_param_description.Tpo"; exit 1; fi
     409@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='loading/load_param_description.cc' object='load_param_description.obj' libtool=no @AMDEPBACKSLASH@
     410@AMDEP_TRUE@@am__fastdepCXX_FALSE@      DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     411@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o load_param_description.obj `if test -f 'loading/load_param_description.cc'; then $(CYGPATH_W) 'loading/load_param_description.cc'; else $(CYGPATH_W) '$(srcdir)/loading/load_param_description.cc'; fi`
    395412
    396413pilot_node.o: track/pilot_node.cc
  • trunk/src/util/loading/load_param.cc

    r5545 r5546  
    1717
    1818#include "load_param.h"
     19#include "load_param_description.h"
    1920
    2021#include "list.h"
     
    119120}
    120121
    121 /**
    122  * @param paramName the name of the parameter to load
    123 */
    124 LoadParamDescription::LoadParamDescription(const char* paramName)
    125 {
    126   this->types = NULL;
    127   this->description = NULL;
    128   this->defaultValues = NULL;
    129   this->paramName = new char[strlen(paramName)+1];
    130   strcpy(this->paramName, paramName);
    131 }
    132 
    133 /**
    134  *  removes all the alocated memory
    135 */
    136 LoadParamDescription::~LoadParamDescription()
    137 {
    138   if (this->defaultValues != NULL)
    139   {
    140     for(int i = 0; i < this->paramCount; i++)
    141     {
    142       delete[] this->defaultValues[i];
    143     }
    144   }
    145 
    146   delete[] this->types;
    147   delete[] this->defaultValues;
    148   delete[] this->paramName;
    149   delete[] this->description;
    150 }
    151 
    152 /**
    153  * @param descriptionText The text to set as a description for this Parameter
    154 */
    155 void LoadParamDescription::setDescription(const char* descriptionText)
    156 {
    157   this->description = new char[strlen(descriptionText)+1];
    158   strcpy(this->description, descriptionText);
    159 }
    160 
    161 /**
    162  *  prints out this parameter, its input method and the description (if availiable)
    163 */
    164 void LoadParamDescription::print() const
    165 {
    166   PRINT(3)(" <%s>", this->paramName);
    167   for (int i = 0; i < this->paramCount; i++)
    168     {
    169       if (i > 0)
    170         PRINT(3)(",");
    171       switch (this->types[i])
    172       {
    173         default:
    174           PRINTF(3)("none");
    175           break;
    176         case ParameterBool:
    177           PRINT(3)("bool");
    178           break;
    179         case ParameterChar:
    180           PRINT(3)("char");
    181           break;
    182         case ParameterString:
    183           PRINT(3)("string");
    184           break;
    185         case ParameterInt:
    186           PRINT(3)("int");
    187           break;
    188         case ParameterUInt:
    189           PRINT(3)("Uint");
    190           break;
    191         case ParameterFloat:
    192           PRINT(3)("float");
    193           break;
    194         case ParameterLong:
    195           PRINT(3)("long");
    196           break;
    197         case ParameterXML:
    198           PRINT(3)("XML");
    199           break;
    200       }
    201     }
    202   PRINT(3)("</%s>", this->paramName);
    203   if (this->description)
    204     PRINT(3)(" -- %s", this->description);
    205   // default values
    206   if (this->paramCount > 0)
    207   {
    208     PRINT(3)(" (Default: ");
    209     for (int i = 0; i < this->paramCount; i++)
    210     {
    211       if (i > 0)
    212         PRINT(3)(", ");
    213       if (this->types[i] & ParameterString)
    214       { // leave brackets !!
    215         PRINT(3)("\"%s\"", this->defaultValues[i]);
    216       }
    217       else
    218       {
    219         PRINT(3)("%s", this->defaultValues[i]);
    220       }
    221     }
    222     PRINT(3)(")");
    223   }
    224   PRINT(3)("\n");
    225 }
    226 
    227 /**
    228  *  A list, that holds all the classes that are loadable (classes not objects!!)
    229 */
    230 tList<LoadClassDescription>* LoadClassDescription::classList = NULL;
    231 
    232 /**
    233  *  if the description of Parameters should be executed
    234 */
    235 bool LoadClassDescription::parametersDescription = false;
    236 
    237 /**
    238  * @param className the name of the class to be loadable
    239 */
    240 LoadClassDescription::LoadClassDescription(const char* className)
    241 {
    242   this->className = new char[strlen(className)+1];
    243   strcpy(this->className, className);
    244 
    245   if (LoadClassDescription::classList == NULL)
    246     LoadClassDescription::classList = new tList<LoadClassDescription>;
    247 
    248   LoadClassDescription::classList->add(this);
    249 
    250   this->paramList = new tList<LoadParamDescription>;
    251 }
    252 
    253 /**
    254  *  deletes a classDescription (deletes all the parameterDescriptions as well
    255 */
    256 LoadClassDescription::~LoadClassDescription()
    257 {
    258   tIterator<LoadParamDescription>* iterator = this->paramList->getIterator();
    259   LoadParamDescription* enumParamDesc = iterator->firstElement();
    260   while (enumParamDesc)
    261     {
    262       delete enumParamDesc;
    263       enumParamDesc = iterator->nextElement();
    264     }
    265   delete iterator;
    266   delete this->paramList;
    267 
    268   delete[] this->className;
    269 }
    270 
    271 void LoadClassDescription::deleteAllDescriptions()
    272 {
    273   if (LoadClassDescription::classList != NULL)
    274   {
    275     tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    276     LoadClassDescription* delElem = iterator->firstElement();
    277     while (delElem != NULL)
    278     {
    279       delete delElem;
    280       delElem = iterator->nextElement();
    281     }
    282     delete iterator;
    283     delete LoadClassDescription::classList;
    284   }
    285   LoadClassDescription::classList = NULL;
    286 }
    287 
    288 
    289 /**
    290  *  adds a class to the list of loadable classes
    291  * @param className The name of the class to add
    292 
    293    this function searches for the className string, and if found just returns the appropriate Class.
    294    Otherwise it returns a new classDescription
    295 */
    296 LoadClassDescription* LoadClassDescription::addClass(const char* className)
    297 {
    298   if (LoadClassDescription::classList != NULL)
    299   {
    300     tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    301    LoadClassDescription* enumClassDesc = iterator->firstElement();
    302    while (enumClassDesc)
    303      {
    304        if (!strcmp(enumClassDesc->className, className))
    305          {
    306            delete iterator;
    307            return enumClassDesc;
    308          }
    309        enumClassDesc = iterator->nextElement();
    310      }
    311    delete iterator;
    312   }
    313   return new LoadClassDescription(className);
    314 }
    315 
    316 /**
    317  *  does the same as addClass(const char* className), but with params
    318  * @param paramName the name of the parameter to add.
    319 */
    320 LoadParamDescription* LoadClassDescription::addParam(const char* paramName)
    321 {
    322   tIterator<LoadParamDescription>* iterator = this->paramList->getIterator();
    323   LoadParamDescription* enumParamDesc = iterator->firstElement();
    324   while (enumParamDesc)
    325     {
    326       if (!strcmp(enumParamDesc->paramName, paramName))
    327         {
    328           delete iterator;
    329           //return enumParamDesc;
    330           return NULL;
    331         }
    332       enumParamDesc = iterator->nextElement();
    333     }
    334   delete iterator;
    335 
    336   LoadParamDescription* newParam = new LoadParamDescription(paramName);
    337 
    338   this->paramList->add(newParam);
    339   return newParam;
    340 }
    341 
    342 /**
    343  *  prints out all loadable Classes, and their parameters
    344  * @param fileName prints the output to a File
    345  * @todo implement it
    346 */
    347 void LoadClassDescription::printAll(const char* fileName)
    348 {
    349   PRINT(3)("===============================================================\n");
    350   PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n");
    351   if (LoadClassDescription::classList != NULL)
    352   {
    353     tIterator<LoadClassDescription>* classIT = LoadClassDescription::classList->getIterator();
    354     LoadClassDescription* enumClassDesc = classIT->firstElement();
    355     while (enumClassDesc)
    356      {
    357        PRINT(3)("<%s>\n", enumClassDesc->className);
    358        tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator();
    359        LoadParamDescription* enumParamDesc = paramIT->firstElement();
    360        while (enumParamDesc)
    361          {
    362            enumParamDesc->print();
    363            enumParamDesc = paramIT->nextElement();
    364          }
    365        delete paramIT;
    366 
    367        PRINT(3)("</%s>\n\n", enumClassDesc->className);
    368        enumClassDesc = classIT->nextElement();
    369      }
    370     delete classIT;
    371   }
    372   else
    373     PRINT(3)("no Classes defined so far\n");
    374   PRINT(3)("===============================================================\n");
    375 }
    376 
    377 /**
    378  * searches for classes, which beginn with classNameBegin
    379  * @param classNameBegin the beginning string of a Class
    380  * @return a NEW char-array with ClassNames. The LIST should be deleted afterwards,
    381  * !! The strings MUST NOT be deleted !!
    382  */
    383 tList<const char>* LoadClassDescription::searchClassWithShort(const char* classNameBegin)
    384 {
    385   unsigned int searchLength = strlen(classNameBegin);
    386   tList<const char>* retVal = new tList<const char>;
    387 
    388   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    389   LoadClassDescription* enumClassDesc = iterator->firstElement();
    390   while (enumClassDesc)
    391   {
    392     if (strlen(enumClassDesc->className)>searchLength+1 &&
    393         !strncasecmp(enumClassDesc->className, classNameBegin, searchLength))
    394     {
    395       retVal->add(enumClassDesc->className);
    396     }
    397     enumClassDesc = iterator->nextElement();
    398   }
    399   delete iterator;
    400 
    401   return retVal;
    402 }
    403 
    404122// const LoadParamDescription* LoadParamDescription::getClass(const char* className)
    405123// {
  • trunk/src/util/loading/load_param.h

    r5545 r5546  
    3333// Forward Declaration //
    3434template<class T> class tList;
    35 
    36 /************************
    37 *** DESCRIPTION STUFF ***
    38 ************************/
    39 //! A class that handles the description of loadable parameters
    40 class LoadParamDescription
    41 {
    42   friend class LoadParamBase;
    43   friend class LoadClassDescription;
    44  public:
    45   LoadParamDescription(const char* paramName);
    46   ~LoadParamDescription();
    47 
    48   void setDescription(const char* descriptionText);
    49   /** @returns the descriptionString */
    50   const char* getDescription() { return this->description; };
    51 
    52   void print() const;
    53  private:
    54   char*         paramName;             //!< The name of the parameter.
    55   int           paramCount;            //!< The count of parameters.
    56   int*          types;                 //!< What kind of parameters does this function take ??
    57   char*         description;           //!< A longer description about this function.
    58   char**        defaultValues;         //!< The 'Default Values'.
    59 };
    60 
    61 //! A class for descriptions of a loadable module
    62 class LoadClassDescription
    63 {
    64   friend class LoadParamBase;
    65  public:
    66   LoadClassDescription(const char* className);
    67   ~LoadClassDescription();
    68 
    69   static LoadClassDescription* addClass(const char* className);
    70   LoadParamDescription* addParam(const char* paramName);
    71 
    72   static void deleteAllDescriptions();
    73 
    74   static void printAll(const char* fileName = NULL);
    75   static tList<const char>* searchClassWithShort(const char* classNameBegin);
    76 //  static const LoadParamDescription* getClass(const char* className);
    77 
    78  private:
    79   static bool                          parametersDescription;  //!< if parameter-description should be enabled.
    80   static tList<LoadClassDescription>*  classList;              //!< a list, that holds all the loadable classes. (after one instance has been loaded)
    81   char*                                className;              //!< name of the class
    82   tList<LoadParamDescription>*         paramList;              //!< List of parameters this class knows.
    83 };
    84 
     35class LoadClassDescription;
     36class LoadParamDescription;
    8537
    8638/**************************
  • trunk/src/util/loading/load_param_description.cc

    r5545 r5546  
    1616#include "functor_list.h"
    1717
    18 #include "load_param.h"
    19 
     18#include "load_param_description.h"
    2019#include "list.h"
    2120#include "base_object.h"
    22 
    2321#include <stdarg.h>
    2422
    25 /**
    26  * @param object The object this Parameter is loaded too.
    27  * @param root: the XML-element to load this option from.
    28  * @param paramName: The name of the parameter loaded.
    29  * @param paramCount: how many parameters this loading-function takes
    30  * @param multi: if false LoadParam assumes only one occurence of this parameter in root, if true it assumes multiple occurences.
    31  * @param ...: the parameter information (1. Parameter, 2. Default Value for the Parameter, ...)
    32 */
    33 LoadParamBase::LoadParamBase(const TiXmlElement* root, BaseObject* object, const char* paramName,
    34                              int paramCount, bool multi, const void* pointerToParam, ...)
    35 {
    36   this->setClassID(CL_LOAD_PARAM, "LoadParam");
    37 
    38   this->loadString = NULL;
    39   this->pointerToParam = pointerToParam;
    40 
    41   if (paramCount == 0 || this->pointerToParam)
    42     this->loadString = "none";
    43   else
    44     {
    45       if (likely(!multi))
    46         this->loadString = grabParameter(root, paramName);
    47       else
    48         {
    49           if (!strcmp(root->Value(), paramName))
    50             {
    51               const TiXmlNode* val = root->FirstChild();
    52               if( val->ToText())
    53                 this->loadString = val->Value();
    54             }
    55         }
    56     }
    57 
    58   this->paramDesc = NULL;
    59   if (LoadClassDescription::parametersDescription)
    60   {
    61     // locating the class
    62     this->classDesc = LoadClassDescription::addClass(object->getClassName());
    63 
    64     if ((this->paramDesc = this->classDesc->addParam(paramName)) != NULL)
    65     {
    66 
    67       this->paramDesc->paramCount = paramCount;
    68       this->paramDesc->types = new int[paramCount];
    69       this->paramDesc->defaultValues = new char*[paramCount];
    70 
    71       va_list types;
    72       va_start (types, pointerToParam);
    73       char defaultVal[512];
    74       for(int i = 0; i < paramCount; i++)
    75       {
    76         defaultVal[0] = '\0';
    77           // parameters parsed
    78         int tmpType = va_arg (types, int);
    79         this->paramDesc->types[i] = tmpType;
    80         switch (tmpType)
    81         {
    82           case ParameterInt:
    83             sprintf(defaultVal, "%d", va_arg(types, int));
    84             break;
    85           case ParameterLong:
    86             sprintf(defaultVal, "%0.3f", va_arg(types, l_LONG_TYPE));
    87             break;
    88           case ParameterFloat:
    89             sprintf(defaultVal, "%0.3f", va_arg(types, double));
    90             break;
    91           case ParameterString:
    92             sprintf(defaultVal, "%s", va_arg(types, l_STRING_TYPE));
    93             break;
    94           case ParameterXML:
    95             sprintf(defaultVal, "");
    96             break;
    97         }
    98         this->paramDesc->defaultValues[i] = new char[strlen(defaultVal)+1];
    99         strcpy(this->paramDesc->defaultValues[i], defaultVal);
    100       }
    101       va_end(types);
    102 
    103       int argCount = 0;
    104     }
    105   }
    106 }
    107 
    108 /**
    109  * @param descriptionText The text to set as a description for this Parameter
    110  * @returns a pointer to itself.
    111 */
    112 LoadParamBase* LoadParamBase::describe(const char* descriptionText)
    113 {
    114   if (LoadClassDescription::parametersDescription && this->paramDesc && !this->paramDesc->getDescription())
    115     {
    116       this->paramDesc->setDescription(descriptionText);
    117     }
    118   return this;
    119 }
    12023
    12124/**
    12225 * @param paramName the name of the parameter to load
    123 */
     26 */
    12427LoadParamDescription::LoadParamDescription(const char* paramName)
    12528{
     
    13336/**
    13437 *  removes all the alocated memory
    135 */
     38 */
    13639LoadParamDescription::~LoadParamDescription()
    13740{
     
    15255/**
    15356 * @param descriptionText The text to set as a description for this Parameter
    154 */
     57 */
    15558void LoadParamDescription::setDescription(const char* descriptionText)
    15659{
     
    16164/**
    16265 *  prints out this parameter, its input method and the description (if availiable)
    163 */
     66 */
    16467void LoadParamDescription::print() const
    16568{
    16669  PRINT(3)(" <%s>", this->paramName);
    16770  for (int i = 0; i < this->paramCount; i++)
    168     {
    169       if (i > 0)
    170         PRINT(3)(",");
    171       switch (this->types[i])
    172       {
    173         default:
    174           PRINTF(3)("none");
    175           break;
    176         case ParameterBool:
    177           PRINT(3)("bool");
    178           break;
    179         case ParameterChar:
    180           PRINT(3)("char");
    181           break;
    182         case ParameterString:
    183           PRINT(3)("string");
    184           break;
    185         case ParameterInt:
    186           PRINT(3)("int");
    187           break;
    188         case ParameterUInt:
    189           PRINT(3)("Uint");
    190           break;
    191         case ParameterFloat:
    192           PRINT(3)("float");
    193           break;
    194         case ParameterLong:
    195           PRINT(3)("long");
    196           break;
    197         case ParameterXML:
    198           PRINT(3)("XML");
    199           break;
    200       }
    201     }
     71  {
     72    if (i > 0)
     73      PRINT(3)(",");
     74    switch (this->types[i])
     75    {
     76      default:
     77        PRINTF(3)("none");
     78        break;
     79      case ParameterBool:
     80        PRINT(3)("bool");
     81        break;
     82      case ParameterChar:
     83        PRINT(3)("char");
     84        break;
     85      case ParameterString:
     86        PRINT(3)("string");
     87        break;
     88      case ParameterInt:
     89        PRINT(3)("int");
     90        break;
     91      case ParameterUInt:
     92        PRINT(3)("Uint");
     93        break;
     94      case ParameterFloat:
     95        PRINT(3)("float");
     96        break;
     97      case ParameterLong:
     98        PRINT(3)("long");
     99        break;
     100      case ParameterXML:
     101        PRINT(3)("XML");
     102        break;
     103    }
     104  }
    202105  PRINT(3)("</%s>", this->paramName);
    203106  if (this->description)
     
    227130/**
    228131 *  A list, that holds all the classes that are loadable (classes not objects!!)
    229 */
     132 */
    230133tList<LoadClassDescription>* LoadClassDescription::classList = NULL;
    231134
    232135/**
    233136 *  if the description of Parameters should be executed
    234 */
     137 */
    235138bool LoadClassDescription::parametersDescription = false;
    236139
    237140/**
    238141 * @param className the name of the class to be loadable
    239 */
     142 */
    240143LoadClassDescription::LoadClassDescription(const char* className)
    241144{
     
    253156/**
    254157 *  deletes a classDescription (deletes all the parameterDescriptions as well
    255 */
     158 */
    256159LoadClassDescription::~LoadClassDescription()
    257160{
     
    259162  LoadParamDescription* enumParamDesc = iterator->firstElement();
    260163  while (enumParamDesc)
    261     {
    262       delete enumParamDesc;
    263       enumParamDesc = iterator->nextElement();
    264     }
     164  {
     165    delete enumParamDesc;
     166    enumParamDesc = iterator->nextElement();
     167  }
    265168  delete iterator;
    266169  delete this->paramList;
     
    293196   this function searches for the className string, and if found just returns the appropriate Class.
    294197   Otherwise it returns a new classDescription
    295 */
     198 */
    296199LoadClassDescription* LoadClassDescription::addClass(const char* className)
    297200{
     
    299202  {
    300203    tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    301    LoadClassDescription* enumClassDesc = iterator->firstElement();
    302    while (enumClassDesc)
    303      {
    304        if (!strcmp(enumClassDesc->className, className))
    305          {
    306            delete iterator;
    307            return enumClassDesc;
    308          }
    309        enumClassDesc = iterator->nextElement();
    310      }
    311    delete iterator;
     204    LoadClassDescription* enumClassDesc = iterator->firstElement();
     205    while (enumClassDesc)
     206    {
     207      if (!strcmp(enumClassDesc->className, className))
     208      {
     209        delete iterator;
     210        return enumClassDesc;
     211      }
     212      enumClassDesc = iterator->nextElement();
     213    }
     214    delete iterator;
    312215  }
    313216  return new LoadClassDescription(className);
     
    317220 *  does the same as addClass(const char* className), but with params
    318221 * @param paramName the name of the parameter to add.
    319 */
     222 */
    320223LoadParamDescription* LoadClassDescription::addParam(const char* paramName)
    321224{
     
    323226  LoadParamDescription* enumParamDesc = iterator->firstElement();
    324227  while (enumParamDesc)
    325     {
    326       if (!strcmp(enumParamDesc->paramName, paramName))
    327         {
    328           delete iterator;
     228  {
     229    if (!strcmp(enumParamDesc->paramName, paramName))
     230    {
     231      delete iterator;
    329232          //return enumParamDesc;
    330           return NULL;
    331         }
    332       enumParamDesc = iterator->nextElement();
    333     }
     233      return NULL;
     234    }
     235    enumParamDesc = iterator->nextElement();
     236  }
    334237  delete iterator;
    335238
     
    344247 * @param fileName prints the output to a File
    345248 * @todo implement it
    346 */
     249 */
    347250void LoadClassDescription::printAll(const char* fileName)
    348251{
     
    354257    LoadClassDescription* enumClassDesc = classIT->firstElement();
    355258    while (enumClassDesc)
    356      {
    357        PRINT(3)("<%s>\n", enumClassDesc->className);
    358        tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator();
    359        LoadParamDescription* enumParamDesc = paramIT->firstElement();
    360        while (enumParamDesc)
    361          {
    362            enumParamDesc->print();
    363            enumParamDesc = paramIT->nextElement();
    364          }
    365        delete paramIT;
    366 
    367        PRINT(3)("</%s>\n\n", enumClassDesc->className);
    368        enumClassDesc = classIT->nextElement();
    369      }
     259    {
     260      PRINT(3)("<%s>\n", enumClassDesc->className);
     261      tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator();
     262      LoadParamDescription* enumParamDesc = paramIT->firstElement();
     263      while (enumParamDesc)
     264      {
     265        enumParamDesc->print();
     266        enumParamDesc = paramIT->nextElement();
     267      }
     268      delete paramIT;
     269
     270      PRINT(3)("</%s>\n\n", enumClassDesc->className);
     271      enumClassDesc = classIT->nextElement();
     272    }
    370273    delete classIT;
    371274  }
     
    401304  return retVal;
    402305}
    403 
    404 // const LoadParamDescription* LoadParamDescription::getClass(const char* className)
    405 // {
    406 //   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
    407 //   LoadClassDescription* enumClassDesc = iterator->firstElement();
    408 //   while (enumClassDesc)
    409 //   {
    410 //     if (!strcmp(enumClassDesc->className, classNameBegin, className))
    411 //     {
    412 //       delete iterator;
    413 //       return enumClassDesc;
    414 //     }
    415 //     enumClassDesc = iterator->nextElement();
    416 //   }
    417 //   delete iterator;
    418 //
    419 //   return NULL;
    420 // }
    421 
    422 /**
    423  * @param root: The XML-element to grab a parameter from
    424  * @param parameterName: the parameter to grab
    425  * @returns the Value of the parameter if found, NULL otherwise
    426 */
    427 const char* grabParameter(const TiXmlElement* root, const char* parameterName)
    428 {
    429   const TiXmlElement* element;
    430   const TiXmlNode* node;
    431 
    432   if (root == NULL)
    433     return NULL;
    434   assert( parameterName != NULL);
    435 
    436   element = root->FirstChildElement( parameterName);
    437   if( element == NULL) return NULL;
    438 
    439   node = element->FirstChild();
    440   while( node != NULL)
    441     {
    442       if( node->ToText()) return node->Value();
    443       node = node->NextSibling();
    444     }
    445   return NULL;
    446 }
  • trunk/src/util/loading/load_param_description.h

    r5545 r5546  
    1919 */
    2020
    21 #ifndef _LOAD_PARAM_H
    22 #define _LOAD_PARAM_H
     21#ifndef _LOAD_PARAM_DESCRIPTION_H
     22#define _LOAD_PARAM_DESCRIPTION_H
    2323
    2424#include "functor_list.h"
     
    8383};
    8484
    85 
    86 /**************************
    87 **** REAL DECLARATIONS ****
    88 **************************/
    89 //! abstract Base class for a Loadable parameter
    90 class LoadParamBase : public BaseObject
    91 {
    92  public:
    93   LoadParamBase* describe(const char* descriptionText);
    94 
    95  protected:
    96   LoadParamBase(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, bool multi, const void* pointerToParam, ...);
    97 
    98  protected:
    99   LoadClassDescription*    classDesc;            //!< The LoadClassDescription of this LoadParameter
    100   LoadParamDescription*    paramDesc;            //!< The LoadParameterDescription of this LoadParameter
    101   const char*              loadString;           //!< The string loaded by this LoadParam
    102   const void*              pointerToParam;       //!< A Pointer to a Parameter.
    103 };
    104 
    105 
    106 //! macro that makes it even more easy to load a Parameter
    107 /**
    108  * @param className the name of the class to load
    109  * @param parameterName the name of the parameter to load as written in the XML-file
    110  * @param function the function to call
    111  */
    112 #define LOAD_PARAM(className, parameterName, paramFunction) \
    113         LoadParam<className>(root, #parameterName, this, &className::paramFunction)
    114 
    115 /**
    116  * this Starts a Cycle in the Loading Process
    117  * be aware, that in the cycle the first parameter of load_param should because
    118  * called element, and that you must say true at the Fith parameter, or it will fail
    119  * also you will have to close the Cycle again with LOAD_PARAM_END_CYCLE
    120  */
    121 #define LOAD_PARAM_START_CYCLE   const TiXmlElement* element; \
    122                                  element = root->FirstChildElement(); \
    123                                  while( element != NULL) \
    124 {
    125 /**
    126    * closes a LoadParam Loop
    127    * @see LOAD_PARAM_START_CYCLE
    128  */
    129 #define LOAD_PARAM_END_CYCLE        element = element->NextSiblingElement(); \
    130 }
    131 
    132 
    133 /*****************************************
    134 **** MACROS DEFINITIONS OF LOADABLES *****
    135 *****************************************/
    136 // 0. TYPES
    137 /**
    138  * a Macro to easily implement many different Constructors for the LoadParam-Class with no argument
    139  */
    140 #define LoadParam0() \
    141 LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(), bool multi = false) \
    142   : LoadParamBase(root, pt2Object, paramName, 0, multi, NULL, "") \
    143 { \
    144   if (loadString != NULL && root != NULL) \
    145     (*pt2Object.*function)(); \
    146   else \
    147     PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName());\
    148 }
    149 
    150 // 1. TYPE
    151 /**
    152  * a Macro to easily implement many different Constructors for the LoadParam-Class with 1 argument
    153  * @param type1 The type of the first functionParameter
    154  */
    155 #define LoadParam1(type1) \
    156  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE), \
    157            bool multi = false, type1##_TYPE default1 = type1##_DEFAULT) \
    158   : LoadParamBase(root, pt2Object, paramName, 1, multi, NULL, type1##_PARAM, default1) \
    159 { \
    160       if (loadString != NULL && root != NULL) \
    161         (*pt2Object.*function)(type1##_FUNC(loadString, default1)); \
    162       else \
    163         PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
    164 }
    165 
    166 // 2. TYPES
    167 /**
    168  * a Macro to easily implement many different Constructors for the LoadParam-Class with 2 arguments
    169  * @param type1 The type of the first functionParameter
    170  * @param type2 The type of the second functionParameter
    171  *
    172  * @TODO DEFAULT VALUES HACK
    173  */
    174 #define LoadParam2(type1, type2) \
    175  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE), \
    176            bool multi = false,  type1##_TYPE default1 = type1##_DEFAULT,  type2##_TYPE default2 = type2##_DEFAULT) \
    177   : LoadParamBase(root, pt2Object, paramName, 2, multi, NULL, type1##_PARAM, default1, type2##_PARAM, default2) \
    178 { \
    179       if (loadString != NULL && root != NULL) \
    180 { \
    181           SubString subLoads(loadString); \
    182           if (subLoads.getCount() >= 1) \
    183             (*pt2Object.*function)(type1##_FUNC(subLoads.getString(0), default1), type2##_FUNC(subLoads.getString(1), default2)); \
    184           else \
    185             PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", \
    186                       paramName, pt2Object->getClassName(), 2, subLoads.getCount()); \
    187 } \
    188       else \
    189         PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
    190 }
    191 
    192 
    193 // 3. TYPES
    194 /**
    195  * a Macro to easily implement many different Constructors for the LoadParam-Class with 3 arguments
    196  * @param type1 The type of the first functionParameter
    197  * @param type2 The type of the second functionParameter
    198  * @param type3 The type of the third functionParameter
    199  */
    200 #define LoadParam3(type1, type2, type3) \
    201  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE), \
    202            bool multi = false, type1##_TYPE default1 = type1##_DEFAULT, type2##_TYPE default2 = type2##_DEFAULT, type3##_TYPE default3 = type3##_DEFAULT)\
    203   : LoadParamBase(root, pt2Object, paramName, 3, multi, NULL, type1##_PARAM, default1, type2##_PARAM, default2, type3##_PARAM, default3) \
    204 { \
    205       if (loadString != NULL && root != NULL) \
    206 { \
    207           SubString subLoads(loadString); \
    208           if (subLoads.getCount() == 3) \
    209             (*pt2Object.*function)(type1##_FUNC(subLoads.getString(0), default1), type2##_FUNC(subLoads.getString(1), default2), type3##_FUNC(subLoads.getString(2), default3)); \
    210           else \
    211             PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", \
    212                       paramName, pt2Object->getClassName(), 3, subLoads.getCount()); \
    213 } \
    214       else \
    215         PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
    216 }
    217 
    218 
    219 // 4. TYPES
    220 /**
    221  * a Macro to easily implement many different Constructors for the LoadParam-Class with 4 arguments
    222  * @param type1 The type of the first functionParameter
    223  * @param type2 The type of the second functionParameter
    224  * @param type3 The type of the third functionParameter
    225  * @param type4 The type of the forth functionParameter
    226  */
    227 #define LoadParam4(type1, type2, type3, type4) \
    228  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE), \
    229            bool multi = false, type1##_TYPE default1 = type1##_DEFAULT, type2##_TYPE default2 = type2##_DEFAULT, type3##_TYPE default3 = type3##_DEFAULT, \
    230            type4##_TYPE default4 = type4##_DEFAULT) \
    231   : LoadParamBase(root, pt2Object, paramName, 4, multi, NULL, type1##_PARAM, default1, type2##_PARAM, default2, type3##_PARAM, default3, \
    232                   type4##_PARAM, default4) \
    233 { \
    234       if (loadString != NULL && root != NULL) \
    235 { \
    236           SubString subLoads(loadString); \
    237           if (subLoads.getCount() == 4) \
    238             (*pt2Object.*function)(type1##_FUNC(subLoads.getString(0), default1), type2##_FUNC(subLoads.getString(1), default2), type3##_FUNC(subLoads.getString(2), default3), type4##_FUNC(subLoads.getString(3), default4)); \
    239           else \
    240             PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", \
    241                       paramName, pt2Object->getClassName(), 4, subLoads.getCount()); \
    242 } \
    243       else \
    244         PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
    245 }
    246 
    247 
    248 // 5. TYPES
    249 /**
    250  * a Macro to easily implement many different Constructors for the LoadParam-Class with 5 arguments
    251  * @param type1 The type of the first functionParameter
    252  * @param type2 The type of the second functionParameter
    253  * @param type3 The type of the third functionParameter
    254  * @param type4 The type of the forth functionParameter
    255  * @param type5 The type of the fifth functionParameter
    256  */
    257 #define LoadParam5(type1, type2, type3, type4, type5) \
    258  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, \
    259            void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE, type5##_TYPE), \
    260            bool multi = false, type1##_TYPE default1 = type1##_DEFAULT, type2##_TYPE default2 = type2##_DEFAULT, type3##_TYPE default3 = type3##_DEFAULT, \
    261            type4##_TYPE default4 = type4##_DEFAULT, type5##_TYPE default5 = type5##_DEFAULT ) \
    262   : LoadParamBase(root, pt2Object, paramName, 5, multi, NULL, type1##_PARAM, default1, type2##_PARAM, default2, type3##_PARAM, default3, \
    263                   type4##_PARAM, default4, type5##_PARAM, default5) \
    264 { \
    265       if (loadString != NULL && root != NULL) \
    266 { \
    267           SubString subLoads(loadString); \
    268           if (subLoads.getCount() == 5) \
    269             (*pt2Object.*function)(type1##_FUNC(subLoads.getString(0), default1), type2##_FUNC(subLoads.getString(1), default2), type3##_FUNC(subLoads.getString(2), default3), type4##_FUNC(subLoads.getString(3), default4), type5##_FUNC(subLoads.getString(4), default5)); \
    270           else \
    271             PRINTF(2)("Not loaded Parameter %s of %s, because wrong count of arguments.\n -> Should have %d but have %d\n", \
    272                       paramName, pt2Object->getClassName(), 5, subLoads.getCount()); \
    273 } \
    274       else \
    275         PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
    276 }
    277 
    278 // Pointer TYPE
    279 /**
    280  * a Macro to easily implement many different Constructors for the LoadParam-Class with one Pointer argument
    281  * @param type1 The type of the Pointer
    282  */
    283 #define LoadParamPT(type1) \
    284  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE), type1##_TYPE pointerToParam, bool multi = false) \
    285   : LoadParamBase(root, pt2Object, paramName, 1, multi, pointerToParam, type1##_PARAM) \
    286 { \
    287       if (pointerToParam != NULL && root != NULL) \
    288         (*pt2Object.*function)((type1##_TYPE) pointerToParam); \
    289       else \
    290         PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
    291 }
    292 
    293 //! derived template class, so all the Classes can load something.
    294 template<class T> class LoadParam : public LoadParamBase
    295 {
    296   public:
    297 
    298 #define FUNCTOR_LIST(x)    LoadParam ## x
    299 #include "functor_list.h"
    300 #undef FUNCTOR_LIST
    301 
    302   //! makes functions with one Vector loadable
    303   //LoadParam1(l_VECTOR);
    304 
    305   // loads a Ti-XML-element
    306   LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(const TiXmlElement*), bool multi = false)
    307   : LoadParamBase(root, pt2Object, paramName, 1, multi, NULL, "XML")
    308   {
    309     if (root != NULL)
    310     {
    311       const TiXmlElement* elem = root->FirstChildElement(paramName);
    312       if (elem != NULL)
    313         (*pt2Object.*function)(elem);
    314       else
    315         PRINTF(4)("%s of %s is empty\n", paramName, pt2Object->getClassName());
    316     }
    317     else
    318       PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName());
    319   }
    320 
    321   //LoadParamPT(l_XML_ELEM);
    322 };
    323 
    324 // helper function
    325 
    326 const char* grabParameter(const TiXmlElement* root, const char* parameterName);
    327 
    328 #endif /* _LOAD_PARAM_H */
     85#endif /* _LOAD_PARAM_DESCRIPTION_H */
Note: See TracChangeset for help on using the changeset viewer.