Git Product home page Git Product logo

goalundo's Introduction

GoalUndo

Purpose

This is a class for managing a history of goals (and their sub-operations) for an advanced "undo" feature. It is meant for use as an exercise in learning how to test C++ classes using GoogleTest.

Overview

Public Methods Parameters Description
undoGoal none When there are existing goals, it removes the most recently added one, along with any associated operations
undoOperation none When there is an existing goal with more than one operation, remove the most recently added operation. When there is only one operation in the most recently added goal, it removes both the operation and the goal (i.e. goals cannot exist without any operations in it).
undoOperation string undoOp Overloaded undoOperation that searches the most recent goal (LIFO order) for an operation that matches the argument and removes (only) the first match found. If there are no matches, nothing is removed.
getGoal none Returns the name of the most recently added goal, or an empty string if there are no goals.
getOperations none Returns the names of all of the operations in the most recently added goal, with a space between each operation.
addOperation string newGoal, string newOp Adds a new operation (newOp) within a new goal (newGoal). Both have to be non-empty strings. If either argument is an empty string, nothing is added.
addOperation string newOp Adds a new operation (newOp) within the most recently added goal. If the argument is an empty string, nothing is added. If no goals exist, it creates a new goal with the same name as the new operation

goalundo's People

Contributors

kbuffardi avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.