Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef ALIAS_HPP
- #define ALIAS_HPP
- #include <vector>
- #include <map>
- #include <string>
- #include <iostream>
- /**
- @brief Klasa koja sluzi za bijektivno mapiranje objakta tipa U na objekt tipa W
- Za ispis i upis se koristi in i out stream-ovi
- Za klase U i W treba paziti da imaju svoju vizualnu reprezentaciju bez razmaka
- */
- template<class U, class W>
- class Alias
- {
- public:
- void SetAlias(const U & S, const W x);
- void RemAlias(const U & S);
- void RemAlias(const W x);
- bool Exist(const U & S) const;
- bool Exist(const W & x) const;
- const U & GetName(const W x);
- const W & GetNo(const U & S);
- void Clear();
- friend std::ostream& operator<<( std::ostream & out, const Alias<U, W> & A);
- friend std::istream& operator>>( std::istream & in, Alias<U, W> & A);
- private:
- std::map<U, W> StoI;
- std::map<W, U> ItoS;
- };
- #endif ALIAS_HPP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement