Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef ALL_H
- #define ALL_H
- #include <string>
- #include <iostream>
- #define string std::string
- namespace Sandbox {
- class NameMismatchException {
- };
- class Item {
- class Implementation;
- Implementation *impl;
- public:
- Item(const string &name, const double price);
- Item(const Item &other);
- Item& operator=(const Item &other);
- ~Item();
- unsigned int getId() const;
- string getName() const;
- void setName(const string &name);
- double getPrice() const;
- void setPrice(const double price);
- Item& operator++();
- Item operator++(int);
- string operator=(const string &name);
- Item operator+(const Item &i2);
- void operator+=(const double change);
- void operator-=(const double change);
- static unsigned int getAliveCount();
- string toString() const;
- friend std::ostream& operator<<(std::ostream& o, const Item &item);
- friend std::istream& operator>>(std::istream& i, Item &item);
- };
- }
- #undef string
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement