Crossfire Server, Trunk
CREFilterDefinition.cpp
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #include "CREFilterDefinition.h"
14 
16 {
17 }
18 
20 {
21  myName = other.name();
22  myFilter = other.filter();
23 }
24 
26 {
27 }
28 
29 const QString& CREFilterDefinition::name() const
30 {
31  return myName;
32 }
33 
34 void CREFilterDefinition::setName(const QString& name)
35 {
36  myName = name;
37 }
38 
39 const QString& CREFilterDefinition::filter() const
40 {
41  return myFilter;
42 }
43 
45 {
46  myFilter = filter;
47 }
48 
49 QDataStream &operator<<(QDataStream &out, const CREFilterDefinition &filter)
50 {
51  out << filter.name() << filter.filter();
52  return out;
53 }
54 
55 QDataStream &operator>>(QDataStream &in, CREFilterDefinition &filter)
56 {
57  QString data;
58  in >> data;
59  filter.setName(data);
60  in >> data;
61  filter.setFilter(data);
62  return in;
63 }
CREFilterDefinition::name
const QString & name() const
Definition: CREFilterDefinition.cpp:29
CREFilterDefinition::setFilter
void setFilter(const QString &filter)
Definition: CREFilterDefinition.cpp:44
filter
Definition: filter.py:1
CREFilterDefinition::CREFilterDefinition
CREFilterDefinition()
Definition: CREFilterDefinition.cpp:15
CREFilterDefinition::filter
const QString & filter() const
Definition: CREFilterDefinition.cpp:39
CREFilterDefinition.h
CREFilterDefinition::setName
void setName(const QString &name)
Definition: CREFilterDefinition.cpp:34
CREFilterDefinition::myName
QString myName
Definition: CREFilterDefinition.h:35
navar-midane_time.data
data
Definition: navar-midane_time.py:11
CREFilterDefinition::myFilter
QString myFilter
Definition: CREFilterDefinition.h:36
make_face_from_files.out
out
Definition: make_face_from_files.py:75
operator>>
QDataStream & operator>>(QDataStream &in, CREFilterDefinition &filter)
Definition: CREFilterDefinition.cpp:55
CREFilterDefinition
Definition: CREFilterDefinition.h:19
CREFilterDefinition::~CREFilterDefinition
virtual ~CREFilterDefinition()
Definition: CREFilterDefinition.cpp:25
operator<<
QDataStream & operator<<(QDataStream &out, const CREFilterDefinition &filter)
Definition: CREFilterDefinition.cpp:49
give.name
name
Definition: give.py:27