Commit e13cb800 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Added code stubs for implementations.

parent 564d89eb
Loading
Loading
Loading
Loading

impl/Device.cpp

0 → 100644
+9 −0
Original line number Diff line number Diff line
//
// Created by Ari Trachtenberg on 3/17/26.
//

#include "../include/Device.h"

int Device::globalDeviceID = 0; // IDs start at 0

// more here, as needed ...
 No newline at end of file

impl/Password.cpp

0 → 100644
+9 −0
Original line number Diff line number Diff line
//
// Created by Ari Trachtenberg on 3/17/26.
//

#include "../include/Password.h"

int Password::globalPassID = 0; // IDs start at 0

// more here, as needed ...
 No newline at end of file

impl/Service.cpp

0 → 100644
+19 −0
Original line number Diff line number Diff line
//
// Created by Ari Trachtenberg on 3/17/26.
//

#include "../include/Service.h"

int Service::globalServiceID = 0; // IDs start at 0

void Service::addDevice(Device &dev) {
  // ...
}

const unordered_set<Device *> &Service::getDevices() const {
  // ...
}

bool Service::hasDevice(Device &dev) const {
  // ...
}

impl/System.cpp

0 → 100644
+25 −0
Original line number Diff line number Diff line
//
// Created by Ari Trachtenberg on 3/18/26.
//
#include "../include/System.h"

void System::addService(const Service& newSvc) {
  // ...
}

bool System::isSecureQ() const {
  // ...
}

unordered_set<Device *> System::getAllDevices() const {
  // ...
}

unordered_set<const Service *> System::getServices() const {
  // ...
}

long System::numPasswords() const {
  // ...
}
+28 −23
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@
#include <sstream>
#include <string>


using namespace std;

/**
@@ -16,7 +15,6 @@ using namespace std;
 */
class Password {
  public:

    /**
     * Construct a new Password object.
     */
@@ -33,6 +31,15 @@ public:
      return passID == otherPwd.passID;
    }

    /**
 * @return A human-readable version of this Password.
 */
    [[nodiscard]] string toString() const {
      stringstream strS;
      strS << "{ password #" << passID << ": \"" << myPass << "\" }";
      return strS.str();
    }

    /**
     * Stream access to Password
     */
@@ -41,9 +48,7 @@ public:
      return os;
    }


  private:

    /**
     * Generates a random password.
     * @return A random password.
Loading