[Orxonox-commit 6369] r11026 - in code/branches/presentationHS15: data/levels data/levels/includes data/levels/templates data/overlays data/particle src/libraries/core src/libraries/core/command src/libraries/core/commandline src/libraries/core/singleton src/libraries/network src/modules/hover src/modules/overlays/hud src/modules/pickup/items src/modules/towerdefense src/modules/weapons src/modules/weapons/munitions src/modules/weapons/projectiles src/modules/weapons/weaponmodes src/orxonox/controllers src/orxonox/weaponsystem src/orxonox/worldentities test/core/class
landauf at orxonox.net
landauf at orxonox.net
Sun Jan 3 14:57:42 CET 2016
Author: landauf
Date: 2016-01-03 14:57:42 +0100 (Sun, 03 Jan 2016)
New Revision: 11026
Modified:
code/branches/presentationHS15/data/levels/AITest.oxw
code/branches/presentationHS15/data/levels/Hover.oxw
code/branches/presentationHS15/data/levels/expeditionSector.oxw
code/branches/presentationHS15/data/levels/includes/weaponSettingsEscortMine.oxi
code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi
code/branches/presentationHS15/data/levels/mineLevel.oxw
code/branches/presentationHS15/data/levels/planetLevelHS15.oxw
code/branches/presentationHS15/data/levels/shuttleAttack.oxw
code/branches/presentationHS15/data/levels/shuttleRetaliation.oxw
code/branches/presentationHS15/data/levels/templates/spaceshipEscortMine.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipHover.oxt
code/branches/presentationHS15/data/levels/templates/spaceshipShuttle.oxt
code/branches/presentationHS15/data/overlays/HoverHUD.oxo
code/branches/presentationHS15/data/particle/MineExpl.particle
code/branches/presentationHS15/data/particle/MineExpl1.particle
code/branches/presentationHS15/data/particle/MineExpl2.particle
code/branches/presentationHS15/data/particle/engine.particle
code/branches/presentationHS15/data/particle/ice.particle
code/branches/presentationHS15/data/particle/mineparticle.particle
code/branches/presentationHS15/data/particle/psygun.particle
code/branches/presentationHS15/src/libraries/core/CoreConfig.cc
code/branches/presentationHS15/src/libraries/core/CoreConfig.h
code/branches/presentationHS15/src/libraries/core/GameConfig.cc
code/branches/presentationHS15/src/libraries/core/GameConfig.h
code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandIncludes.cc
code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandManager.cc
code/branches/presentationHS15/src/libraries/core/commandline/CMakeLists.txt
code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.cc
code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.h
code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.cc
code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.h
code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.cc
code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.h
code/branches/presentationHS15/src/modules/hover/CMakeLists.txt
code/branches/presentationHS15/src/modules/hover/FlagHUD.cc
code/branches/presentationHS15/src/modules/hover/FlagHUD.h
code/branches/presentationHS15/src/modules/hover/Hover.cc
code/branches/presentationHS15/src/modules/hover/Hover.h
code/branches/presentationHS15/src/modules/hover/HoverFlag.cc
code/branches/presentationHS15/src/modules/hover/HoverFlag.h
code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc
code/branches/presentationHS15/src/modules/hover/HoverOrigin.h
code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h
code/branches/presentationHS15/src/modules/hover/HoverShip.cc
code/branches/presentationHS15/src/modules/hover/HoverShip.h
code/branches/presentationHS15/src/modules/hover/HoverWall.cc
code/branches/presentationHS15/src/modules/hover/HoverWall.h
code/branches/presentationHS15/src/modules/hover/TimeHUD.cc
code/branches/presentationHS15/src/modules/hover/TimeHUD.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.h
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.cc
code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.h
code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.cc
code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.h
code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.cc
code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.h
code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.cc
code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.h
code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseField.cc
code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseField.h
code/branches/presentationHS15/src/modules/weapons/IceGunFreezer.cc
code/branches/presentationHS15/src/modules/weapons/IceGunFreezer.h
code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.h
code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.h
code/branches/presentationHS15/src/modules/weapons/munitions/MineMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/MineMunition.h
code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.cc
code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.h
code/branches/presentationHS15/src/modules/weapons/projectiles/IceGunProjectile.cc
code/branches/presentationHS15/src/modules/weapons/projectiles/IceGunProjectile.h
code/branches/presentationHS15/src/modules/weapons/projectiles/MineProjectile.cc
code/branches/presentationHS15/src/modules/weapons/projectiles/MineProjectile.h
code/branches/presentationHS15/src/modules/weapons/projectiles/SplitGunProjectile.cc
code/branches/presentationHS15/src/modules/weapons/projectiles/SplitGunProjectile.h
code/branches/presentationHS15/src/modules/weapons/weaponmodes/IceGun.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/IceGun.h
code/branches/presentationHS15/src/modules/weapons/weaponmodes/MineGun.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/MineGun.h
code/branches/presentationHS15/src/modules/weapons/weaponmodes/SplitGun.cc
code/branches/presentationHS15/src/modules/weapons/weaponmodes/SplitGun.h
code/branches/presentationHS15/src/orxonox/controllers/ActionpointController.cc
code/branches/presentationHS15/src/orxonox/controllers/ActionpointController.h
code/branches/presentationHS15/src/orxonox/controllers/CommonController.cc
code/branches/presentationHS15/src/orxonox/controllers/CommonController.h
code/branches/presentationHS15/src/orxonox/controllers/DivisionController.cc
code/branches/presentationHS15/src/orxonox/controllers/DivisionController.h
code/branches/presentationHS15/src/orxonox/controllers/FightingController.cc
code/branches/presentationHS15/src/orxonox/controllers/FightingController.h
code/branches/presentationHS15/src/orxonox/controllers/FlyingController.cc
code/branches/presentationHS15/src/orxonox/controllers/FlyingController.h
code/branches/presentationHS15/src/orxonox/controllers/MasterController.cc
code/branches/presentationHS15/src/orxonox/controllers/MasterController.h
code/branches/presentationHS15/src/orxonox/controllers/SectionController.cc
code/branches/presentationHS15/src/orxonox/controllers/SectionController.h
code/branches/presentationHS15/src/orxonox/controllers/WingmanController.cc
code/branches/presentationHS15/src/orxonox/controllers/WingmanController.h
code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.cc
code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.h
code/branches/presentationHS15/src/orxonox/worldentities/Actionpoint.cc
code/branches/presentationHS15/src/orxonox/worldentities/Actionpoint.h
code/branches/presentationHS15/src/orxonox/worldentities/ExplosionPart.cc
code/branches/presentationHS15/src/orxonox/worldentities/ExplosionPart.h
code/branches/presentationHS15/test/core/class/IdentifierNestedClassHierarchyTest.cc
Log:
eol-style:native
Property changes on: code/branches/presentationHS15/data/levels/AITest.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/Hover.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/expeditionSector.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/includes/weaponSettingsEscortMine.oxi
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/includes/weaponSettingsHover.oxi
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/mineLevel.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/planetLevelHS15.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/shuttleAttack.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/shuttleRetaliation.oxw
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/templates/spaceshipEscortMine.oxt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/templates/spaceshipHover.oxt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/levels/templates/spaceshipShuttle.oxt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/data/overlays/HoverHUD.oxo
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/data/particle/MineExpl.particle
===================================================================
--- code/branches/presentationHS15/data/particle/MineExpl.particle 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/data/particle/MineExpl.particle 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,95 +1,95 @@
-particle_system Orxonox/MineExpl
-{
- material PE/lensflare
- particle_width 65.0
- particle_height 40.0
- quota 500
- cull_each false
- sorted false
- local_space false
- iteration_interval 0.0
- nonvisible_update_timeout 0.0
- billboard_type oriented_self
- billboard_origin center
- billboard_rotation_type vertex
- point_rendering false
- accurate_facing false
-
- emitter Point
- {
- position 0.0 0.0 0.0
- direction -1.0 0.0 0.0
- angle 55
- emission_rate 1250
- velocity_min 300
- velocity_max 300
- time_to_live_min 1
- time_to_live_max 2
- duration_min 0.1
- duration_max 0.1
- repeat_delay_min 10
- repeat_delay_max 10
- colour_range_start 0 0.333333 1 1
- colour_range_end 0 0.333333 1 1
- }
-
- emitter Point
- {
- position 0.0 0.0 0.0
- direction 1.0 0.0 0.0
- angle 55
- emission_rate 200
- velocity_min 300
- velocity_max 300
- time_to_live_min 2
- time_to_live_max 2.5
- duration_min 0.1
- duration_max 0.1
- repeat_delay_min 10
- repeat_delay_max 10
- colour_range_start 0 0.333333 1 1
- colour_range_end 0 0.333333 1 1
- }
-
- emitter Point
- {
- position 0.0 0.0 0.0
- direction 0.0 0.0 -1.0
- angle 55
- emission_rate 1250
- velocity_min 300
- velocity_max 300
- time_to_live_min 2
- time_to_live_max 2.5
- duration_min 0.1
- duration_max 0.1
- repeat_delay_min 10
- repeat_delay_max 10
- colour_range_start 0 0.333333 1 1
- colour_range_end 0 0.333333 1 1
- }
-
- emitter Point
- {
- position 0.0 0.0 0.0
- direction 0.0 0.0 1.0
- angle 55
- emission_rate 1250
- velocity_min 300
- velocity_max 300
- time_to_live_min 2
- time_to_live_max 2.5
- duration_min 0.1
- duration_max 0.1
- repeat_delay_min 10
- repeat_delay_max 10
- colour_range_start 0 0.333333 1 1
- colour_range_end 0 0.333333 1 1
- }
-
-
- affector Scaler
- {
- rate -2
- }
-}
+particle_system Orxonox/MineExpl
+{
+ material PE/lensflare
+ particle_width 65.0
+ particle_height 40.0
+ quota 500
+ cull_each false
+ sorted false
+ local_space false
+ iteration_interval 0.0
+ nonvisible_update_timeout 0.0
+ billboard_type oriented_self
+ billboard_origin center
+ billboard_rotation_type vertex
+ point_rendering false
+ accurate_facing false
+
+ emitter Point
+ {
+ position 0.0 0.0 0.0
+ direction -1.0 0.0 0.0
+ angle 55
+ emission_rate 1250
+ velocity_min 300
+ velocity_max 300
+ time_to_live_min 1
+ time_to_live_max 2
+ duration_min 0.1
+ duration_max 0.1
+ repeat_delay_min 10
+ repeat_delay_max 10
+ colour_range_start 0 0.333333 1 1
+ colour_range_end 0 0.333333 1 1
+ }
+
+ emitter Point
+ {
+ position 0.0 0.0 0.0
+ direction 1.0 0.0 0.0
+ angle 55
+ emission_rate 200
+ velocity_min 300
+ velocity_max 300
+ time_to_live_min 2
+ time_to_live_max 2.5
+ duration_min 0.1
+ duration_max 0.1
+ repeat_delay_min 10
+ repeat_delay_max 10
+ colour_range_start 0 0.333333 1 1
+ colour_range_end 0 0.333333 1 1
+ }
+
+ emitter Point
+ {
+ position 0.0 0.0 0.0
+ direction 0.0 0.0 -1.0
+ angle 55
+ emission_rate 1250
+ velocity_min 300
+ velocity_max 300
+ time_to_live_min 2
+ time_to_live_max 2.5
+ duration_min 0.1
+ duration_max 0.1
+ repeat_delay_min 10
+ repeat_delay_max 10
+ colour_range_start 0 0.333333 1 1
+ colour_range_end 0 0.333333 1 1
+ }
+
+ emitter Point
+ {
+ position 0.0 0.0 0.0
+ direction 0.0 0.0 1.0
+ angle 55
+ emission_rate 1250
+ velocity_min 300
+ velocity_max 300
+ time_to_live_min 2
+ time_to_live_max 2.5
+ duration_min 0.1
+ duration_max 0.1
+ repeat_delay_min 10
+ repeat_delay_max 10
+ colour_range_start 0 0.333333 1 1
+ colour_range_end 0 0.333333 1 1
+ }
+
+
+ affector Scaler
+ {
+ rate -2
+ }
+}
Property changes on: code/branches/presentationHS15/data/particle/MineExpl.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/data/particle/MineExpl1.particle
===================================================================
--- code/branches/presentationHS15/data/particle/MineExpl1.particle 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/data/particle/MineExpl1.particle 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,47 +1,47 @@
-particle_system Orxonox/MineExpl1
-{
- material PE/lensflare
- particle_width 35.0
- particle_height 35.0
- quota 500
- cull_each false
- sorted false
- local_space false
- iteration_interval 0.0
- nonvisible_update_timeout 0.0
- billboard_type oriented_self
- billboard_origin center
- billboard_rotation_type vertex
- point_rendering false
- accurate_facing false
-
- emitter Point
- {
- position 0.0 0.0 0.0
- direction 0.0 1.0 0.0
- angle 30
- emission_rate 2000
- velocity_min 300
- velocity_max 300
- time_to_live_min 3
- time_to_live_max 4
- duration_min 2.0
- duration_max 2.5
- repeat_delay 10
- repeat_delay_min 10
- repeat_delay_max 10
- colour_range_start 0 0.333333 1 1
- colour_range_end 0 0.333333 1 1
- }
-
- affector DirectionRandomiser
- {
- randomness 5
- scope 1
- keep_velocity true
- }
- affector Scaler
- {
- rate -2
- }
-}
+particle_system Orxonox/MineExpl1
+{
+ material PE/lensflare
+ particle_width 35.0
+ particle_height 35.0
+ quota 500
+ cull_each false
+ sorted false
+ local_space false
+ iteration_interval 0.0
+ nonvisible_update_timeout 0.0
+ billboard_type oriented_self
+ billboard_origin center
+ billboard_rotation_type vertex
+ point_rendering false
+ accurate_facing false
+
+ emitter Point
+ {
+ position 0.0 0.0 0.0
+ direction 0.0 1.0 0.0
+ angle 30
+ emission_rate 2000
+ velocity_min 300
+ velocity_max 300
+ time_to_live_min 3
+ time_to_live_max 4
+ duration_min 2.0
+ duration_max 2.5
+ repeat_delay 10
+ repeat_delay_min 10
+ repeat_delay_max 10
+ colour_range_start 0 0.333333 1 1
+ colour_range_end 0 0.333333 1 1
+ }
+
+ affector DirectionRandomiser
+ {
+ randomness 5
+ scope 1
+ keep_velocity true
+ }
+ affector Scaler
+ {
+ rate -2
+ }
+}
Property changes on: code/branches/presentationHS15/data/particle/MineExpl1.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/data/particle/MineExpl2.particle
===================================================================
--- code/branches/presentationHS15/data/particle/MineExpl2.particle 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/data/particle/MineExpl2.particle 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,47 +1,47 @@
-particle_system Orxonox/MineExpl2
-{
- material PE/lensflare
- particle_width 35.0
- particle_height 35.0
- quota 500
- cull_each false
- sorted false
- local_space false
- iteration_interval 0.0
- nonvisible_update_timeout 0.0
- billboard_type oriented_self
- billboard_origin center
- billboard_rotation_type vertex
- point_rendering false
- accurate_facing false
-
- emitter Point
- {
- position 0.0 0.0 0.0
- direction 0.0 -1.0 0.0
- angle 30
- emission_rate 2000
- velocity_min 300
- velocity_max 300
- time_to_live_min 2
- time_to_live_max 2.5
- duration_min 0.5
- duration_max 1.5
- repeat_delay 10
- repeat_delay_min 10
- repeat_delay_max 10
- colour_range_start 0 0.333333 1 1
- colour_range_end 0 0.333333 1 1
- }
-
- affector DirectionRandomiser
- {
- randomness 5
- scope 1
- keep_velocity true
- }
- affector Scaler
- {
- rate -2
- }
-}
+particle_system Orxonox/MineExpl2
+{
+ material PE/lensflare
+ particle_width 35.0
+ particle_height 35.0
+ quota 500
+ cull_each false
+ sorted false
+ local_space false
+ iteration_interval 0.0
+ nonvisible_update_timeout 0.0
+ billboard_type oriented_self
+ billboard_origin center
+ billboard_rotation_type vertex
+ point_rendering false
+ accurate_facing false
+
+ emitter Point
+ {
+ position 0.0 0.0 0.0
+ direction 0.0 -1.0 0.0
+ angle 30
+ emission_rate 2000
+ velocity_min 300
+ velocity_max 300
+ time_to_live_min 2
+ time_to_live_max 2.5
+ duration_min 0.5
+ duration_max 1.5
+ repeat_delay 10
+ repeat_delay_min 10
+ repeat_delay_max 10
+ colour_range_start 0 0.333333 1 1
+ colour_range_end 0 0.333333 1 1
+ }
+
+ affector DirectionRandomiser
+ {
+ randomness 5
+ scope 1
+ keep_velocity true
+ }
+ affector Scaler
+ {
+ rate -2
+ }
+}
Property changes on: code/branches/presentationHS15/data/particle/MineExpl2.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/data/particle/engine.particle
===================================================================
--- code/branches/presentationHS15/data/particle/engine.particle 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/data/particle/engine.particle 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,70 +1,70 @@
-particle_system Orxonox/engine
-{
- material PE/Special.001
- particle_width 10.0
- particle_height 10.0
- quota 2000
- cull_each false
- sorted false
- local_space false
- iteration_interval 0.0
- nonvisible_update_timeout 0.0
- billboard_type point
- billboard_origin center
- billboard_rotation_type texcoord
- point_rendering false
- accurate_facing false
-
-
-
- emitter Ring
- {
- position 0.0 0.0 0.0
- direction 0.0 0.0 1.0
- angle 0
- width 0.5
- height 0.5
- depth 0
- inner_width 0.99
- inner_height 0.99
- emission_rate 250
- velocity_min 50
- velocity_max 55
- time_to_live_min 0.075
- time_to_live_max 0.09
- duration_min 0
- duration_max 0
- repeat_delay_min 0
- repeat_delay_max 0
- colour_range_start 1 0.333333 0 1
- colour_range_end 1 0.333333 0 1
- }
-
- emitter Ring
- {
- position 0.0 0.0 0.0
- direction 0.0 0.0 1.0
- angle 0
- width 0.5
- height 0.5
- depth 0
- inner_width 0.1
- inner_height 0.25
- emission_rate 250
- velocity_min 50
- velocity_max 55
- time_to_live_min 0.1
- time_to_live_max 0.125
- duration_min 0
- duration_max 0
- repeat_delay_min 0
- repeat_delay_max 0
- colour_range_start 1 0 0 1
- colour_range_end 1 0 0 1
- }
-
- affector Scaler
- {
- rate -40
- }
-}
+particle_system Orxonox/engine
+{
+ material PE/Special.001
+ particle_width 10.0
+ particle_height 10.0
+ quota 2000
+ cull_each false
+ sorted false
+ local_space false
+ iteration_interval 0.0
+ nonvisible_update_timeout 0.0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ point_rendering false
+ accurate_facing false
+
+
+
+ emitter Ring
+ {
+ position 0.0 0.0 0.0
+ direction 0.0 0.0 1.0
+ angle 0
+ width 0.5
+ height 0.5
+ depth 0
+ inner_width 0.99
+ inner_height 0.99
+ emission_rate 250
+ velocity_min 50
+ velocity_max 55
+ time_to_live_min 0.075
+ time_to_live_max 0.09
+ duration_min 0
+ duration_max 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ colour_range_start 1 0.333333 0 1
+ colour_range_end 1 0.333333 0 1
+ }
+
+ emitter Ring
+ {
+ position 0.0 0.0 0.0
+ direction 0.0 0.0 1.0
+ angle 0
+ width 0.5
+ height 0.5
+ depth 0
+ inner_width 0.1
+ inner_height 0.25
+ emission_rate 250
+ velocity_min 50
+ velocity_max 55
+ time_to_live_min 0.1
+ time_to_live_max 0.125
+ duration_min 0
+ duration_max 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ colour_range_start 1 0 0 1
+ colour_range_end 1 0 0 1
+ }
+
+ affector Scaler
+ {
+ rate -40
+ }
+}
Property changes on: code/branches/presentationHS15/data/particle/engine.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/data/particle/ice.particle
===================================================================
--- code/branches/presentationHS15/data/particle/ice.particle 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/data/particle/ice.particle 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,59 +1,59 @@
-particle_system Orxonox/ice
-{
- material PE/iceCrystal
- particle_width 5
- particle_height 5
- quota 7000
- cull_each false
- sorted false
- local_space false
- iteration_interval 0.0
- nonvisible_update_timeout 0.0
- billboard_type point
- billboard_origin center
- billboard_rotation_type texcoord
- point_rendering false
- accurate_facing false
-
- emitter Box
- {
- position 0.0 0.0 0.0
- direction 1.0 1.0 1.0
- angle 45
- width 20
- height 20
- depth 20
- emission_rate 200
- velocity_min 1
- velocity_max 1
- time_to_live_min 3
- time_to_live_max 6
- duration_min 0
- duration_max 0
- repeat_delay_min 0
- repeat_delay_max 0
- colour_range_start 1 1 1 1
- colour_range_end 0.9 1 1 1
- }
-
- affector LinearForce
- {
- force_vector 0.0 -0.5 1.0
- force_application add
- }
-
- affector DirectionRandomiser
- {
- randomness 50
- scope 100
- keep_velocity true
- }
-
- affector Rotator
- {
- rotation_speed_range_start 43.26
- rotation_speed_range_end 0
- rotation_range_start 0
- rotation_range_end 0
- }
-}
+particle_system Orxonox/ice
+{
+ material PE/iceCrystal
+ particle_width 5
+ particle_height 5
+ quota 7000
+ cull_each false
+ sorted false
+ local_space false
+ iteration_interval 0.0
+ nonvisible_update_timeout 0.0
+ billboard_type point
+ billboard_origin center
+ billboard_rotation_type texcoord
+ point_rendering false
+ accurate_facing false
+
+ emitter Box
+ {
+ position 0.0 0.0 0.0
+ direction 1.0 1.0 1.0
+ angle 45
+ width 20
+ height 20
+ depth 20
+ emission_rate 200
+ velocity_min 1
+ velocity_max 1
+ time_to_live_min 3
+ time_to_live_max 6
+ duration_min 0
+ duration_max 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ colour_range_start 1 1 1 1
+ colour_range_end 0.9 1 1 1
+ }
+
+ affector LinearForce
+ {
+ force_vector 0.0 -0.5 1.0
+ force_application add
+ }
+
+ affector DirectionRandomiser
+ {
+ randomness 50
+ scope 100
+ keep_velocity true
+ }
+
+ affector Rotator
+ {
+ rotation_speed_range_start 43.26
+ rotation_speed_range_end 0
+ rotation_range_start 0
+ rotation_range_end 0
+ }
+}
Property changes on: code/branches/presentationHS15/data/particle/ice.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/data/particle/mineparticle.particle
===================================================================
--- code/branches/presentationHS15/data/particle/mineparticle.particle 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/data/particle/mineparticle.particle 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,53 +1,53 @@
-particle_system Orxonox/mineparticle
-{
- material PE/lensflare
- particle_width 5.0
- particle_height 5.0
- quota 2000
- cull_each true
- sorted true
- local_space false
- iteration_interval 0.0
- nonvisible_update_timeout 0.0
- billboard_type point
- billboard_origin bottom_right
- billboard_rotation_type vertex
- point_rendering false
- accurate_facing false
-
- emitter HollowEllipsoid
- {
- position 0.0 0.0 0.0
- direction 0.0 0.0 1.0
- angle 0
- width 20
- height 20
- depth 20
- inner_width 0.99
- inner_height 0.99
- inner_depth 0.99
- emission_rate 20.12
- velocity_min 1
- velocity_max 1
- time_to_live_min 5
- time_to_live_max 5
- duration_min 0
- duration_max 0
- repeat_delay_min 0
- repeat_delay_max 0
- colour_range_start 1 0 0 1
- colour_range_end 1 0 0 1
- }
-
- affector Scaler
- {
- rate -2
- }
- affector Rotator
- {
- rotation_speed_range_start 100
- rotation_speed_range_end 500
- rotation_range_start 0
- rotation_range_end 180
- }
-}
+particle_system Orxonox/mineparticle
+{
+ material PE/lensflare
+ particle_width 5.0
+ particle_height 5.0
+ quota 2000
+ cull_each true
+ sorted true
+ local_space false
+ iteration_interval 0.0
+ nonvisible_update_timeout 0.0
+ billboard_type point
+ billboard_origin bottom_right
+ billboard_rotation_type vertex
+ point_rendering false
+ accurate_facing false
+
+ emitter HollowEllipsoid
+ {
+ position 0.0 0.0 0.0
+ direction 0.0 0.0 1.0
+ angle 0
+ width 20
+ height 20
+ depth 20
+ inner_width 0.99
+ inner_height 0.99
+ inner_depth 0.99
+ emission_rate 20.12
+ velocity_min 1
+ velocity_max 1
+ time_to_live_min 5
+ time_to_live_max 5
+ duration_min 0
+ duration_max 0
+ repeat_delay_min 0
+ repeat_delay_max 0
+ colour_range_start 1 0 0 1
+ colour_range_end 1 0 0 1
+ }
+
+ affector Scaler
+ {
+ rate -2
+ }
+ affector Rotator
+ {
+ rotation_speed_range_start 100
+ rotation_speed_range_end 500
+ rotation_range_start 0
+ rotation_range_end 180
+ }
+}
Property changes on: code/branches/presentationHS15/data/particle/mineparticle.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/data/particle/psygun.particle
===================================================================
--- code/branches/presentationHS15/data/particle/psygun.particle 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/data/particle/psygun.particle 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,62 +1,62 @@
-particle_system Orxonox/psygun
-{
- material PE/glowEffect
- particle_width 200.0
- particle_height 200.0
- quota 300
- cull_each false
- sorted false
- local_space false
- iteration_interval 0.0
- nonvisible_update_timeout 0.0
- billboard_type point
- billboard_origin top_right
- billboard_rotation_type vertex
- point_rendering false
- accurate_facing true
-
- emitter Point
- {
- position 0.0 0.0 0.0
- direction 0.0 1.0 0.0
- angle 154.8
- emission_rate 400
- velocity_min 100
- velocity_max 300
- time_to_live_min 0
- time_to_live_max 3.38
- duration_min 1
- duration_max 1
- repeat_delay_min 0.11
- repeat_delay_max 2.81
- colour_range_start 0.666667 0 0.498039 1
- colour_range_end 1 0 0.498039 1
- }
-
- affector LinearForce
- {
- force_vector 0.0 12.32 0.0
- force_application add
- }
-
- affector Rotator
- {
- rotation_speed_range_start 100
- rotation_speed_range_end 500
- rotation_range_start 0
- rotation_range_end 180
- }
-
- affector Scaler
- {
- rate -98.82
- }
-
- affector ColourFader
- {
- red -0.93
- green -1
- blue 1
- alpha -1
- }
-}
+particle_system Orxonox/psygun
+{
+ material PE/glowEffect
+ particle_width 200.0
+ particle_height 200.0
+ quota 300
+ cull_each false
+ sorted false
+ local_space false
+ iteration_interval 0.0
+ nonvisible_update_timeout 0.0
+ billboard_type point
+ billboard_origin top_right
+ billboard_rotation_type vertex
+ point_rendering false
+ accurate_facing true
+
+ emitter Point
+ {
+ position 0.0 0.0 0.0
+ direction 0.0 1.0 0.0
+ angle 154.8
+ emission_rate 400
+ velocity_min 100
+ velocity_max 300
+ time_to_live_min 0
+ time_to_live_max 3.38
+ duration_min 1
+ duration_max 1
+ repeat_delay_min 0.11
+ repeat_delay_max 2.81
+ colour_range_start 0.666667 0 0.498039 1
+ colour_range_end 1 0 0.498039 1
+ }
+
+ affector LinearForce
+ {
+ force_vector 0.0 12.32 0.0
+ force_application add
+ }
+
+ affector Rotator
+ {
+ rotation_speed_range_start 100
+ rotation_speed_range_end 500
+ rotation_range_start 0
+ rotation_range_end 180
+ }
+
+ affector Scaler
+ {
+ rate -98.82
+ }
+
+ affector ColourFader
+ {
+ red -0.93
+ green -1
+ blue 1
+ alpha -1
+ }
+}
Property changes on: code/branches/presentationHS15/data/particle/psygun.particle
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/CoreConfig.cc
===================================================================
--- code/branches/presentationHS15/src/libraries/core/CoreConfig.cc 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/CoreConfig.cc 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,154 +1,154 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#include "CoreConfig.h"
-
-#include "util/output/LogWriter.h"
-#include "util/output/OutputManager.h"
-#include "core/CoreIncludes.h"
-#include "core/config/ConfigValueIncludes.h"
-#include "core/Language.h"
-#include "core/ApplicationPaths.h"
-
-namespace orxonox
-{
- RegisterClassNoArgs(CoreConfig);
-
- CoreConfig::CoreConfig()
- : bDevMode_(false)
- , bStartIOConsole_(true)
- , lastLevelTimestamp_(0)
- , ogreConfigTimestamp_(0)
- {
- RegisterObject(CoreConfig);
- this->setConfigValues();
- }
-
- //! Function to collect the SetConfigValue-macro calls.
- void CoreConfig::setConfigValues()
- {
- SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableMaxLevel_,
- OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(),
- OutputManager::getInstance().getLogWriter()->getConfigurableMaxLevelName(),
- OutputManager::getInstance().getLogWriter()->configurableMaxLevel_)
- .description("The maximum level of output shown in the log file")
- .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableLevel);
- SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableAdditionalContextsMaxLevel_,
- OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(),
- OutputManager::getInstance().getLogWriter()->getConfigurableAdditionalContextsMaxLevelName(),
- OutputManager::getInstance().getLogWriter()->configurableAdditionalContextsMaxLevel_)
- .description("The maximum level of output shown in the log file for additional contexts")
- .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableAdditionalContextsLevel);
- SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableAdditionalContexts_,
- OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(),
- OutputManager::getInstance().getLogWriter()->getConfigurableAdditionalContextsName(),
- OutputManager::getInstance().getLogWriter()->configurableAdditionalContexts_)
- .description("Additional output contexts shown in the log file")
- .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableAdditionalContexts);
-
- SetConfigValue(bDevMode_, ApplicationPaths::buildDirectoryRun())
- .description("Developer mode. If not set, hides some things from the user to not confuse him.")
- .callback(this, &CoreConfig::devModeChanged);
- SetConfigValue(language_, Language::getInstance().defaultLanguage_)
- .description("The language of the in game text")
- .callback(this, &CoreConfig::languageChanged);
- SetConfigValue(bInitRandomNumberGenerator_, true)
- .description("If true, all random actions are different each time you start the game")
- .callback(this, &CoreConfig::initRandomNumberGenerator);
- SetConfigValue(bStartIOConsole_, true)
- .description("Set to false if you don't want to use the IOConsole (for Lua debugging for instance)");
- SetConfigValue(lastLevelTimestamp_, 0)
- .description("Timestamp when the last level was started.");
- SetConfigValue(ogreConfigTimestamp_, 0)
- .description("Timestamp when the ogre config file was changed.");
- }
-
- /** Callback function for changes in the dev mode that affect debug levels.
- The function behaves according to these rules:
- - 'normal' mode is defined based on where the program was launched: if
- the launch path was the build directory, development mode \c on is
- normal, otherwise normal means development mode \c off.
- - Debug levels should not be hard configured (\c config instead of
- \c tconfig) in non 'normal' mode to avoid strange behaviour.
- - Changing the development mode from 'normal' to the other state will
- immediately change the debug levels to predefined values which can be
- reconfigured with \c tconfig.
- @note
- The debug levels for the IOConsole and the InGameConsole can be found
- in the Shell class. The same rules apply.
- */
- void CoreConfig::devModeChanged()
- {
- // Inform listeners
- ObjectList<DevModeListener>::iterator it = ObjectList<DevModeListener>::begin();
- for (; it != ObjectList<DevModeListener>::end(); ++it)
- it->devModeChanged(bDevMode_);
- }
-
- //! Callback function if the language has changed.
- void CoreConfig::languageChanged()
- {
- // Read the translation file after the language was configured
- bool success = Language::getInstance().readTranslatedLanguageFile(this->language_);
- if (!success)
- {
- // Set the language in the config-file back to the default.
- ResetConfigValue(language_);
- orxout(internal_info, context::language) << "Reset language to " << this->language_ << '.' << endl;
- }
- }
-
- void CoreConfig::initRandomNumberGenerator()
- {
- static bool bInitialized = false;
- if (!bInitialized && this->bInitRandomNumberGenerator_)
- {
- srand(static_cast<unsigned int>(time(0)));
- rand();
- bInitialized = true;
- }
- }
-
- void CoreConfig::updateLastLevelTimestamp()
- {
- ModifyConfigValue(lastLevelTimestamp_, set, static_cast<long long>(time(NULL)));
- }
-
- void CoreConfig::updateOgreConfigTimestamp()
- {
- ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time(NULL)));
- }
-
-
- RegisterAbstractClass(DevModeListener).inheritsFrom<Listable>();
-
- DevModeListener::DevModeListener()
- {
- RegisterObject(DevModeListener);
- }
-}
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "CoreConfig.h"
+
+#include "util/output/LogWriter.h"
+#include "util/output/OutputManager.h"
+#include "core/CoreIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "core/Language.h"
+#include "core/ApplicationPaths.h"
+
+namespace orxonox
+{
+ RegisterClassNoArgs(CoreConfig);
+
+ CoreConfig::CoreConfig()
+ : bDevMode_(false)
+ , bStartIOConsole_(true)
+ , lastLevelTimestamp_(0)
+ , ogreConfigTimestamp_(0)
+ {
+ RegisterObject(CoreConfig);
+ this->setConfigValues();
+ }
+
+ //! Function to collect the SetConfigValue-macro calls.
+ void CoreConfig::setConfigValues()
+ {
+ SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableMaxLevel_,
+ OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(),
+ OutputManager::getInstance().getLogWriter()->getConfigurableMaxLevelName(),
+ OutputManager::getInstance().getLogWriter()->configurableMaxLevel_)
+ .description("The maximum level of output shown in the log file")
+ .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableLevel);
+ SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableAdditionalContextsMaxLevel_,
+ OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(),
+ OutputManager::getInstance().getLogWriter()->getConfigurableAdditionalContextsMaxLevelName(),
+ OutputManager::getInstance().getLogWriter()->configurableAdditionalContextsMaxLevel_)
+ .description("The maximum level of output shown in the log file for additional contexts")
+ .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableAdditionalContextsLevel);
+ SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableAdditionalContexts_,
+ OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(),
+ OutputManager::getInstance().getLogWriter()->getConfigurableAdditionalContextsName(),
+ OutputManager::getInstance().getLogWriter()->configurableAdditionalContexts_)
+ .description("Additional output contexts shown in the log file")
+ .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableAdditionalContexts);
+
+ SetConfigValue(bDevMode_, ApplicationPaths::buildDirectoryRun())
+ .description("Developer mode. If not set, hides some things from the user to not confuse him.")
+ .callback(this, &CoreConfig::devModeChanged);
+ SetConfigValue(language_, Language::getInstance().defaultLanguage_)
+ .description("The language of the in game text")
+ .callback(this, &CoreConfig::languageChanged);
+ SetConfigValue(bInitRandomNumberGenerator_, true)
+ .description("If true, all random actions are different each time you start the game")
+ .callback(this, &CoreConfig::initRandomNumberGenerator);
+ SetConfigValue(bStartIOConsole_, true)
+ .description("Set to false if you don't want to use the IOConsole (for Lua debugging for instance)");
+ SetConfigValue(lastLevelTimestamp_, 0)
+ .description("Timestamp when the last level was started.");
+ SetConfigValue(ogreConfigTimestamp_, 0)
+ .description("Timestamp when the ogre config file was changed.");
+ }
+
+ /** Callback function for changes in the dev mode that affect debug levels.
+ The function behaves according to these rules:
+ - 'normal' mode is defined based on where the program was launched: if
+ the launch path was the build directory, development mode \c on is
+ normal, otherwise normal means development mode \c off.
+ - Debug levels should not be hard configured (\c config instead of
+ \c tconfig) in non 'normal' mode to avoid strange behaviour.
+ - Changing the development mode from 'normal' to the other state will
+ immediately change the debug levels to predefined values which can be
+ reconfigured with \c tconfig.
+ @note
+ The debug levels for the IOConsole and the InGameConsole can be found
+ in the Shell class. The same rules apply.
+ */
+ void CoreConfig::devModeChanged()
+ {
+ // Inform listeners
+ ObjectList<DevModeListener>::iterator it = ObjectList<DevModeListener>::begin();
+ for (; it != ObjectList<DevModeListener>::end(); ++it)
+ it->devModeChanged(bDevMode_);
+ }
+
+ //! Callback function if the language has changed.
+ void CoreConfig::languageChanged()
+ {
+ // Read the translation file after the language was configured
+ bool success = Language::getInstance().readTranslatedLanguageFile(this->language_);
+ if (!success)
+ {
+ // Set the language in the config-file back to the default.
+ ResetConfigValue(language_);
+ orxout(internal_info, context::language) << "Reset language to " << this->language_ << '.' << endl;
+ }
+ }
+
+ void CoreConfig::initRandomNumberGenerator()
+ {
+ static bool bInitialized = false;
+ if (!bInitialized && this->bInitRandomNumberGenerator_)
+ {
+ srand(static_cast<unsigned int>(time(0)));
+ rand();
+ bInitialized = true;
+ }
+ }
+
+ void CoreConfig::updateLastLevelTimestamp()
+ {
+ ModifyConfigValue(lastLevelTimestamp_, set, static_cast<long long>(time(NULL)));
+ }
+
+ void CoreConfig::updateOgreConfigTimestamp()
+ {
+ ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time(NULL)));
+ }
+
+
+ RegisterAbstractClass(DevModeListener).inheritsFrom<Listable>();
+
+ DevModeListener::DevModeListener()
+ {
+ RegisterObject(DevModeListener);
+ }
+}
Property changes on: code/branches/presentationHS15/src/libraries/core/CoreConfig.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/CoreConfig.h
===================================================================
--- code/branches/presentationHS15/src/libraries/core/CoreConfig.h 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/CoreConfig.h 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,83 +1,83 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#ifndef _CoreConfig_H__
-#define _CoreConfig_H__
-
-#include "core/CorePrereqs.h"
-
-#include "core/config/Configurable.h"
-
-namespace orxonox
-{
- class _CoreExport CoreConfig : virtual public Configurable
- {
- public:
- CoreConfig();
-
- void setConfigValues();
-
- //! Developers bit. If returns false, some options are not available as to not confuse the normal user.
- inline bool inDevMode(void) const
- { return this->bDevMode_; }
-
- inline bool getStartIOConsole() const
- { return this->bStartIOConsole_; }
-
- void updateLastLevelTimestamp();
- inline long long getLastLevelTimestamp() const
- { return this->lastLevelTimestamp_; }
-
- void updateOgreConfigTimestamp();
- inline long long getOgreConfigTimestamp() const
- { return this->ogreConfigTimestamp_; }
-
- private:
- void devModeChanged();
- void languageChanged();
- void initRandomNumberGenerator();
-
- bool bDevMode_; //!< Developers bit. If set to false, some options are not available as to not confuse the normal user.
- std::string language_; //!< The language
- bool bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
- bool bStartIOConsole_; //!< Set to false if you don't want to use the IOConsole
- long long lastLevelTimestamp_; ///< Timestamp when the last level was started
- long long ogreConfigTimestamp_; ///< Timestamp wehen the ogre config level was modified
- };
-
- //! Informs about changes in the Development Mode.
- class DevModeListener : virtual public Listable
- {
- public:
- DevModeListener();
- virtual ~DevModeListener() {}
- virtual void devModeChanged(bool value) = 0;
- };
-}
-
-#endif /* _CoreConfig_H__ */
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _CoreConfig_H__
+#define _CoreConfig_H__
+
+#include "core/CorePrereqs.h"
+
+#include "core/config/Configurable.h"
+
+namespace orxonox
+{
+ class _CoreExport CoreConfig : virtual public Configurable
+ {
+ public:
+ CoreConfig();
+
+ void setConfigValues();
+
+ //! Developers bit. If returns false, some options are not available as to not confuse the normal user.
+ inline bool inDevMode(void) const
+ { return this->bDevMode_; }
+
+ inline bool getStartIOConsole() const
+ { return this->bStartIOConsole_; }
+
+ void updateLastLevelTimestamp();
+ inline long long getLastLevelTimestamp() const
+ { return this->lastLevelTimestamp_; }
+
+ void updateOgreConfigTimestamp();
+ inline long long getOgreConfigTimestamp() const
+ { return this->ogreConfigTimestamp_; }
+
+ private:
+ void devModeChanged();
+ void languageChanged();
+ void initRandomNumberGenerator();
+
+ bool bDevMode_; //!< Developers bit. If set to false, some options are not available as to not confuse the normal user.
+ std::string language_; //!< The language
+ bool bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
+ bool bStartIOConsole_; //!< Set to false if you don't want to use the IOConsole
+ long long lastLevelTimestamp_; ///< Timestamp when the last level was started
+ long long ogreConfigTimestamp_; ///< Timestamp wehen the ogre config level was modified
+ };
+
+ //! Informs about changes in the Development Mode.
+ class DevModeListener : virtual public Listable
+ {
+ public:
+ DevModeListener();
+ virtual ~DevModeListener() {}
+ virtual void devModeChanged(bool value) = 0;
+ };
+}
+
+#endif /* _CoreConfig_H__ */
Property changes on: code/branches/presentationHS15/src/libraries/core/CoreConfig.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/GameConfig.cc
===================================================================
--- code/branches/presentationHS15/src/libraries/core/GameConfig.cc 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/GameConfig.cc 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,53 +1,53 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#include "GameConfig.h"
-#include "core/CoreIncludes.h"
-#include "core/config/ConfigValueIncludes.h"
-
-namespace orxonox
-{
- RegisterClassNoArgs(GameConfig);
-
- GameConfig::GameConfig()
- {
- RegisterObject(GameConfig);
- this->setConfigValues();
- }
-
- void GameConfig::setConfigValues()
- {
- SetConfigValue(statisticsRefreshCycle_, 250000)
- .description("Sets the time in microseconds interval at which average fps, etc. get updated.");
- SetConfigValue(statisticsAvgLength_, 1000000)
- .description("Sets the time in microseconds interval at which average fps, etc. gets calculated.");
-
- SetConfigValueExternal(fpsLimit_, "GraphicsSettings", "fpsLimit", 50)
- .description("Sets the desired frame rate (0 for no limit).");
- }
-}
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "GameConfig.h"
+#include "core/CoreIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
+
+namespace orxonox
+{
+ RegisterClassNoArgs(GameConfig);
+
+ GameConfig::GameConfig()
+ {
+ RegisterObject(GameConfig);
+ this->setConfigValues();
+ }
+
+ void GameConfig::setConfigValues()
+ {
+ SetConfigValue(statisticsRefreshCycle_, 250000)
+ .description("Sets the time in microseconds interval at which average fps, etc. get updated.");
+ SetConfigValue(statisticsAvgLength_, 1000000)
+ .description("Sets the time in microseconds interval at which average fps, etc. gets calculated.");
+
+ SetConfigValueExternal(fpsLimit_, "GraphicsSettings", "fpsLimit", 50)
+ .description("Sets the desired frame rate (0 for no limit).");
+ }
+}
Property changes on: code/branches/presentationHS15/src/libraries/core/GameConfig.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/GameConfig.h
===================================================================
--- code/branches/presentationHS15/src/libraries/core/GameConfig.h 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/GameConfig.h 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,60 +1,60 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#ifndef _GameConfig_H__
-#define _GameConfig_H__
-
-#include "core/CorePrereqs.h"
-
-#include "core/config/Configurable.h"
-
-namespace orxonox
-{
- class _CoreExport GameConfig : virtual public Configurable
- {
- public:
- GameConfig();
-
- void setConfigValues();
-
- inline unsigned int getStatisticsRefreshCycle() const
- { return this->statisticsRefreshCycle_; }
- inline unsigned int getStatisticsAvgLength() const
- { return this->statisticsAvgLength_; }
- inline unsigned int getFpsLimit() const
- { return this->fpsLimit_; }
-
- private:
- // config values
- unsigned int statisticsRefreshCycle_;
- unsigned int statisticsAvgLength_;
- unsigned int fpsLimit_;
- };
-}
-
-#endif /* _GameConfig_H__ */
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _GameConfig_H__
+#define _GameConfig_H__
+
+#include "core/CorePrereqs.h"
+
+#include "core/config/Configurable.h"
+
+namespace orxonox
+{
+ class _CoreExport GameConfig : virtual public Configurable
+ {
+ public:
+ GameConfig();
+
+ void setConfigValues();
+
+ inline unsigned int getStatisticsRefreshCycle() const
+ { return this->statisticsRefreshCycle_; }
+ inline unsigned int getStatisticsAvgLength() const
+ { return this->statisticsAvgLength_; }
+ inline unsigned int getFpsLimit() const
+ { return this->fpsLimit_; }
+
+ private:
+ // config values
+ unsigned int statisticsRefreshCycle_;
+ unsigned int statisticsAvgLength_;
+ unsigned int fpsLimit_;
+ };
+}
+
+#endif /* _GameConfig_H__ */
Property changes on: code/branches/presentationHS15/src/libraries/core/GameConfig.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandIncludes.cc
===================================================================
--- code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandIncludes.cc 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandIncludes.cc 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,44 +1,44 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#include "ConsoleCommandIncludes.h"
-
-#include "ConsoleCommandManager.h"
-
-namespace orxonox
-{
- void StaticallyInitializedConsoleCommand::load()
- {
- ConsoleCommandManager::getInstance().registerCommand(this->command_);
- }
-
- void StaticallyInitializedConsoleCommand::unload()
- {
- ConsoleCommandManager::getInstance().unregisterCommand(this->command_);
- }
-}
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "ConsoleCommandIncludes.h"
+
+#include "ConsoleCommandManager.h"
+
+namespace orxonox
+{
+ void StaticallyInitializedConsoleCommand::load()
+ {
+ ConsoleCommandManager::getInstance().registerCommand(this->command_);
+ }
+
+ void StaticallyInitializedConsoleCommand::unload()
+ {
+ ConsoleCommandManager::getInstance().unregisterCommand(this->command_);
+ }
+}
Property changes on: code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandIncludes.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandManager.cc
===================================================================
--- code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandManager.cc 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandManager.cc 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,189 +1,189 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file
- @brief Implementation of the ConsoleCommand class.
-*/
-
-#include "ConsoleCommandManager.h"
-
-#include "ConsoleCommand.h"
-#include "util/StringUtils.h"
-
-namespace orxonox
-{
- ConsoleCommandManager* ConsoleCommandManager::singletonPtr_s = 0;
-
- /**
- @brief Returns the command with given group an name.
- @param group The group of the requested command
- @param name The group of the requested command
- @param bPrintError If true, an error is printed if the command doesn't exist
- */
- ConsoleCommand* ConsoleCommandManager::getCommand(const std::string& group, const std::string& name, bool bPrintError)
- {
- // find the group
- std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = this->commandMap_.find(group);
- if (it_group != this->commandMap_.end())
- {
- // find the name
- std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.find(name);
- if (it_name != it_group->second.end())
- {
- // return the pointer
- return it_name->second;
- }
- }
- if (bPrintError)
- {
- if (group == "")
- orxout(internal_error, context::commands) << "Couldn't find console command with shortcut \"" << name << "\"" << endl;
- else
- orxout(internal_error, context::commands) << "Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << endl;
- }
- return 0;
- }
-
- /**
- @brief Returns the command with given group an name in lowercase.
- @param group The group of the requested command in lowercase
- @param name The group of the requested command in lowercase
- @param bPrintError If true, an error is printed if the command doesn't exist
- */
- ConsoleCommand* ConsoleCommandManager::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
- {
- std::string groupLC = getLowercase(group);
- std::string nameLC = getLowercase(name);
-
- // find the group
- std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = this->commandMapLC_.find(groupLC);
- if (it_group != this->commandMapLC_.end())
- {
- // find the name
- std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.find(nameLC);
- if (it_name != it_group->second.end())
- {
- // return the pointer
- return it_name->second;
- }
- }
- if (bPrintError)
- {
- if (group == "")
- orxout(internal_error, context::commands) << "Couldn't find console command with shortcut \"" << name << "\"" << endl;
- else
- orxout(internal_error, context::commands) << "Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << endl;
- }
- return 0;
- }
-
- /**
- @brief Registers a new command with the groups and names that are defined by ConsoleCommand::getNames().
- */
- void ConsoleCommandManager::registerCommand(ConsoleCommand* command)
- {
- for (size_t i = 0; i < command->getNames().size(); ++i)
- {
- const ConsoleCommand::CommandName& name = command->getNames()[i];
- this->registerCommand(name.group_, name.name_, command);
- }
- }
-
- /**
- @brief Registers a new command with given group an name by adding it to the command map.
- */
- void ConsoleCommandManager::registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command)
- {
- if (name == "")
- return;
-
- // check if a command with this name already exists
- if (this->getCommand(group, name) != 0)
- {
- if (group == "")
- orxout(internal_warning, context::commands) << "A console command with shortcut \"" << name << "\" already exists." << endl;
- else
- orxout(internal_warning, context::commands) << "A console command with name \"" << name << "\" already exists in group \"" << group << "\"." << endl;
- }
- else
- {
- // add the command to the map
- this->commandMap_[group][name] = command;
- this->commandMapLC_[getLowercase(group)][getLowercase(name)] = command;
- }
- }
-
- /**
- @brief Removes the command from the command map.
- */
- void ConsoleCommandManager::unregisterCommand(ConsoleCommand* command)
- {
- // iterate through all groups
- for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::iterator it_group = this->commandMap_.begin(); it_group != this->commandMap_.end(); )
- {
- // iterate through all commands of each group
- for (std::map<std::string, ConsoleCommand*>::iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); )
- {
- // erase the command
- if (it_name->second == command)
- it_group->second.erase(it_name++);
- else
- ++it_name;
- }
-
- // erase the group if it is empty now
- if (it_group->second.empty())
- this->commandMap_.erase(it_group++);
- else
- ++it_group;
- }
-
- // now the same for the lowercase-map:
-
- // iterate through all groups
- for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::iterator it_group = this->commandMapLC_.begin(); it_group != this->commandMapLC_.end(); )
- {
- // iterate through all commands of each group
- for (std::map<std::string, ConsoleCommand*>::iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); )
- {
- // erase the command
- if (it_name->second == command)
- it_group->second.erase(it_name++);
- else
- ++it_name;
- }
-
- // erase the group if it is empty now
- if (it_group->second.empty())
- this->commandMapLC_.erase(it_group++);
- else
- ++it_group;
- }
- }
-}
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file
+ @brief Implementation of the ConsoleCommand class.
+*/
+
+#include "ConsoleCommandManager.h"
+
+#include "ConsoleCommand.h"
+#include "util/StringUtils.h"
+
+namespace orxonox
+{
+ ConsoleCommandManager* ConsoleCommandManager::singletonPtr_s = 0;
+
+ /**
+ @brief Returns the command with given group an name.
+ @param group The group of the requested command
+ @param name The group of the requested command
+ @param bPrintError If true, an error is printed if the command doesn't exist
+ */
+ ConsoleCommand* ConsoleCommandManager::getCommand(const std::string& group, const std::string& name, bool bPrintError)
+ {
+ // find the group
+ std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = this->commandMap_.find(group);
+ if (it_group != this->commandMap_.end())
+ {
+ // find the name
+ std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.find(name);
+ if (it_name != it_group->second.end())
+ {
+ // return the pointer
+ return it_name->second;
+ }
+ }
+ if (bPrintError)
+ {
+ if (group == "")
+ orxout(internal_error, context::commands) << "Couldn't find console command with shortcut \"" << name << "\"" << endl;
+ else
+ orxout(internal_error, context::commands) << "Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << endl;
+ }
+ return 0;
+ }
+
+ /**
+ @brief Returns the command with given group an name in lowercase.
+ @param group The group of the requested command in lowercase
+ @param name The group of the requested command in lowercase
+ @param bPrintError If true, an error is printed if the command doesn't exist
+ */
+ ConsoleCommand* ConsoleCommandManager::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
+ {
+ std::string groupLC = getLowercase(group);
+ std::string nameLC = getLowercase(name);
+
+ // find the group
+ std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = this->commandMapLC_.find(groupLC);
+ if (it_group != this->commandMapLC_.end())
+ {
+ // find the name
+ std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.find(nameLC);
+ if (it_name != it_group->second.end())
+ {
+ // return the pointer
+ return it_name->second;
+ }
+ }
+ if (bPrintError)
+ {
+ if (group == "")
+ orxout(internal_error, context::commands) << "Couldn't find console command with shortcut \"" << name << "\"" << endl;
+ else
+ orxout(internal_error, context::commands) << "Couldn't find console command with group \"" << group << "\" and name \"" << name << "\"" << endl;
+ }
+ return 0;
+ }
+
+ /**
+ @brief Registers a new command with the groups and names that are defined by ConsoleCommand::getNames().
+ */
+ void ConsoleCommandManager::registerCommand(ConsoleCommand* command)
+ {
+ for (size_t i = 0; i < command->getNames().size(); ++i)
+ {
+ const ConsoleCommand::CommandName& name = command->getNames()[i];
+ this->registerCommand(name.group_, name.name_, command);
+ }
+ }
+
+ /**
+ @brief Registers a new command with given group an name by adding it to the command map.
+ */
+ void ConsoleCommandManager::registerCommand(const std::string& group, const std::string& name, ConsoleCommand* command)
+ {
+ if (name == "")
+ return;
+
+ // check if a command with this name already exists
+ if (this->getCommand(group, name) != 0)
+ {
+ if (group == "")
+ orxout(internal_warning, context::commands) << "A console command with shortcut \"" << name << "\" already exists." << endl;
+ else
+ orxout(internal_warning, context::commands) << "A console command with name \"" << name << "\" already exists in group \"" << group << "\"." << endl;
+ }
+ else
+ {
+ // add the command to the map
+ this->commandMap_[group][name] = command;
+ this->commandMapLC_[getLowercase(group)][getLowercase(name)] = command;
+ }
+ }
+
+ /**
+ @brief Removes the command from the command map.
+ */
+ void ConsoleCommandManager::unregisterCommand(ConsoleCommand* command)
+ {
+ // iterate through all groups
+ for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::iterator it_group = this->commandMap_.begin(); it_group != this->commandMap_.end(); )
+ {
+ // iterate through all commands of each group
+ for (std::map<std::string, ConsoleCommand*>::iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); )
+ {
+ // erase the command
+ if (it_name->second == command)
+ it_group->second.erase(it_name++);
+ else
+ ++it_name;
+ }
+
+ // erase the group if it is empty now
+ if (it_group->second.empty())
+ this->commandMap_.erase(it_group++);
+ else
+ ++it_group;
+ }
+
+ // now the same for the lowercase-map:
+
+ // iterate through all groups
+ for (std::map<std::string, std::map<std::string, ConsoleCommand*> >::iterator it_group = this->commandMapLC_.begin(); it_group != this->commandMapLC_.end(); )
+ {
+ // iterate through all commands of each group
+ for (std::map<std::string, ConsoleCommand*>::iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); )
+ {
+ // erase the command
+ if (it_name->second == command)
+ it_group->second.erase(it_name++);
+ else
+ ++it_name;
+ }
+
+ // erase the group if it is empty now
+ if (it_group->second.empty())
+ this->commandMapLC_.erase(it_group++);
+ else
+ ++it_group;
+ }
+ }
+}
Property changes on: code/branches/presentationHS15/src/libraries/core/command/ConsoleCommandManager.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/commandline/CMakeLists.txt
===================================================================
--- code/branches/presentationHS15/src/libraries/core/commandline/CMakeLists.txt 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/commandline/CMakeLists.txt 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,3 +1,3 @@
-ADD_SOURCE_FILES(CORE_SRC_FILES
- CommandLineParser.cc
-)
+ADD_SOURCE_FILES(CORE_SRC_FILES
+ CommandLineParser.cc
+)
Property changes on: code/branches/presentationHS15/src/libraries/core/commandline/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.cc
===================================================================
--- code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.cc 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.cc 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,42 +1,42 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#include "ScopedSingletonIncludes.h"
-
-namespace orxonox
-{
- void StaticallyInitializedScopedSingletonWrapper::load()
- {
- ScopeManager::getInstance().addListener(this->wrapper_, this->scope_);
- }
-
- void StaticallyInitializedScopedSingletonWrapper::unload()
- {
- ScopeManager::getInstance().removeListener(this->wrapper_, this->scope_);
- }
-}
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "ScopedSingletonIncludes.h"
+
+namespace orxonox
+{
+ void StaticallyInitializedScopedSingletonWrapper::load()
+ {
+ ScopeManager::getInstance().addListener(this->wrapper_, this->scope_);
+ }
+
+ void StaticallyInitializedScopedSingletonWrapper::unload()
+ {
+ ScopeManager::getInstance().removeListener(this->wrapper_, this->scope_);
+ }
+}
Property changes on: code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.h
===================================================================
--- code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.h 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.h 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,103 +1,103 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Reto Grieder
- * Co-authors:
- * ...
- *
- */
-
-/**
- @file
- @ingroup SingletonScope
- @brief Definition of the ManageScopedSingleton macro.
-*/
-
-#ifndef __ScopedSingletonIncludes_H__
-#define __ScopedSingletonIncludes_H__
-
-#include "core/CorePrereqs.h"
-
-#include "ScopedSingletonWrapper.h"
-#include "core/module/StaticallyInitializedInstance.h"
-
-/**
- @brief Creates an orxonox::ScopedSingletonWrapper for an orxonox::Singleton and registers it with orxonox::ScopeManager.
- @param className The name of the singleton class
- @param scope The scope in which the singleton should exist
- @param allowedToFail If true, the singleton is allowed to fail and thus a try-catch block is used when creating the singleton.
-
- If this macro is called for a singleton, it is wrapped in a ScopedSingletonWrapper and registered with ScopeManager
- and will thus be created if its scope becomes active and destroyed if is deactivated.
-
-
- Usually a singleton gets created automatically when it is first used, but it will never
- be destroyed (unless the singleton explicitly deletes itself). To allow controlled
- construction and destruction, the singleton can be put within a virtual scope. This is
- done by registering the singleton class with orxonox::ScopeManager. To
- do so, the ManageScopedSingleton() macro has to be called:
-
- @code
- ManageScopedSingleton(TestSingleton, ScopeID::Graphics, false); // muste be called in a source (*.cc) file
- @endcode
-
- @b Important: If you call ManageScopedSingleton(), you don't have to initialize singletonPtr_s anymore,
- because that's already done by the macro.
-
- Now the singleton TestSingleton gets automatically created if the scope Graphics becomes
- active and also gets destroyed if the scope is deactivated.
-
- Note that not all singletons must register with a scope, but it's recommended.
-
-*/
-#define ManageScopedSingleton(className, scope, allowedToFail) \
- className* className::singletonPtr_s = NULL; \
- static ScopedSingletonWrapper& className##ScopedSingletonWrapper \
- = (new orxonox::SI_SSW(new ClassScopedSingletonWrapper<className, allowedToFail>(#className), scope))->getWrapper()
-
-namespace orxonox
-{
- class _CoreExport StaticallyInitializedScopedSingletonWrapper : public StaticallyInitializedInstance
- {
- public:
- StaticallyInitializedScopedSingletonWrapper(ScopedSingletonWrapper* wrapper, ScopeID::Value scope)
- : StaticallyInitializedInstance(StaticInitialization::SCOPED_SINGLETON_WRAPPER)
- , wrapper_(wrapper)
- , scope_(scope)
- {}
- ~StaticallyInitializedScopedSingletonWrapper() { delete wrapper_; }
-
- virtual void load();
- virtual void unload();
-
- inline ScopedSingletonWrapper& getWrapper()
- { return *this->wrapper_; }
-
- private:
- ScopedSingletonWrapper* wrapper_;
- ScopeID::Value scope_;
- };
-
- typedef StaticallyInitializedScopedSingletonWrapper SI_SSW;
-}
-
-#endif /* __ScopedSingletonIncludes_H__ */
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Reto Grieder
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file
+ @ingroup SingletonScope
+ @brief Definition of the ManageScopedSingleton macro.
+*/
+
+#ifndef __ScopedSingletonIncludes_H__
+#define __ScopedSingletonIncludes_H__
+
+#include "core/CorePrereqs.h"
+
+#include "ScopedSingletonWrapper.h"
+#include "core/module/StaticallyInitializedInstance.h"
+
+/**
+ @brief Creates an orxonox::ScopedSingletonWrapper for an orxonox::Singleton and registers it with orxonox::ScopeManager.
+ @param className The name of the singleton class
+ @param scope The scope in which the singleton should exist
+ @param allowedToFail If true, the singleton is allowed to fail and thus a try-catch block is used when creating the singleton.
+
+ If this macro is called for a singleton, it is wrapped in a ScopedSingletonWrapper and registered with ScopeManager
+ and will thus be created if its scope becomes active and destroyed if is deactivated.
+
+
+ Usually a singleton gets created automatically when it is first used, but it will never
+ be destroyed (unless the singleton explicitly deletes itself). To allow controlled
+ construction and destruction, the singleton can be put within a virtual scope. This is
+ done by registering the singleton class with orxonox::ScopeManager. To
+ do so, the ManageScopedSingleton() macro has to be called:
+
+ @code
+ ManageScopedSingleton(TestSingleton, ScopeID::Graphics, false); // muste be called in a source (*.cc) file
+ @endcode
+
+ @b Important: If you call ManageScopedSingleton(), you don't have to initialize singletonPtr_s anymore,
+ because that's already done by the macro.
+
+ Now the singleton TestSingleton gets automatically created if the scope Graphics becomes
+ active and also gets destroyed if the scope is deactivated.
+
+ Note that not all singletons must register with a scope, but it's recommended.
+
+*/
+#define ManageScopedSingleton(className, scope, allowedToFail) \
+ className* className::singletonPtr_s = NULL; \
+ static ScopedSingletonWrapper& className##ScopedSingletonWrapper \
+ = (new orxonox::SI_SSW(new ClassScopedSingletonWrapper<className, allowedToFail>(#className), scope))->getWrapper()
+
+namespace orxonox
+{
+ class _CoreExport StaticallyInitializedScopedSingletonWrapper : public StaticallyInitializedInstance
+ {
+ public:
+ StaticallyInitializedScopedSingletonWrapper(ScopedSingletonWrapper* wrapper, ScopeID::Value scope)
+ : StaticallyInitializedInstance(StaticInitialization::SCOPED_SINGLETON_WRAPPER)
+ , wrapper_(wrapper)
+ , scope_(scope)
+ {}
+ ~StaticallyInitializedScopedSingletonWrapper() { delete wrapper_; }
+
+ virtual void load();
+ virtual void unload();
+
+ inline ScopedSingletonWrapper& getWrapper()
+ { return *this->wrapper_; }
+
+ private:
+ ScopedSingletonWrapper* wrapper_;
+ ScopeID::Value scope_;
+ };
+
+ typedef StaticallyInitializedScopedSingletonWrapper SI_SSW;
+}
+
+#endif /* __ScopedSingletonIncludes_H__ */
Property changes on: code/branches/presentationHS15/src/libraries/core/singleton/ScopedSingletonIncludes.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.cc
===================================================================
--- code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.cc 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.cc 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,53 +1,53 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Oliver Scheuss
- * Co-authors:
- * Fabian 'x3n' Landau
- *
- */
-
-#include "NetworkFunctionIncludes.h"
-#include "NetworkFunctionManager.h"
-
-#include "core/module/StaticInitializationHandlerIncludes.h"
-#include "NetworkStaticInitializationHandler.h"
-
-namespace orxonox
-{
- RegisterStaticInitializationHandler(NetworkStaticInitializationHandler);
-
- void StaticallyInitializedNetworkFunction::load()
- {
- NetworkFunctionManager::getInstance().registerFunction(this->function_);
- }
-
- void StaticallyInitializedNetworkFunction::unload()
- {
- NetworkFunctionManager::getInstance().unregisterFunction(this->function_);
- }
-
- uint32_t getNetworkIdForPointer(const NetworkFunctionPointer& pointer)
- {
- return NetworkFunctionManager::getInstance().getFunctionByFunctionPointer(pointer)->getNetworkID();
- }
-}
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Oliver Scheuss
+ * Co-authors:
+ * Fabian 'x3n' Landau
+ *
+ */
+
+#include "NetworkFunctionIncludes.h"
+#include "NetworkFunctionManager.h"
+
+#include "core/module/StaticInitializationHandlerIncludes.h"
+#include "NetworkStaticInitializationHandler.h"
+
+namespace orxonox
+{
+ RegisterStaticInitializationHandler(NetworkStaticInitializationHandler);
+
+ void StaticallyInitializedNetworkFunction::load()
+ {
+ NetworkFunctionManager::getInstance().registerFunction(this->function_);
+ }
+
+ void StaticallyInitializedNetworkFunction::unload()
+ {
+ NetworkFunctionManager::getInstance().unregisterFunction(this->function_);
+ }
+
+ uint32_t getNetworkIdForPointer(const NetworkFunctionPointer& pointer)
+ {
+ return NetworkFunctionManager::getInstance().getFunctionByFunctionPointer(pointer)->getNetworkID();
+ }
+}
Property changes on: code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.h
===================================================================
--- code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.h 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.h 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,119 +1,119 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Oliver Scheuss
- * Co-authors:
- * Fabian 'x3n' Landau
- *
- */
-
-#ifndef _NetworkFunctionIncludes_H__
-#define _NetworkFunctionIncludes_H__
-
-#include "NetworkPrereqs.h"
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/static_assert.hpp>
-
-#include "NetworkFunction.h"
-#include "core/module/StaticallyInitializedInstance.h"
-
-#define registerStaticNetworkFunction( functionPointer ) \
- static orxonox::NetworkFunctionBase& BOOST_PP_CAT( NETWORK_FUNCTION_, __UNIQUE_NUMBER__ ) \
- = (new orxonox::SI_NF(orxonox::registerStaticNetworkFunctionFct( functionPointer, #functionPointer )))->getFunction()
-
-#define registerMemberNetworkFunction( class, function ) \
- static orxonox::NetworkFunctionBase& BOOST_PP_CAT( NETWORK_FUNCTION_##class, __UNIQUE_NUMBER__ ) \
- = (new orxonox::SI_NF(orxonox::registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function)))->getFunction()
-
-namespace orxonox
-{
- class _NetworkExport StaticallyInitializedNetworkFunction : public StaticallyInitializedInstance
- {
- public:
- StaticallyInitializedNetworkFunction(NetworkFunctionBase* function)
- : StaticallyInitializedInstance(StaticInitialization::NETWORK_FUNCTION)
- , function_(function)
- {}
- ~StaticallyInitializedNetworkFunction() { delete function_; }
-
- virtual void load();
- virtual void unload();
-
- inline NetworkFunctionBase& getFunction()
- { return *this->function_; }
-
- private:
- NetworkFunctionBase* function_;
- };
-
- typedef StaticallyInitializedNetworkFunction SI_NF;
-
- template<class PT>
- inline NetworkFunctionBase* registerStaticNetworkFunctionFct(PT ptr, const std::string& name)
- {
- BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for static functions than defined above
- NetworkFunctionPointer destptr;
- copyPtr(ptr, destptr);
- return new NetworkFunctionStatic(createFunctor(ptr), name, destptr);
- }
-
- template<class T, class PT>
- inline NetworkFunctionBase* registerMemberNetworkFunctionFct(PT ptr, const std::string& name)
- {
- BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for a specific kind of member functions than defined above
- NetworkFunctionPointer destptr;
- copyPtr(ptr, destptr);
- return new NetworkMemberFunction<T>(createFunctor(ptr), name, destptr);
- }
-
- _NetworkExport uint32_t getNetworkIdForPointer(const NetworkFunctionPointer& pointer);
-
- // call it with functionPointer, clientID, args
- template<class PT>
- void callStaticNetworkFunction(PT ptr, uint32_t clientID, const MultiType& mt1 = MultiType::Null, const MultiType& mt2 = MultiType::Null, const MultiType& mt3 = MultiType::Null, const MultiType& mt4 = MultiType::Null, const MultiType& mt5 = MultiType::Null)
- {
- NetworkFunctionPointer destptr;
- copyPtr(ptr, destptr);
- FunctionCallManager::addCall(getNetworkIdForPointer(destptr), OBJECTID_UNKNOWN, clientID, mt1, mt2, mt3, mt4, mt5);
- }
-
- // call it with class::function, objectID, clientID, args
- template<class PT>
- void callMemberNetworkFunction(PT ptr, uint32_t objectID, uint32_t clientID, const MultiType& mt1 = MultiType::Null, const MultiType& mt2 = MultiType::Null, const MultiType& mt3 = MultiType::Null, const MultiType& mt4 = MultiType::Null, const MultiType& mt5 = MultiType::Null)
- {
- NetworkFunctionPointer destptr;
- copyPtr(ptr, destptr);
- FunctionCallManager::addCall(getNetworkIdForPointer(destptr), objectID, clientID, mt1, mt2, mt3, mt4, mt5);
- }
-
- template<class PT>
- inline void copyPtr(PT ptr, NetworkFunctionPointer& destptr)
- {
- if (sizeof(NetworkFunctionPointer) - sizeof(PT) > 0)
- memset((uint8_t*)&destptr + sizeof(PT), 0, sizeof(NetworkFunctionPointer) - sizeof(PT));
- PT p2 = ptr;
- memcpy(&destptr, &p2, sizeof(PT));
- }
-}
-
-#endif /* _NetworkFunctionIncludes_H__ */
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Oliver Scheuss
+ * Co-authors:
+ * Fabian 'x3n' Landau
+ *
+ */
+
+#ifndef _NetworkFunctionIncludes_H__
+#define _NetworkFunctionIncludes_H__
+
+#include "NetworkPrereqs.h"
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/static_assert.hpp>
+
+#include "NetworkFunction.h"
+#include "core/module/StaticallyInitializedInstance.h"
+
+#define registerStaticNetworkFunction( functionPointer ) \
+ static orxonox::NetworkFunctionBase& BOOST_PP_CAT( NETWORK_FUNCTION_, __UNIQUE_NUMBER__ ) \
+ = (new orxonox::SI_NF(orxonox::registerStaticNetworkFunctionFct( functionPointer, #functionPointer )))->getFunction()
+
+#define registerMemberNetworkFunction( class, function ) \
+ static orxonox::NetworkFunctionBase& BOOST_PP_CAT( NETWORK_FUNCTION_##class, __UNIQUE_NUMBER__ ) \
+ = (new orxonox::SI_NF(orxonox::registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function)))->getFunction()
+
+namespace orxonox
+{
+ class _NetworkExport StaticallyInitializedNetworkFunction : public StaticallyInitializedInstance
+ {
+ public:
+ StaticallyInitializedNetworkFunction(NetworkFunctionBase* function)
+ : StaticallyInitializedInstance(StaticInitialization::NETWORK_FUNCTION)
+ , function_(function)
+ {}
+ ~StaticallyInitializedNetworkFunction() { delete function_; }
+
+ virtual void load();
+ virtual void unload();
+
+ inline NetworkFunctionBase& getFunction()
+ { return *this->function_; }
+
+ private:
+ NetworkFunctionBase* function_;
+ };
+
+ typedef StaticallyInitializedNetworkFunction SI_NF;
+
+ template<class PT>
+ inline NetworkFunctionBase* registerStaticNetworkFunctionFct(PT ptr, const std::string& name)
+ {
+ BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for static functions than defined above
+ NetworkFunctionPointer destptr;
+ copyPtr(ptr, destptr);
+ return new NetworkFunctionStatic(createFunctor(ptr), name, destptr);
+ }
+
+ template<class T, class PT>
+ inline NetworkFunctionBase* registerMemberNetworkFunctionFct(PT ptr, const std::string& name)
+ {
+ BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for a specific kind of member functions than defined above
+ NetworkFunctionPointer destptr;
+ copyPtr(ptr, destptr);
+ return new NetworkMemberFunction<T>(createFunctor(ptr), name, destptr);
+ }
+
+ _NetworkExport uint32_t getNetworkIdForPointer(const NetworkFunctionPointer& pointer);
+
+ // call it with functionPointer, clientID, args
+ template<class PT>
+ void callStaticNetworkFunction(PT ptr, uint32_t clientID, const MultiType& mt1 = MultiType::Null, const MultiType& mt2 = MultiType::Null, const MultiType& mt3 = MultiType::Null, const MultiType& mt4 = MultiType::Null, const MultiType& mt5 = MultiType::Null)
+ {
+ NetworkFunctionPointer destptr;
+ copyPtr(ptr, destptr);
+ FunctionCallManager::addCall(getNetworkIdForPointer(destptr), OBJECTID_UNKNOWN, clientID, mt1, mt2, mt3, mt4, mt5);
+ }
+
+ // call it with class::function, objectID, clientID, args
+ template<class PT>
+ void callMemberNetworkFunction(PT ptr, uint32_t objectID, uint32_t clientID, const MultiType& mt1 = MultiType::Null, const MultiType& mt2 = MultiType::Null, const MultiType& mt3 = MultiType::Null, const MultiType& mt4 = MultiType::Null, const MultiType& mt5 = MultiType::Null)
+ {
+ NetworkFunctionPointer destptr;
+ copyPtr(ptr, destptr);
+ FunctionCallManager::addCall(getNetworkIdForPointer(destptr), objectID, clientID, mt1, mt2, mt3, mt4, mt5);
+ }
+
+ template<class PT>
+ inline void copyPtr(PT ptr, NetworkFunctionPointer& destptr)
+ {
+ if (sizeof(NetworkFunctionPointer) - sizeof(PT) > 0)
+ memset((uint8_t*)&destptr + sizeof(PT), 0, sizeof(NetworkFunctionPointer) - sizeof(PT));
+ PT p2 = ptr;
+ memcpy(&destptr, &p2, sizeof(PT));
+ }
+}
+
+#endif /* _NetworkFunctionIncludes_H__ */
Property changes on: code/branches/presentationHS15/src/libraries/network/NetworkFunctionIncludes.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.cc
===================================================================
--- code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.cc 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.cc 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,83 +1,83 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#include "NetworkFunctionManager.h"
-#include "NetworkFunction.h"
-
-namespace orxonox
-{
- NetworkFunctionManager* NetworkFunctionManager::singletonPtr_s = 0;
-
- void NetworkFunctionManager::registerFunction(NetworkFunctionBase* function)
- {
- this->functions_.insert(function);
- this->nameMap_[function->getName()] = function;
- this->idMap_[function->getNetworkID()] = function;
- this->functorMap_[function->getPointer()] = function;
- }
-
- void NetworkFunctionManager::unregisterFunction(NetworkFunctionBase* function)
- {
- this->functions_.erase(function);
- this->nameMap_.erase(function->getName());
- this->idMap_.erase(function->getNetworkID());
- this->functorMap_.erase(function->getPointer());
- }
-
- NetworkFunctionBase* NetworkFunctionManager::getFunctionByName(const std::string& name)
- {
- std::map<std::string, NetworkFunctionBase*>::iterator it = nameMap_.find(name);
- assert(it != nameMap_.end());
- return it->second;
- }
-
- NetworkFunctionBase* NetworkFunctionManager::getFunctionByFunctionPointer(const NetworkFunctionPointer& p)
- {
- std::map<NetworkFunctionPointer, NetworkFunctionBase*>::iterator it = functorMap_.find(p);
- assert(it != functorMap_.end());
- return it->second;
- }
-
- NetworkFunctionBase* NetworkFunctionManager::getFunctionByNetworkId(uint32_t id)
- {
- std::map<uint32_t, NetworkFunctionBase*>::iterator it = idMap_.find(id);
- assert(it != idMap_.end());
- if(it != idMap_.end())
- return it->second;
- else
- return NULL;
- }
-
- /**
- @brief Cleans the NetworkID map (needed on clients for correct initialization)
- */
- void NetworkFunctionManager::clearNetworkIDs()
- {
- this->idMap_.clear();
- }
-}
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "NetworkFunctionManager.h"
+#include "NetworkFunction.h"
+
+namespace orxonox
+{
+ NetworkFunctionManager* NetworkFunctionManager::singletonPtr_s = 0;
+
+ void NetworkFunctionManager::registerFunction(NetworkFunctionBase* function)
+ {
+ this->functions_.insert(function);
+ this->nameMap_[function->getName()] = function;
+ this->idMap_[function->getNetworkID()] = function;
+ this->functorMap_[function->getPointer()] = function;
+ }
+
+ void NetworkFunctionManager::unregisterFunction(NetworkFunctionBase* function)
+ {
+ this->functions_.erase(function);
+ this->nameMap_.erase(function->getName());
+ this->idMap_.erase(function->getNetworkID());
+ this->functorMap_.erase(function->getPointer());
+ }
+
+ NetworkFunctionBase* NetworkFunctionManager::getFunctionByName(const std::string& name)
+ {
+ std::map<std::string, NetworkFunctionBase*>::iterator it = nameMap_.find(name);
+ assert(it != nameMap_.end());
+ return it->second;
+ }
+
+ NetworkFunctionBase* NetworkFunctionManager::getFunctionByFunctionPointer(const NetworkFunctionPointer& p)
+ {
+ std::map<NetworkFunctionPointer, NetworkFunctionBase*>::iterator it = functorMap_.find(p);
+ assert(it != functorMap_.end());
+ return it->second;
+ }
+
+ NetworkFunctionBase* NetworkFunctionManager::getFunctionByNetworkId(uint32_t id)
+ {
+ std::map<uint32_t, NetworkFunctionBase*>::iterator it = idMap_.find(id);
+ assert(it != idMap_.end());
+ if(it != idMap_.end())
+ return it->second;
+ else
+ return NULL;
+ }
+
+ /**
+ @brief Cleans the NetworkID map (needed on clients for correct initialization)
+ */
+ void NetworkFunctionManager::clearNetworkIDs()
+ {
+ this->idMap_.clear();
+ }
+}
Property changes on: code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.h
===================================================================
--- code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.h 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.h 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,70 +1,70 @@
-/*
- * ORXONOX - the hottest 3D action shooter ever to exist
- * > www.orxonox.net <
- *
- *
- * License notice:
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Author:
- * Fabian 'x3n' Landau
- * Co-authors:
- * ...
- *
- */
-
-#ifndef __NetworkFunctionManager_H__
-#define __NetworkFunctionManager_H__
-
-#include "NetworkPrereqs.h"
-
-#include <cassert>
-#include <map>
-#include <set>
-
-#include "util/Singleton.h"
-#include "NetworkFunction.h"
-
-namespace orxonox
-{
- class _NetworkExport NetworkFunctionManager : public Singleton<NetworkFunctionManager>
- {
- friend class Singleton<NetworkFunctionManager>;
-
- public:
- void registerFunction(NetworkFunctionBase* function);
- void unregisterFunction(NetworkFunctionBase* function);
-
- inline const std::set<NetworkFunctionBase*>& getAllFunctions()
- { return functions_; }
-
- NetworkFunctionBase* getFunctionByName(const std::string& name);
- NetworkFunctionBase* getFunctionByFunctionPointer(const NetworkFunctionPointer& p);
- NetworkFunctionBase* getFunctionByNetworkId(uint32_t id);
-
- void clearNetworkIDs();
-
- private:
- std::set<NetworkFunctionBase*> functions_;
- std::map<std::string, NetworkFunctionBase*> nameMap_;
- std::map<NetworkFunctionPointer, NetworkFunctionBase*> functorMap_;
- std::map<uint32_t, NetworkFunctionBase*> idMap_;
-
- static NetworkFunctionManager* singletonPtr_s;
- };
-}
-
-#endif /* __NetworkFunctionManager_H__ */
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Fabian 'x3n' Landau
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef __NetworkFunctionManager_H__
+#define __NetworkFunctionManager_H__
+
+#include "NetworkPrereqs.h"
+
+#include <cassert>
+#include <map>
+#include <set>
+
+#include "util/Singleton.h"
+#include "NetworkFunction.h"
+
+namespace orxonox
+{
+ class _NetworkExport NetworkFunctionManager : public Singleton<NetworkFunctionManager>
+ {
+ friend class Singleton<NetworkFunctionManager>;
+
+ public:
+ void registerFunction(NetworkFunctionBase* function);
+ void unregisterFunction(NetworkFunctionBase* function);
+
+ inline const std::set<NetworkFunctionBase*>& getAllFunctions()
+ { return functions_; }
+
+ NetworkFunctionBase* getFunctionByName(const std::string& name);
+ NetworkFunctionBase* getFunctionByFunctionPointer(const NetworkFunctionPointer& p);
+ NetworkFunctionBase* getFunctionByNetworkId(uint32_t id);
+
+ void clearNetworkIDs();
+
+ private:
+ std::set<NetworkFunctionBase*> functions_;
+ std::map<std::string, NetworkFunctionBase*> nameMap_;
+ std::map<NetworkFunctionPointer, NetworkFunctionBase*> functorMap_;
+ std::map<uint32_t, NetworkFunctionBase*> idMap_;
+
+ static NetworkFunctionManager* singletonPtr_s;
+ };
+}
+
+#endif /* __NetworkFunctionManager_H__ */
Property changes on: code/branches/presentationHS15/src/libraries/network/NetworkFunctionManager.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/FlagHUD.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/FlagHUD.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/Hover.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/Hover.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverFlag.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverFlag.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverOrigin.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverOrigin.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverPrereqs.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverShip.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverShip.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverWall.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/HoverWall.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/TimeHUD.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/hover/TimeHUD.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDEnemyShieldBar.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDRocketFuelBar.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDShieldBar.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeapon.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponMode.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/overlays/hud/HUDWeaponSystem.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/pickup/items/BoostPickup.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/pickup/items/MunitionContainer.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/pickup/items/MunitionPickup.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseField.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseField.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/IceGunFreezer.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/IceGunFreezer.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/munitions/IceMunition.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/munitions/LightningMunition.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/munitions/MineMunition.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/munitions/MineMunition.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/munitions/SplitMunition.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/projectiles/IceGunProjectile.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/projectiles/IceGunProjectile.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/projectiles/MineProjectile.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/projectiles/MineProjectile.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/projectiles/SplitGunProjectile.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/projectiles/SplitGunProjectile.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/weaponmodes/IceGun.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/weaponmodes/IceGun.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/weaponmodes/MineGun.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/weaponmodes/MineGun.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/weaponmodes/SplitGun.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/modules/weapons/weaponmodes/SplitGun.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/ActionpointController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/ActionpointController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/CommonController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/CommonController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/DivisionController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/DivisionController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/FightingController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/FightingController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/FlyingController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/FlyingController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/MasterController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/MasterController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/SectionController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/SectionController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/WingmanController.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/controllers/WingmanController.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/weaponsystem/ReplenishingMunition.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/worldentities/Actionpoint.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/worldentities/Actionpoint.h
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/worldentities/ExplosionPart.cc
___________________________________________________________________
Added: svn:eol-style
+ native
Property changes on: code/branches/presentationHS15/src/orxonox/worldentities/ExplosionPart.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: code/branches/presentationHS15/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- code/branches/presentationHS15/test/core/class/IdentifierNestedClassHierarchyTest.cc 2016-01-03 13:39:10 UTC (rev 11025)
+++ code/branches/presentationHS15/test/core/class/IdentifierNestedClassHierarchyTest.cc 2016-01-03 13:57:42 UTC (rev 11026)
@@ -1,355 +1,355 @@
-#include <gtest/gtest.h>
-#include "core/CoreIncludes.h"
-#include "core/class/Identifiable.h"
-#include "core/class/OrxonoxClass.h"
-#include "core/class/OrxonoxInterface.h"
-#include "core/module/ModuleInstance.h"
-
-namespace orxonox
-{
- // Tests the class hierarchy with classes that contain other classes as members.
- //
- // +------ Nested1 +------ Class1_notNested
- // +------ Nested2 +------ Class2_oneNested
- // OrxonoxClass <-----+------ BaseClass <-----+------ Class3_twoNested <----------- Class3_Child
- // +------ Class4_class1Nested
- // +------ Class5_class2Nested
- // +------ Class6_class3Nested <-------- Class6_Child
-
- namespace
- {
- class Nested1 : public OrxonoxClass
- {
- public:
- Nested1() { RegisterObject(Nested1); }
- };
-
- class Nested2 : public OrxonoxClass
- {
- public:
- Nested2() { RegisterObject(Nested2); }
- };
-
- class BaseClass : public OrxonoxClass
- {
- public:
- BaseClass() { RegisterObject(BaseClass); }
- };
-
- class Class1_notNested : public BaseClass
- {
- public:
- Class1_notNested() { RegisterObject(Class1_notNested); }
- };
-
- class Class2_oneNested : public BaseClass
- {
- public:
- Class2_oneNested() { RegisterObject(Class2_oneNested); }
- Nested1 nested1_;
- };
-
- class Class3_twoNested : public BaseClass
- {
- public:
- Class3_twoNested() { RegisterObject(Class3_twoNested); }
- Nested1 nested1_;
- Nested2 nested2_;
- };
-
- class Class4_class1Nested : public BaseClass
- {
- public:
- Class4_class1Nested() { RegisterObject(Class4_class1Nested); }
- Class1_notNested nested_;
- };
-
- class Class5_class2Nested : public BaseClass
- {
- public:
- Class5_class2Nested() { RegisterObject(Class5_class2Nested); }
- Class2_oneNested nested_;
- };
-
- class Class6_class3Nested : public BaseClass
- {
- public:
- Class6_class3Nested() { RegisterObject(Class6_class3Nested); }
- Class3_twoNested nested_;
- };
-
- class Class3_Child : public Class3_twoNested
- {
- public:
- Class3_Child() { RegisterObject(Class3_Child); }
- };
-
- class Class6_Child : public Class6_class3Nested
- {
- public:
- Class6_Child() { RegisterObject(Class6_Child); }
- };
-
- RegisterClassNoArgs(Nested1);
- RegisterClassNoArgs(Nested2);
- RegisterClassNoArgs(BaseClass);
- RegisterClassNoArgs(Class1_notNested);
- RegisterClassNoArgs(Class2_oneNested);
- RegisterClassNoArgs(Class3_twoNested);
- RegisterClassNoArgs(Class4_class1Nested);
- RegisterClassNoArgs(Class5_class2Nested);
- RegisterClassNoArgs(Class6_class3Nested);
- RegisterClassNoArgs(Class3_Child);
- RegisterClassNoArgs(Class6_Child);
-
- // Fixture
- class IdentifierNestedClassHierarchyTest : public ::testing::Test
- {
- public:
- virtual void SetUp()
- {
- new IdentifierManager();
- ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- Context::setRootContext(new Context(NULL));
- Identifier::initConfigValues_s = false; // TODO: hack!
- IdentifierManager::getInstance().createClassHierarchy();
- }
-
- virtual void TearDown()
- {
- IdentifierManager::getInstance().destroyClassHierarchy();
- Context::destroyRootContext();
- ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
- delete &IdentifierManager::getInstance();
- }
- };
-
- bool contains(const std::list<const Identifier*> identifiers, Identifier* identifier)
- {
- return std::find(identifiers.begin(), identifiers.end(), identifier) != identifiers.end();
- }
-
- bool contains(const std::set<const Identifier*> identifiers, Identifier* identifier)
- {
- return identifiers.find(identifier) != identifiers.end();
- }
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestNested1)
- {
- Identifier* identifier = Class(Nested1);
-
- EXPECT_EQ(0u, identifier->getDirectChildren().size());
- EXPECT_EQ(0u, identifier->getChildren().size());
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
-
- EXPECT_EQ(4u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestNested2)
- {
- Identifier* identifier = Class(Nested2);
-
- EXPECT_EQ(0u, identifier->getDirectChildren().size());
- EXPECT_EQ(0u, identifier->getChildren().size());
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
-
- EXPECT_EQ(4u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestBaseClass)
- {
- Identifier* identifier = Class(BaseClass);
-
- EXPECT_EQ(6u, identifier->getDirectChildren().size());
- EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class1_notNested)));
- EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class2_oneNested)));
- EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class3_twoNested)));
- EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class4_class1Nested)));
- EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class5_class2Nested)));
- EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class6_class3Nested)));
-
- EXPECT_EQ(8u, identifier->getChildren().size());
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class1_notNested)));
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class2_oneNested)));
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class3_twoNested)));
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class4_class1Nested)));
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class5_class2Nested)));
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class6_class3Nested)));
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class3_Child)));
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class6_Child)));
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
-
- EXPECT_EQ(4u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestClass1_notNested)
- {
- Identifier* identifier = Class(Class1_notNested);
-
- EXPECT_EQ(0u, identifier->getDirectChildren().size());
- EXPECT_EQ(0u, identifier->getChildren().size());
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
-
- EXPECT_EQ(5u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestClass2_oneNested)
- {
- Identifier* identifier = Class(Class2_oneNested);
-
- EXPECT_EQ(0u, identifier->getDirectChildren().size());
- EXPECT_EQ(0u, identifier->getChildren().size());
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
-
- EXPECT_EQ(5u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestClass3_twoNested)
- {
- Identifier* identifier = Class(Class3_twoNested);
-
- EXPECT_EQ(1u, identifier->getDirectChildren().size());
- EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class3_Child)));
-
- EXPECT_EQ(1u, identifier->getChildren().size());
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class3_Child)));
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
-
- EXPECT_EQ(5u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestClass4_class1Nested)
- {
- Identifier* identifier = Class(Class4_class1Nested);
-
- EXPECT_EQ(0u, identifier->getDirectChildren().size());
- EXPECT_EQ(0u, identifier->getChildren().size());
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
-
- EXPECT_EQ(5u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestClass5_class2Nested)
- {
- Identifier* identifier = Class(Class5_class2Nested);
-
- EXPECT_EQ(0u, identifier->getDirectChildren().size());
- EXPECT_EQ(0u, identifier->getChildren().size());
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
-
- EXPECT_EQ(5u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestClass6_class3Nested)
- {
- Identifier* identifier = Class(Class6_class3Nested);
-
- EXPECT_EQ(1u, identifier->getDirectChildren().size());
- EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class6_Child)));
-
- EXPECT_EQ(1u, identifier->getChildren().size());
- EXPECT_TRUE(contains(identifier->getChildren(), Class(Class6_Child)));
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
-
- EXPECT_EQ(5u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestClass3_Child)
- {
- Identifier* identifier = Class(Class3_Child);
-
- EXPECT_EQ(0u, identifier->getDirectChildren().size());
- EXPECT_EQ(0u, identifier->getChildren().size());
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Class3_twoNested)));
-
- EXPECT_EQ(6u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Class3_twoNested)));
- }
-
- TEST_F(IdentifierNestedClassHierarchyTest, TestClass6_Child)
- {
- Identifier* identifier = Class(Class6_Child);
-
- EXPECT_EQ(0u, identifier->getDirectChildren().size());
- EXPECT_EQ(0u, identifier->getChildren().size());
-
- EXPECT_EQ(1u, identifier->getDirectParents().size());
- EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Class6_class3Nested)));
-
- EXPECT_EQ(6u, identifier->getParents().size());
- EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
- EXPECT_TRUE(contains(identifier->getParents(), Class(Class6_class3Nested)));
- }
-}
+#include <gtest/gtest.h>
+#include "core/CoreIncludes.h"
+#include "core/class/Identifiable.h"
+#include "core/class/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
+#include "core/module/ModuleInstance.h"
+
+namespace orxonox
+{
+ // Tests the class hierarchy with classes that contain other classes as members.
+ //
+ // +------ Nested1 +------ Class1_notNested
+ // +------ Nested2 +------ Class2_oneNested
+ // OrxonoxClass <-----+------ BaseClass <-----+------ Class3_twoNested <----------- Class3_Child
+ // +------ Class4_class1Nested
+ // +------ Class5_class2Nested
+ // +------ Class6_class3Nested <-------- Class6_Child
+
+ namespace
+ {
+ class Nested1 : public OrxonoxClass
+ {
+ public:
+ Nested1() { RegisterObject(Nested1); }
+ };
+
+ class Nested2 : public OrxonoxClass
+ {
+ public:
+ Nested2() { RegisterObject(Nested2); }
+ };
+
+ class BaseClass : public OrxonoxClass
+ {
+ public:
+ BaseClass() { RegisterObject(BaseClass); }
+ };
+
+ class Class1_notNested : public BaseClass
+ {
+ public:
+ Class1_notNested() { RegisterObject(Class1_notNested); }
+ };
+
+ class Class2_oneNested : public BaseClass
+ {
+ public:
+ Class2_oneNested() { RegisterObject(Class2_oneNested); }
+ Nested1 nested1_;
+ };
+
+ class Class3_twoNested : public BaseClass
+ {
+ public:
+ Class3_twoNested() { RegisterObject(Class3_twoNested); }
+ Nested1 nested1_;
+ Nested2 nested2_;
+ };
+
+ class Class4_class1Nested : public BaseClass
+ {
+ public:
+ Class4_class1Nested() { RegisterObject(Class4_class1Nested); }
+ Class1_notNested nested_;
+ };
+
+ class Class5_class2Nested : public BaseClass
+ {
+ public:
+ Class5_class2Nested() { RegisterObject(Class5_class2Nested); }
+ Class2_oneNested nested_;
+ };
+
+ class Class6_class3Nested : public BaseClass
+ {
+ public:
+ Class6_class3Nested() { RegisterObject(Class6_class3Nested); }
+ Class3_twoNested nested_;
+ };
+
+ class Class3_Child : public Class3_twoNested
+ {
+ public:
+ Class3_Child() { RegisterObject(Class3_Child); }
+ };
+
+ class Class6_Child : public Class6_class3Nested
+ {
+ public:
+ Class6_Child() { RegisterObject(Class6_Child); }
+ };
+
+ RegisterClassNoArgs(Nested1);
+ RegisterClassNoArgs(Nested2);
+ RegisterClassNoArgs(BaseClass);
+ RegisterClassNoArgs(Class1_notNested);
+ RegisterClassNoArgs(Class2_oneNested);
+ RegisterClassNoArgs(Class3_twoNested);
+ RegisterClassNoArgs(Class4_class1Nested);
+ RegisterClassNoArgs(Class5_class2Nested);
+ RegisterClassNoArgs(Class6_class3Nested);
+ RegisterClassNoArgs(Class3_Child);
+ RegisterClassNoArgs(Class6_Child);
+
+ // Fixture
+ class IdentifierNestedClassHierarchyTest : public ::testing::Test
+ {
+ public:
+ virtual void SetUp()
+ {
+ new IdentifierManager();
+ ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+ Context::setRootContext(new Context(NULL));
+ Identifier::initConfigValues_s = false; // TODO: hack!
+ IdentifierManager::getInstance().createClassHierarchy();
+ }
+
+ virtual void TearDown()
+ {
+ IdentifierManager::getInstance().destroyClassHierarchy();
+ Context::destroyRootContext();
+ ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances(StaticInitialization::IDENTIFIER);
+ delete &IdentifierManager::getInstance();
+ }
+ };
+
+ bool contains(const std::list<const Identifier*> identifiers, Identifier* identifier)
+ {
+ return std::find(identifiers.begin(), identifiers.end(), identifier) != identifiers.end();
+ }
+
+ bool contains(const std::set<const Identifier*> identifiers, Identifier* identifier)
+ {
+ return identifiers.find(identifier) != identifiers.end();
+ }
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestNested1)
+ {
+ Identifier* identifier = Class(Nested1);
+
+ EXPECT_EQ(0u, identifier->getDirectChildren().size());
+ EXPECT_EQ(0u, identifier->getChildren().size());
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
+
+ EXPECT_EQ(4u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestNested2)
+ {
+ Identifier* identifier = Class(Nested2);
+
+ EXPECT_EQ(0u, identifier->getDirectChildren().size());
+ EXPECT_EQ(0u, identifier->getChildren().size());
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
+
+ EXPECT_EQ(4u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestBaseClass)
+ {
+ Identifier* identifier = Class(BaseClass);
+
+ EXPECT_EQ(6u, identifier->getDirectChildren().size());
+ EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class1_notNested)));
+ EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class2_oneNested)));
+ EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class3_twoNested)));
+ EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class4_class1Nested)));
+ EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class5_class2Nested)));
+ EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class6_class3Nested)));
+
+ EXPECT_EQ(8u, identifier->getChildren().size());
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class1_notNested)));
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class2_oneNested)));
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class3_twoNested)));
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class4_class1Nested)));
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class5_class2Nested)));
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class6_class3Nested)));
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class3_Child)));
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class6_Child)));
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(OrxonoxClass)));
+
+ EXPECT_EQ(4u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestClass1_notNested)
+ {
+ Identifier* identifier = Class(Class1_notNested);
+
+ EXPECT_EQ(0u, identifier->getDirectChildren().size());
+ EXPECT_EQ(0u, identifier->getChildren().size());
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
+
+ EXPECT_EQ(5u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestClass2_oneNested)
+ {
+ Identifier* identifier = Class(Class2_oneNested);
+
+ EXPECT_EQ(0u, identifier->getDirectChildren().size());
+ EXPECT_EQ(0u, identifier->getChildren().size());
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
+
+ EXPECT_EQ(5u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestClass3_twoNested)
+ {
+ Identifier* identifier = Class(Class3_twoNested);
+
+ EXPECT_EQ(1u, identifier->getDirectChildren().size());
+ EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class3_Child)));
+
+ EXPECT_EQ(1u, identifier->getChildren().size());
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class3_Child)));
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
+
+ EXPECT_EQ(5u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestClass4_class1Nested)
+ {
+ Identifier* identifier = Class(Class4_class1Nested);
+
+ EXPECT_EQ(0u, identifier->getDirectChildren().size());
+ EXPECT_EQ(0u, identifier->getChildren().size());
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
+
+ EXPECT_EQ(5u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestClass5_class2Nested)
+ {
+ Identifier* identifier = Class(Class5_class2Nested);
+
+ EXPECT_EQ(0u, identifier->getDirectChildren().size());
+ EXPECT_EQ(0u, identifier->getChildren().size());
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
+
+ EXPECT_EQ(5u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestClass6_class3Nested)
+ {
+ Identifier* identifier = Class(Class6_class3Nested);
+
+ EXPECT_EQ(1u, identifier->getDirectChildren().size());
+ EXPECT_TRUE(contains(identifier->getDirectChildren(), Class(Class6_Child)));
+
+ EXPECT_EQ(1u, identifier->getChildren().size());
+ EXPECT_TRUE(contains(identifier->getChildren(), Class(Class6_Child)));
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(BaseClass)));
+
+ EXPECT_EQ(5u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestClass3_Child)
+ {
+ Identifier* identifier = Class(Class3_Child);
+
+ EXPECT_EQ(0u, identifier->getDirectChildren().size());
+ EXPECT_EQ(0u, identifier->getChildren().size());
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Class3_twoNested)));
+
+ EXPECT_EQ(6u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Class3_twoNested)));
+ }
+
+ TEST_F(IdentifierNestedClassHierarchyTest, TestClass6_Child)
+ {
+ Identifier* identifier = Class(Class6_Child);
+
+ EXPECT_EQ(0u, identifier->getDirectChildren().size());
+ EXPECT_EQ(0u, identifier->getChildren().size());
+
+ EXPECT_EQ(1u, identifier->getDirectParents().size());
+ EXPECT_TRUE(contains(identifier->getDirectParents(), Class(Class6_class3Nested)));
+
+ EXPECT_EQ(6u, identifier->getParents().size());
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Identifiable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Listable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Configurable)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(OrxonoxClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(BaseClass)));
+ EXPECT_TRUE(contains(identifier->getParents(), Class(Class6_class3Nested)));
+ }
+}
Property changes on: code/branches/presentationHS15/test/core/class/IdentifierNestedClassHierarchyTest.cc
___________________________________________________________________
Added: svn:eol-style
+ native
More information about the Orxonox-commit
mailing list