From: Daniel Karbach Date: Sat, 29 Sep 2012 17:18:44 +0000 (+0200) Subject: added forwarding headers X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=2a1d9169e1f6c2dfe0f93ed40d5fb68d3da342af;p=l2e.git added forwarding headers --- diff --git a/src/app/Application.h b/src/app/Application.h index cf1261b..b7b0001 100644 --- a/src/app/Application.h +++ b/src/app/Application.h @@ -8,6 +8,7 @@ #ifndef APP_APPLICATION_H_ #define APP_APPLICATION_H_ +#include "fwd.h" #include "Input.h" #include "Timer.h" #include "../sdl/InitScreen.h" @@ -19,8 +20,6 @@ namespace app { -class State; - class Application { public: diff --git a/src/app/State.h b/src/app/State.h index c74043b..958e423 100644 --- a/src/app/State.h +++ b/src/app/State.h @@ -8,15 +8,13 @@ #ifndef APP_APPLICATIONSTATE_H_ #define APP_APPLICATIONSTATE_H_ +#include "fwd.h" #include "Timer.h" #include namespace app { -class Application; -class Input; - class State { public: diff --git a/src/app/fwd.h b/src/app/fwd.h new file mode 100644 index 0000000..7249010 --- /dev/null +++ b/src/app/fwd.h @@ -0,0 +1,26 @@ +/* + * fwd.h + * + * Created on: Sep 29, 2012 + * Author: holy + */ + +#ifndef APP_FWD_H_ +#define APP_FWD_H_ + +namespace app { + +class Application; +class Arguments; +class Input; +class State; +template +struct TimerData; +template +class Timer; +template +class Timers; + +} + +#endif /* APP_FWD_H_ */ diff --git a/src/battle/AttackChoice.h b/src/battle/AttackChoice.h index 8cba235..d332b26 100644 --- a/src/battle/AttackChoice.h +++ b/src/battle/AttackChoice.h @@ -9,12 +9,7 @@ #define BATTLE_ATTACKCHOICE_H_ #include "TargetSelection.h" - -namespace common { - class Ikari; - class Item; - class Spell; -} +#include "../common/fwd.h" namespace battle { diff --git a/src/battle/BattleState.h b/src/battle/BattleState.h index 806b4af..fbaa1d0 100644 --- a/src/battle/BattleState.h +++ b/src/battle/BattleState.h @@ -8,6 +8,7 @@ #ifndef BATTLE_BATTLESTATE_H_ #define BATTLE_BATTLESTATE_H_ +#include "fwd.h" #include "AttackTypeMenu.h" #include "Hero.h" #include "HeroTag.h" @@ -15,34 +16,20 @@ #include "MoveMenu.h" #include "Resources.h" #include "SmallHeroTag.h" +#include "../app/fwd.h" #include "../app/State.h" +#include "../common/fwd.h" #include "../geometry/Vector.h" #include "../graphics/Animation.h" +#include "../graphics/fwd.h" #include "../graphics/Menu.h" #include #include #include -namespace app { class Input; } -namespace common { - class Inventory; - class Item; - class Spell; -} -namespace graphics { - class Font; - class Frame; - class Gauge; - class Sprite; -} - namespace battle { -class AttackChoice; -class PartyLayout; -class Stats; - class BattleState : public app::State { diff --git a/src/battle/Hero.h b/src/battle/Hero.h index c15c2dc..385962f 100644 --- a/src/battle/Hero.h +++ b/src/battle/Hero.h @@ -8,27 +8,20 @@ #ifndef BATTLE_HERO_H_ #define BATTLE_HERO_H_ +#include "fwd.h" #include "AttackChoice.h" #include "Stats.h" +#include "../common/fwd.h" #include "../geometry/Vector.h" #include "../graphics/Animation.h" +#include "../graphics/fwd.h" #include "../graphics/Menu.h" #include #include -namespace common { - class Item; - class Spell; -} -namespace graphics { - class Sprite; -} - namespace battle { -class Resources; - class Hero { public: diff --git a/src/battle/HeroTag.h b/src/battle/HeroTag.h index 8750081..9ce1963 100644 --- a/src/battle/HeroTag.h +++ b/src/battle/HeroTag.h @@ -8,22 +8,15 @@ #ifndef BATTLE_HEROTAG_H_ #define BATTLE_HEROTAG_H_ +#include "fwd.h" #include "Hero.h" #include "../geometry/Vector.h" +#include "../graphics/fwd.h" #include -namespace graphics { - class Font; - class Frame; - class Gauge; - class Sprite; -} - namespace battle { -class BattleState; - class HeroTag { public: diff --git a/src/battle/Monster.h b/src/battle/Monster.h index e368dcc..3497c04 100644 --- a/src/battle/Monster.h +++ b/src/battle/Monster.h @@ -10,16 +10,13 @@ #include "AttackChoice.h" #include "Stats.h" +#include "../common/fwd.h" #include "../geometry/Vector.h" #include "../graphics/Animation.h" +#include "../graphics/fwd.h" #include -namespace common { class Item; } -namespace graphics { - class Sprite; -} - namespace battle { class Monster { diff --git a/src/battle/NumberAnimation.h b/src/battle/NumberAnimation.h index f753056..c198cd8 100644 --- a/src/battle/NumberAnimation.h +++ b/src/battle/NumberAnimation.h @@ -8,14 +8,9 @@ #ifndef BATTLE_NUMBERANIMATION_H_ #define BATTLE_NUMBERANIMATION_H_ -#include "../graphics/Animation.h" - +#include "../app/fwd.h" #include "../geometry/Vector.h" - -namespace app { - class Application; - class State; -} +#include "../graphics/Animation.h" namespace battle { diff --git a/src/battle/Resources.h b/src/battle/Resources.h index 9654fdc..5ef036f 100644 --- a/src/battle/Resources.h +++ b/src/battle/Resources.h @@ -8,24 +8,13 @@ #ifndef BATTLE_RESOURCES_H_ #define BATTLE_RESOURCES_H_ +#include "../common/fwd.h" #include "../graphics/Color.h" +#include "../graphics/fwd.h" #include "../graphics/Menu.h" #include -namespace common { - class Inventory; - class Item; - class Spell; -} -namespace graphics { - class Animation; - class Font; - class Frame; - class Gauge; - class Sprite; -} - namespace battle { struct Resources { diff --git a/src/battle/SmallHeroTag.h b/src/battle/SmallHeroTag.h index c17d540..62ada00 100644 --- a/src/battle/SmallHeroTag.h +++ b/src/battle/SmallHeroTag.h @@ -8,20 +8,14 @@ #ifndef BATTLE_SMALLHEROTAG_H_ #define BATTLE_SMALLHEROTAG_H_ +#include "fwd.h" #include "../geometry/Vector.h" +#include "../graphics/fwd.h" #include -namespace graphics { - class Font; - class Frame; - class Gauge; -} - namespace battle { -class BattleState; - class SmallHeroTag { public: diff --git a/src/battle/TargetSelection.h b/src/battle/TargetSelection.h index fd1d041..06d6f44 100644 --- a/src/battle/TargetSelection.h +++ b/src/battle/TargetSelection.h @@ -8,14 +8,13 @@ #ifndef BATTLE_TARGETSELECTION_H_ #define BATTLE_TARGETSELECTION_H_ -#include +#include "fwd.h" +#include "../common/fwd.h" -namespace common { class TargetingMode; } +#include namespace battle { -class BattleState; - class TargetSelection { public: diff --git a/src/battle/fwd.h b/src/battle/fwd.h new file mode 100644 index 0000000..5e629f3 --- /dev/null +++ b/src/battle/fwd.h @@ -0,0 +1,38 @@ +/* + * fwd.h + * + * Created on: Sep 29, 2012 + * Author: holy + */ + +#ifndef BATTLE_FWD_H_ +#define BATTLE_FWD_H_ + +namespace battle { + +class AttackChoice; +class AttackTypeMenu; +class BattleState; +class Hero; +class HeroTag; +class Monster; +class MoveMenu; +class NumberAnimation; +class PartyLayout; +class PerformAttacks; +struct Resources; +class RunState; +class SelectAttackType; +class SelectIkari; +class SelectItem; +class SelectMoveAction; +class SelectSpell; +class SelectTarget; +class SmallHeroTag; +class Stats; +class SwapHeroes; +class TargetSelection; + +} + +#endif /* BATTLE_FWD_H_ */ diff --git a/src/battle/states/RunState.h b/src/battle/states/RunState.h index 61c5270..7af5461 100644 --- a/src/battle/states/RunState.h +++ b/src/battle/states/RunState.h @@ -8,14 +8,12 @@ #ifndef BATTLE_RUNSTATE_H_ #define BATTLE_RUNSTATE_H_ +#include "../fwd.h" #include "../../app/State.h" - #include "../../geometry/Vector.h" namespace battle { -class BattleState; - class RunState : public app::State { diff --git a/src/battle/states/SelectAttackType.h b/src/battle/states/SelectAttackType.h index 5679940..17298b2 100644 --- a/src/battle/states/SelectAttackType.h +++ b/src/battle/states/SelectAttackType.h @@ -8,14 +8,12 @@ #ifndef BATTLE_SELECTATTACKTYPE_H_ #define BATTLE_SELECTATTACKTYPE_H_ +#include "../fwd.h" #include "../../app/State.h" #include "../../geometry/Vector.h" namespace battle { -class AttackTypeMenu; -class BattleState; - class SelectAttackType : public app::State { diff --git a/src/battle/states/SelectIkari.h b/src/battle/states/SelectIkari.h index 02b0e25..8e565c4 100644 --- a/src/battle/states/SelectIkari.h +++ b/src/battle/states/SelectIkari.h @@ -8,15 +8,12 @@ #ifndef BATTLE_SELECTIKARI_H_ #define BATTLE_SELECTIKARI_H_ +#include "../fwd.h" #include "../../app/State.h" - #include "../../geometry/Vector.h" namespace battle { -class BattleState; -class SelectAttackType; - // TODO: looks like item, spell, and ikari select can be merged into one class class SelectIkari : public app::State { diff --git a/src/battle/states/SelectItem.h b/src/battle/states/SelectItem.h index a4540bb..3d03d2f 100644 --- a/src/battle/states/SelectItem.h +++ b/src/battle/states/SelectItem.h @@ -8,15 +8,12 @@ #ifndef BATTLE_SELECTITEM_H_ #define BATTLE_SELECTITEM_H_ +#include "../fwd.h" #include "../../app/State.h" - #include "../../geometry/Vector.h" namespace battle { -class BattleState; -class SelectAttackType; - class SelectItem : public app::State { diff --git a/src/battle/states/SelectMoveAction.h b/src/battle/states/SelectMoveAction.h index 4f88c4f..8a28468 100644 --- a/src/battle/states/SelectMoveAction.h +++ b/src/battle/states/SelectMoveAction.h @@ -8,14 +8,12 @@ #ifndef BATTLE_SELECTMOVEACTION_H_ #define BATTLE_SELECTMOVEACTION_H_ +#include "../fwd.h" #include "../../app/State.h" #include "../../geometry/Vector.h" namespace battle { -class BattleState; -class MoveMenu; - class SelectMoveAction : public app::State { diff --git a/src/battle/states/SelectSpell.h b/src/battle/states/SelectSpell.h index 5251a9d..38d2c39 100644 --- a/src/battle/states/SelectSpell.h +++ b/src/battle/states/SelectSpell.h @@ -8,15 +8,12 @@ #ifndef BATTLE_SELECTSPELL_H_ #define BATTLE_SELECTSPELL_H_ +#include "../fwd.h" #include "../../app/State.h" - #include "../../geometry/Vector.h" namespace battle { -class BattleState; -class SelectAttackType; - class SelectSpell : public app::State { diff --git a/src/battle/states/SelectTarget.h b/src/battle/states/SelectTarget.h index b4eb312..9bd51f5 100644 --- a/src/battle/states/SelectTarget.h +++ b/src/battle/states/SelectTarget.h @@ -8,18 +8,13 @@ #ifndef BATTLE_SELECTTARGET_H_ #define BATTLE_SELECTTARGET_H_ +#include "../fwd.h" #include "../../app/State.h" - #include "../../geometry/Vector.h" - -namespace graphics { class Sprite; } +#include "../../graphics/fwd.h" namespace battle { -class BattleState; -class TargetSelection; -class SelectAttackType; - class SelectTarget : public app::State { diff --git a/src/battle/states/SwapHeroes.h b/src/battle/states/SwapHeroes.h index 109a1f0..8ad9298 100644 --- a/src/battle/states/SwapHeroes.h +++ b/src/battle/states/SwapHeroes.h @@ -8,15 +8,12 @@ #ifndef BATTLE_SWAPHEROES_H_ #define BATTLE_SWAPHEROES_H_ +#include "../fwd.h" #include "../../app/State.h" - #include "../../geometry/Vector.h" namespace battle { -class BattleState; -class SelectMoveAction; - class SwapHeroes : public app::State { diff --git a/src/common/Inventory.h b/src/common/Inventory.h index 2443078..f60b9ab 100644 --- a/src/common/Inventory.h +++ b/src/common/Inventory.h @@ -8,12 +8,12 @@ #ifndef COMMON_INVENTORY_H_ #define COMMON_INVENTORY_H_ +#include "fwd.h" + #include namespace common { -class Item; - class Inventory { public: diff --git a/src/common/Item.h b/src/common/Item.h index 1af15f3..eb60891 100644 --- a/src/common/Item.h +++ b/src/common/Item.h @@ -8,20 +8,15 @@ #ifndef COMMON_ITEM_H_ #define COMMON_ITEM_H_ +#include "fwd.h" #include "HeroGroup.h" #include "TargetingMode.h" +#include "../graphics/fwd.h" #include -namespace graphics { - class Animation; - class Sprite; -} - namespace common { -class Ikari; - class Item { public: diff --git a/src/common/fwd.h b/src/common/fwd.h new file mode 100644 index 0000000..6238cbf --- /dev/null +++ b/src/common/fwd.h @@ -0,0 +1,22 @@ +/* + * fwd.h + * + * Created on: Sep 29, 2012 + * Author: holy + */ + +#ifndef COMMON_FWD_H_ +#define COMMON_FWD_H_ + +namespace common { + +class HeroGroup; +class Ikari; +class Inventory; +class Item; +class Spell; +class TargetingMode; + +} + +#endif /* COMMON_FWD_H_ */ diff --git a/src/geometry/fwd.h b/src/geometry/fwd.h new file mode 100644 index 0000000..e727f65 --- /dev/null +++ b/src/geometry/fwd.h @@ -0,0 +1,18 @@ +/* + * fwd.h + * + * Created on: Sep 29, 2012 + * Author: holy + */ + +#ifndef GEOMERTY_FWD_H_ +#define GEOMERTY_FWD_H_ + +namespace geometry { + +template +class Vector; + +} + +#endif /* GEOMERTY_FWD_H_ */ diff --git a/src/graphics/Animation.h b/src/graphics/Animation.h index 29948fe..cfdb146 100644 --- a/src/graphics/Animation.h +++ b/src/graphics/Animation.h @@ -12,15 +12,12 @@ #include "../app/Application.h" #include "../app/State.h" #include "../app/Timer.h" +#include "../loader/fwd.h" #include "../geometry/Vector.h" #include #include -namespace loader { - class TypeDescription; -} - namespace graphics { class Animation { diff --git a/src/graphics/Menu.h b/src/graphics/Menu.h index e962738..b581fe2 100644 --- a/src/graphics/Menu.h +++ b/src/graphics/Menu.h @@ -9,6 +9,7 @@ #define GRAPHICS_MENU_H_ #include "Font.h" +#include "fwd.h" #include "Sprite.h" #include "../geometry/Vector.h" @@ -17,8 +18,6 @@ namespace graphics { -class Sprite; - struct MenuProperties { const Font *font; const Font *disabledFont; diff --git a/src/graphics/fwd.h b/src/graphics/fwd.h new file mode 100644 index 0000000..e6cf864 --- /dev/null +++ b/src/graphics/fwd.h @@ -0,0 +1,28 @@ +/* + * fwd.h + * + * Created on: Sep 29, 2012 + * Author: holy + */ + +#ifndef GRAPHICS_FWD_H_ +#define GRAPHICS_FWD_H_ + +namespace graphics { + +class Animation; +class AnimationRunner; +class Color; +class ComplexAnimation; +class Font; +class Frame; +class Gauge; +template +class Menu; +struct MenuProperties; +class SimpleAnimation; +class Sprite; + +} + +#endif /* GRAPHICS_FWD_H_ */ diff --git a/src/loader/Caster.h b/src/loader/Caster.h index 2718fc0..72a92aa 100644 --- a/src/loader/Caster.h +++ b/src/loader/Caster.h @@ -9,21 +9,11 @@ #define LOADER_CASTER_H_ #include "Interpreter.h" +#include "../battle/fwd.h" +#include "../common/fwd.h" #include -namespace battle { - class Hero; - class Monster; - class PartyLayout; - class Resources; -} - -namespace common { - class Item; - class Spell; -} - namespace loader { class Caster { diff --git a/src/loader/Interpreter.h b/src/loader/Interpreter.h index bfe18c2..9e90bcc 100644 --- a/src/loader/Interpreter.h +++ b/src/loader/Interpreter.h @@ -8,11 +8,15 @@ #ifndef LOADER_INTERPRETER_H_ #define LOADER_INTERPRETER_H_ +#include "fwd.h" #include "ParsedSource.h" #include "TypeDescription.h" +#include "../battle/fwd.h" +#include "../common/fwd.h" #include "../geometry/Vector.h" #include "../graphics/Color.h" #include "../graphics/ComplexAnimation.h" +#include "../graphics/fwd.h" #include #include @@ -21,38 +25,8 @@ #include #include -namespace battle { - class Hero; - class Monster; - class PartyLayout; - struct Resources; - class Stats; -} - -namespace common { - class Ikari; - class Item; - class Spell; - class TargetingMode; -} - -namespace graphics { - class Animation; - class Font; - class Frame; - class Gauge; - struct MenuProperties; - class SimpleAnimation; - class Sprite; -} - namespace loader { -class Definition; -class Literal; -class PropertyList; -class Value; - class Interpreter { public: diff --git a/src/loader/ParsedSource.h b/src/loader/ParsedSource.h index 5012729..64baaaa 100644 --- a/src/loader/ParsedSource.h +++ b/src/loader/ParsedSource.h @@ -8,6 +8,8 @@ #ifndef LOADER_PARSEDSOURCE_H_ #define LOADER_PARSEDSOURCE_H_ +#include "fwd.h" + #include #include #include @@ -16,9 +18,6 @@ namespace loader { -class PropertyList; -class Value; - class Literal { public: diff --git a/src/loader/Parser.h b/src/loader/Parser.h index fd8f2cf..392e9b7 100644 --- a/src/loader/Parser.h +++ b/src/loader/Parser.h @@ -8,6 +8,7 @@ #ifndef LOADER_PARSER_H_ #define LOADER_PARSER_H_ +#include "fwd.h" #include "ParsedSource.h" #include "Tokenizer.h" @@ -18,11 +19,6 @@ namespace loader { -class Declaration; -class Definition; -class Literal; -class PropertyList; - class Parser { public: diff --git a/src/loader/fwd.h b/src/loader/fwd.h new file mode 100644 index 0000000..cdb2eaf --- /dev/null +++ b/src/loader/fwd.h @@ -0,0 +1,28 @@ +/* + * fwd.h + * + * Created on: Sep 29, 2012 + * Author: holy + */ + +#ifndef LOADER_FWD_H_ +#define LOADER_FWD_H_ + +namespace loader { + +class Caster; +class Declaration; +class Definition; +class FieldDescription; +class Interpreter; +class Literal; +class ParsedSource; +class Parser; +class PropertyList; +class Tokenizer; +class TypeDescription; +class Value; + +} + +#endif /* LOADER_FWD_H_ */