git.stg.codes
/
stg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
daeeee5
)
Assignement and comparsion operators removed from admin and tariff iface
author
Maxim Mamontov
<faust.madf@gmail.com>
Wed, 31 Aug 2011 09:59:52 +0000
(12:59 +0300)
committer
Maxim Mamontov
<faust.madf@gmail.com>
Wed, 31 Aug 2011 09:59:52 +0000
(12:59 +0300)
include/stg/admin.h
patch
|
blob
|
history
include/stg/tariff.h
patch
|
blob
|
history
projects/stargazer/admin_impl.cpp
patch
|
blob
|
history
projects/stargazer/admin_impl.h
patch
|
blob
|
history
projects/stargazer/tariff_impl.cpp
patch
|
blob
|
history
projects/stargazer/tariff_impl.h
patch
|
blob
|
history
diff --git
a/include/stg/admin.h
b/include/stg/admin.h
index 7095bb62c62c71c39ae6b9e2e303722e2a15965e..c5baf5190f111ec287ac0c9b095b478d7b71e9b3 100644
(file)
--- a/
include/stg/admin.h
+++ b/
include/stg/admin.h
@@
-28,13
+28,6
@@
class ADMIN {
public:
class ADMIN {
public:
- virtual ADMIN & operator=(const ADMIN &) = 0;
- virtual ADMIN & operator=(const ADMIN_CONF &) = 0;
- virtual bool operator==(const ADMIN & rhs) const = 0;
- virtual bool operator!=(const ADMIN & rhs) const = 0;
- virtual bool operator<(const ADMIN & rhs) const = 0;
- virtual bool operator<=(const ADMIN & rhs) const = 0;
-
virtual const std::string & GetPassword() const = 0;
virtual const std::string & GetLogin() const = 0;
virtual PRIV const * GetPriv() const = 0;
virtual const std::string & GetPassword() const = 0;
virtual const std::string & GetLogin() const = 0;
virtual PRIV const * GetPriv() const = 0;
diff --git
a/include/stg/tariff.h
b/include/stg/tariff.h
index b19ec47697830e84f5700bbcb6bbe9737e49afb6..189dde5916c6dfe96a2817be093b5c53a9dd5097 100644
(file)
--- a/
include/stg/tariff.h
+++ b/
include/stg/tariff.h
@@
-46,11
+46,6
@@
public:
virtual int64_t GetTraffByType(uint64_t up, uint64_t down) const = 0;
virtual int GetThreshold(int dir) const = 0;
virtual const TARIFF_DATA & GetTariffData() const = 0;
virtual int64_t GetTraffByType(uint64_t up, uint64_t down) const = 0;
virtual int GetThreshold(int dir) const = 0;
virtual const TARIFF_DATA & GetTariffData() const = 0;
-
- virtual TARIFF & operator=(const TARIFF_DATA & td) = 0;
- virtual TARIFF & operator=(const TARIFF & t) = 0;
- virtual bool operator==(const TARIFF & rhs) const = 0;
- virtual bool operator!=(const TARIFF & rhs) const = 0;
};
#endif
};
#endif
diff --git
a/projects/stargazer/admin_impl.cpp
b/projects/stargazer/admin_impl.cpp
index 7f1b301fc3ee920d75c9b13677323db2bc77a3fb..3d2c4895bf52ef84b64d50f9e40eb437a452fe3f 100644
(file)
--- a/
projects/stargazer/admin_impl.cpp
+++ b/
projects/stargazer/admin_impl.cpp
@@
-58,40
+58,40
@@
ADMIN_IMPL::ADMIN_IMPL(const PRIV & priv,
{
}
//-----------------------------------------------------------------------------
{
}
//-----------------------------------------------------------------------------
-ADMIN
& ADMIN_IMPL::operator=(const ADMIN
& adm)
+ADMIN
_IMPL & ADMIN_IMPL::operator=(const ADMIN_IMPL
& adm)
{
if (&adm == this)
return *this;
{
if (&adm == this)
return *this;
-conf = adm.
GetConf()
;
-ip = adm.
GetIP()
;
+conf = adm.
conf
;
+ip = adm.
ip
;
return *this;
}
//-----------------------------------------------------------------------------
return *this;
}
//-----------------------------------------------------------------------------
-ADMIN & ADMIN_IMPL::operator=(const ADMIN_CONF & ac)
+ADMIN
_IMPL
& ADMIN_IMPL::operator=(const ADMIN_CONF & ac)
{
conf = ac;
return *this;
}
//-----------------------------------------------------------------------------
{
conf = ac;
return *this;
}
//-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator==(const ADMIN & rhs) const
+bool ADMIN_IMPL::operator==(const ADMIN
_IMPL
& rhs) const
{
{
-return conf.login == rhs.
GetLogin()
;
+return conf.login == rhs.
conf.login
;
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator!=(const ADMIN & rhs) const
+bool ADMIN_IMPL::operator!=(const ADMIN
_IMPL
& rhs) const
{
{
-return conf.login != rhs.
GetLogin()
;
+return conf.login != rhs.
conf.login
;
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator<(const ADMIN & rhs) const
+bool ADMIN_IMPL::operator<(const ADMIN
_IMPL
& rhs) const
{
{
-return conf.login < rhs.
GetLogin()
;
+return conf.login < rhs.
conf.login
;
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
-bool ADMIN_IMPL::operator<=(const ADMIN & rhs) const
+bool ADMIN_IMPL::operator<=(const ADMIN
_IMPL
& rhs) const
{
{
-return conf.login <= rhs.
GetLogin()
;
+return conf.login <= rhs.
conf.login
;
}
//-----------------------------------------------------------------------------
std::string ADMIN_IMPL::GetIPStr() const
}
//-----------------------------------------------------------------------------
std::string ADMIN_IMPL::GetIPStr() const
diff --git
a/projects/stargazer/admin_impl.h
b/projects/stargazer/admin_impl.h
index 6d58336e2e091083749819ee243cef1b7307fffa..6a608e11ef4d9ca8822779796d8882652c98f5f6 100644
(file)
--- a/
projects/stargazer/admin_impl.h
+++ b/
projects/stargazer/admin_impl.h
@@
-47,12
+47,12
@@
public:
const std::string & password);
virtual ~ADMIN_IMPL() {};
const std::string & password);
virtual ~ADMIN_IMPL() {};
- ADMIN
& operator=(const ADMIN
&);
- ADMIN & operator=(const ADMIN_CONF &);
- bool operator==(const ADMIN & rhs) const;
- bool operator!=(const ADMIN & rhs) const;
- bool operator<(const ADMIN & rhs) const;
- bool operator<=(const ADMIN & rhs) const;
+ ADMIN
_IMPL & operator=(const ADMIN_IMPL
&);
+ ADMIN
_IMPL
& operator=(const ADMIN_CONF &);
+ bool operator==(const ADMIN
_IMPL
& rhs) const;
+ bool operator!=(const ADMIN
_IMPL
& rhs) const;
+ bool operator<(const ADMIN
_IMPL
& rhs) const;
+ bool operator<=(const ADMIN
_IMPL
& rhs) const;
const std::string & GetPassword() const { return conf.password; };
const std::string & GetLogin() const { return conf.login; };
const std::string & GetPassword() const { return conf.password; };
const std::string & GetLogin() const { return conf.login; };
diff --git
a/projects/stargazer/tariff_impl.cpp
b/projects/stargazer/tariff_impl.cpp
index 63164a27bd634f7bf8dd2d48d2a17553f09d3406..bf272f3128a34f9939ba136fa29e68a95044964e 100644
(file)
--- a/
projects/stargazer/tariff_impl.cpp
+++ b/
projects/stargazer/tariff_impl.cpp
@@
-36,15
+36,15
@@
#include "stg_timer.h"
//-----------------------------------------------------------------------------
#include "stg_timer.h"
//-----------------------------------------------------------------------------
-TARIFF & TARIFF_IMPL::operator=(const TARIFF_DATA & td)
+TARIFF
_IMPL
& TARIFF_IMPL::operator=(const TARIFF_DATA & td)
{
tariffData = td;
return *this;
}
//-----------------------------------------------------------------------------
{
tariffData = td;
return *this;
}
//-----------------------------------------------------------------------------
-TARIFF
& TARIFF_IMPL::operator=(const TARIFF
& t)
+TARIFF
_IMPL & TARIFF_IMPL::operator=(const TARIFF_IMPL
& t)
{
{
-tariffData = t.
GetTariffData()
;
+tariffData = t.
tariffData
;
return *this;
}
//-----------------------------------------------------------------------------
return *this;
}
//-----------------------------------------------------------------------------
diff --git
a/projects/stargazer/tariff_impl.h
b/projects/stargazer/tariff_impl.h
index cdfd711243f8d8d5fbe34588384f71287384a8d7..f33c08af0aa1340b3ba1bf0db72e60e964d0709c 100644
(file)
--- a/
projects/stargazer/tariff_impl.h
+++ b/
projects/stargazer/tariff_impl.h
@@
-82,10
+82,10
@@
public:
int GetThreshold(int dir) const;
const TARIFF_DATA & GetTariffData() const { return tariffData; }
int GetThreshold(int dir) const;
const TARIFF_DATA & GetTariffData() const { return tariffData; }
- TARIFF & operator=(const TARIFF_DATA & td);
- TARIFF
& operator=(const TARIFF
& t);
- bool operator==(const TARIFF & rhs) const { return GetName() == rhs.GetName(); }
- bool operator!=(const TARIFF & rhs) const { return GetName() != rhs.GetName(); }
+ TARIFF
_IMPL
& operator=(const TARIFF_DATA & td);
+ TARIFF
_IMPL & operator=(const TARIFF_IMPL
& t);
+ bool operator==(const TARIFF
_IMPL
& rhs) const { return GetName() == rhs.GetName(); }
+ bool operator!=(const TARIFF
_IMPL
& rhs) const { return GetName() != rhs.GetName(); }
private:
TARIFF_DATA tariffData;
private:
TARIFF_DATA tariffData;