Crossfire Server, Trunk  R20513
CREFilterDefinition.cpp
Go to the documentation of this file.
1 #include "CREFilterDefinition.h"
2 
4 {
5 }
6 
8 {
9  myName = other.name();
10  myFilter = other.filter();
11 }
12 
14 {
15 }
16 
17 const QString& CREFilterDefinition::name() const
18 {
19  return myName;
20 }
21 
22 void CREFilterDefinition::setName(const QString& name)
23 {
24  myName = name;
25 }
26 
27 const QString& CREFilterDefinition::filter() const
28 {
29  return myFilter;
30 }
31 
33 {
34  myFilter = filter;
35 }
36 
37 QDataStream &operator<<(QDataStream &out, const CREFilterDefinition &filter)
38 {
39  out << filter.name() << filter.filter();
40  return out;
41 }
42 
43 QDataStream &operator>>(QDataStream &in, CREFilterDefinition &filter)
44 {
45  QString data;
46  in >> data;
47  filter.setName(data);
48  in >> data;
49  filter.setFilter(data);
50  return in;
51 }
const QString & name() const
const QString & filter() const
void setName(const QString &name)
void setFilter(const QString &filter)
QDataStream & operator>>(QDataStream &in, CREFilterDefinition &filter)
QDataStream & operator<<(QDataStream &out, const CREFilterDefinition &filter)