Improved EC and tests readability
This commit is contained in:
@@ -62,7 +62,7 @@ class EntityConverter
|
||||
* THROWS: std::ios::failure on IO failure
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
EntityConverter(const std::string &entityMapFile);
|
||||
EntityConverter (const std::string &entityMapFile);
|
||||
/* *--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
* Method: Constructor
|
||||
@@ -73,7 +73,7 @@ class EntityConverter
|
||||
* THROWS: std::ios::failure on IO failure
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
EntityConverter(const std::string &entityMapFile, const std::string &reflexMapFile);
|
||||
EntityConverter (const std::string &entityMapFile, const std::string &reflexMapFile);
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -86,7 +86,7 @@ class EntityConverter
|
||||
* THROWS: runtime_error when called before map info has been extracted
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
std::vector<std::string> convert(const std::vector<std::string> &lines);
|
||||
std::vector<std::string> convert (const std::vector<std::string> &lines);
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -97,7 +97,7 @@ class EntityConverter
|
||||
* THROWS: runtime_error when encountering malformed entity
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
void extractMapInfo(std::queue<std::vector<std::string>> entities);
|
||||
void extractMapInfo (std::queue<std::vector<std::string>> entities);
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -108,7 +108,7 @@ class EntityConverter
|
||||
* THROWS: runtime_error when encountering malformed entity
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
void extractMapInfo(const std::vector<std::vector<std::string>> &entities);
|
||||
void extractMapInfo (const std::vector<std::vector<std::string>> &entities);
|
||||
|
||||
|
||||
|
||||
@@ -124,14 +124,14 @@ class EntityConverter
|
||||
* Return: vector of strings, the converted entity
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
std::vector<std::string> convertPickup(const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertPlayerSpawn(const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertJumpPad(const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertTeleporter(const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertTarget(const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertRaceStart(const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertRaceFinish(const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertPointLight(const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertPickup (const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertPlayerSpawn (const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertJumpPad (const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertTeleporter (const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertTarget (const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertRaceStart (const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertRaceFinish (const std::vector<std::string> &lines) const;
|
||||
std::vector<std::string> convertPointLight (const std::vector<std::string> &lines) const;
|
||||
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
@@ -141,7 +141,7 @@ class EntityConverter
|
||||
* Parameter: string "line", entity keyword followed by the type
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
std::string getAttributeType(const std::string &line) const;
|
||||
std::string getAttributeType (const std::string &line) const;
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -151,7 +151,7 @@ class EntityConverter
|
||||
* Return: true if no error, false if error
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
void mapEntities(const std::string &mapFile);
|
||||
void mapEntities (const std::string &mapFile);
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -170,7 +170,7 @@ class EntityConverter
|
||||
* single entity
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
void extractFromEntity(const std::string &line, std::istream &is);
|
||||
void extractFromEntity (const std::string &line, std::istream &is);
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -182,7 +182,7 @@ class EntityConverter
|
||||
* Return: string, float value passed as string
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
std::string offset(const std::string &value, const float offset) const;
|
||||
std::string offset (const std::string &value, const float offset) const;
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -192,7 +192,7 @@ class EntityConverter
|
||||
* Return: string, the adjusted angle in degrees
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
std::string adjustAngleForHandedness(const std::string &angle) const;
|
||||
std::string adjustAngleForHandedness (const std::string &angle) const;
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -204,7 +204,7 @@ class EntityConverter
|
||||
* Parameter: float b, RETURN BY REFERENCE: converted blue value
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
void hexToRGB(const std::string &hex, float &r, float &g, float &b) const;
|
||||
void hexToRGB (const std::string &hex, float &r, float &g, float &b) const;
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -213,7 +213,7 @@ class EntityConverter
|
||||
* Parameter: string value, original brightness value
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
int adjustBrightness(const std::string &value) const;
|
||||
int adjustBrightness (const std::string &value) const;
|
||||
/*
|
||||
*--------------------------------------------------------------------------------------
|
||||
* Class: EntityConverter
|
||||
@@ -221,7 +221,7 @@ class EntityConverter
|
||||
* Description: Combine a message and the entity responsible into an error message
|
||||
*--------------------------------------------------------------------------------------
|
||||
*/
|
||||
std::string makeErrorMessage(const std::string message,
|
||||
std::string makeErrorMessage (const std::string message,
|
||||
const std::vector<std::string> entity) const;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user