Browse Source

removed not used class

Kajetan Johannes Hammerle 3 years ago
parent
commit
6ebbff97f5
2 changed files with 0 additions and 111 deletions
  1. 0 62
      common/utils/Face.cpp
  2. 0 49
      common/utils/Face.h

+ 0 - 62
common/utils/Face.cpp

@@ -1,62 +0,0 @@
-#include "common/utils/Face.h"
-
-Face Face::FACES[6] = {
-    {0, 0, 1, 0, "Up"},
-    {1, 1, 0, 0, "North"},
-    {2, 0, 0, 1, "East"},
-    {3, 0, -1, 0, "Down"},
-    {4, -1, 0, 0, "South"},
-    {5, 0, 0, -1, "West"}
-};
-
-const Face& Face::UP = FACES[0];
-const Face& Face::DOWN = FACES[3];
-
-const Face& Face::NORTH = FACES[1];
-const Face& Face::SOUTH = FACES[4];
-
-const Face& Face::EAST = FACES[2];
-const Face& Face::WEST = FACES[5];
-
-Face::Face(int index, int offsetX, int offsetY, int offsetZ, const char* name) :
-index(index), offsetX(offsetX), offsetY(offsetY), offsetZ(offsetZ), name(name) {
-}
-
-int Face::getX() const {
-    return offsetX;
-}
-
-int Face::getY() const {
-    return offsetY;
-}
-
-int Face::getZ() const {
-    return offsetZ;
-}
-
-Face& Face::getOpposite() const {
-    return FACES[(index + 3) % 6];
-}
-
-const char* Face::getName() const {
-    return name;
-}
-
-void Face::forEach(const std::function<void(Face&)>& f) {
-    for(int i = 0; i < 6; i++) {
-        f(FACES[i]);
-    }
-}
-
-bool operator==(const Face& l, const Face& r) {
-    return &l == &r;
-}
-
-bool operator!=(const Face& l, const Face& r) {
-    return &l != &r;
-}
-
-std::ostream& operator<<(std::ostream& os, const Face& f) {
-    os << f.getName();
-    return os;
-}

+ 0 - 49
common/utils/Face.h

@@ -1,49 +0,0 @@
-#ifndef FACE_H
-#define FACE_H
-
-#include <iostream>
-#include <functional>
-
-class Face final {
-public:
-    // force usage by reference in every situation
-    Face(const Face& other) = delete;
-    Face& operator=(const Face& other) = delete;
-    Face(Face&& other) = delete;
-    Face& operator=(Face&& other) = delete;
-
-    int getX() const;
-    int getY() const;
-    int getZ() const;
-    Face& getOpposite() const;
-    const char* getName() const;
-
-    static void forEach(const std::function<void(Face&)>& f);
-
-    static const Face& UP;
-    static const Face& DOWN;
-    static const Face& NORTH;
-    static const Face& SOUTH;
-    static const Face& EAST;
-    static const Face& WEST;
-
-private:
-    Face(int index, int offsetX, int offsetY, int offsetZ, const char* name);
-
-    static Face FACES[6];
-
-    int index;
-
-    int offsetX;
-    int offsetY;
-    int offsetZ;
-
-    const char* name;
-};
-
-bool operator==(const Face& l, const Face& r);
-bool operator!=(const Face& l, const Face& r);
-std::ostream& operator<<(std::ostream& os, const Face& f);
-
-#endif
-