Move stream operator declarations into the same file as their types
This commit is contained in:
@@ -116,7 +116,14 @@ inline bool isDead(eMainStatus stat) {
|
|||||||
|
|
||||||
std::ostream& operator << (std::ostream& out, eStatus e);
|
std::ostream& operator << (std::ostream& out, eStatus e);
|
||||||
std::istream& operator >> (std::istream& in, eStatus& e);
|
std::istream& operator >> (std::istream& in, eStatus& e);
|
||||||
|
std::istream& operator >> (std::istream& in, ePartyStatus& type);
|
||||||
|
std::ostream& operator << (std::ostream& out, ePartyStatus type);
|
||||||
|
std::ostream& operator << (std::ostream& out, eMainStatus e);
|
||||||
|
std::istream& operator >> (std::istream& in, eMainStatus& e);
|
||||||
std::ostream& operator << (std::ostream& out, eDamageType e);
|
std::ostream& operator << (std::ostream& out, eDamageType e);
|
||||||
std::istream& operator >> (std::istream& in, eDamageType& e);
|
std::istream& operator >> (std::istream& in, eDamageType& e);
|
||||||
|
|
||||||
|
void operator += (eMainStatus& stat, eMainStatus othr);
|
||||||
|
void operator -= (eMainStatus& stat, eMainStatus othr);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -61,15 +61,6 @@ public:
|
|||||||
void readFrom(std::istream& sin);
|
void readFrom(std::istream& sin);
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator << (std::ostream& out, eItemType e);
|
|
||||||
std::ostream& operator << (std::ostream& out, eItemAbil e);
|
|
||||||
std::istream& operator >> (std::istream& in, eItemType& e);
|
|
||||||
std::istream& operator >> (std::istream& in, eItemAbil& e);
|
|
||||||
std::ostream& operator << (std::ostream& out, eSkill e);
|
|
||||||
std::istream& operator >> (std::istream& in, eSkill& e);
|
|
||||||
std::ostream& operator << (std::ostream& out, eItemUse e);
|
|
||||||
std::istream& operator >> (std::istream& in, eItemUse& e);
|
|
||||||
|
|
||||||
class cSpecItem {
|
class cSpecItem {
|
||||||
public:
|
public:
|
||||||
short flags = 0;
|
short flags = 0;
|
||||||
|
@@ -111,4 +111,7 @@ inline eItemAbilCat getItemAbilCategory(eItemAbil abil) {
|
|||||||
return eItemAbilCat::INVALID;
|
return eItemAbilCat::INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::ostream& operator << (std::ostream& out, eItemAbil e);
|
||||||
|
std::istream& operator >> (std::istream& in, eItemAbil& e);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -62,4 +62,9 @@ enum class eItemUse {HELP_ONE, HARM_ONE, HELP_ALL, HARM_ALL};
|
|||||||
|
|
||||||
enum class eEnchant {PLUS_ONE, PLUS_TWO, PLUS_THREE, SHOOT_FLAME, FLAMING, PLUS_FIVE, BLESSED};
|
enum class eEnchant {PLUS_ONE, PLUS_TWO, PLUS_THREE, SHOOT_FLAME, FLAMING, PLUS_FIVE, BLESSED};
|
||||||
|
|
||||||
|
std::ostream& operator << (std::ostream& out, eItemUse e);
|
||||||
|
std::istream& operator >> (std::istream& in, eItemUse& e);
|
||||||
|
std::ostream& operator << (std::ostream& out, eItemType e);
|
||||||
|
std::istream& operator >> (std::istream& in, eItemType& e);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -22,4 +22,7 @@ public:
|
|||||||
std::string descr;
|
std::string descr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::istream& operator>>(std::istream& in, eQuestStatus& type);
|
||||||
|
std::ostream& operator<<(std::ostream& out, eQuestStatus type);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -49,13 +49,4 @@ public:
|
|||||||
void writeTo(std::ostream& file) const;
|
void writeTo(std::ostream& file) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator << (std::ostream& out, eTerSpec e);
|
|
||||||
std::istream& operator >> (std::istream& in, eTerSpec& e);
|
|
||||||
std::ostream& operator << (std::ostream& out, eTrimType e);
|
|
||||||
std::istream& operator >> (std::istream& in, eTrimType& e);
|
|
||||||
std::ostream& operator << (std::ostream& out, eTerObstruct e);
|
|
||||||
std::istream& operator >> (std::istream& in, eTerObstruct& e);
|
|
||||||
std::ostream& operator << (std::ostream& out, eStepSnd e);
|
|
||||||
std::istream& operator >> (std::istream& in, eStepSnd& e);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -86,4 +86,13 @@ inline bool blocksMove(eTerObstruct block) {
|
|||||||
|
|
||||||
enum class eStepSnd {STEP, SQUISH, CRUNCH, NONE, SPLASH};
|
enum class eStepSnd {STEP, SQUISH, CRUNCH, NONE, SPLASH};
|
||||||
|
|
||||||
|
std::ostream& operator << (std::ostream& out, eTerSpec e);
|
||||||
|
std::istream& operator >> (std::istream& in, eTerSpec& e);
|
||||||
|
std::ostream& operator << (std::ostream& out, eTrimType e);
|
||||||
|
std::istream& operator >> (std::istream& in, eTrimType& e);
|
||||||
|
std::ostream& operator << (std::ostream& out, eTerObstruct e);
|
||||||
|
std::istream& operator >> (std::istream& in, eTerObstruct& e);
|
||||||
|
std::ostream& operator << (std::ostream& out, eStepSnd e);
|
||||||
|
std::istream& operator >> (std::istream& in, eStepSnd& e);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -60,4 +60,9 @@ enum class eTrait {
|
|||||||
ANAMA = 16,
|
ANAMA = 16,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::ostream& operator << (std::ostream& out, eSkill e);
|
||||||
|
std::istream& operator >> (std::istream& in, eSkill& e);
|
||||||
|
std::ostream& operator << (std::ostream& out, eTrait e);
|
||||||
|
std::istream& operator >> (std::istream& in, eTrait& e);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -236,9 +236,5 @@ bool operator==(const cParty::cEncNote& one, const cParty::cEncNote& two);
|
|||||||
|
|
||||||
std::istream& operator>>(std::istream& in, eEncNoteType& type);
|
std::istream& operator>>(std::istream& in, eEncNoteType& type);
|
||||||
std::ostream& operator<<(std::ostream& out, eEncNoteType type);
|
std::ostream& operator<<(std::ostream& out, eEncNoteType type);
|
||||||
std::istream& operator>>(std::istream& in, ePartyStatus& type);
|
|
||||||
std::ostream& operator<<(std::ostream& out, ePartyStatus type);
|
|
||||||
std::istream& operator>>(std::istream& in, eQuestStatus& type);
|
|
||||||
std::ostream& operator<<(std::ostream& out, eQuestStatus type);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -176,11 +176,4 @@ public:
|
|||||||
cPlayer& operator=(cPlayer other) = delete;
|
cPlayer& operator=(cPlayer other) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
void operator += (eMainStatus& stat, eMainStatus othr);
|
|
||||||
void operator -= (eMainStatus& stat, eMainStatus othr);
|
|
||||||
std::ostream& operator << (std::ostream& out, eMainStatus e);
|
|
||||||
std::istream& operator >> (std::istream& in, eMainStatus& e);
|
|
||||||
std::ostream& operator << (std::ostream& out, eTrait e);
|
|
||||||
std::istream& operator >> (std::istream& in, eTrait& e);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user