Vidalia
0.3.1
src
vidalia
config
ServiceList.cpp
Go to the documentation of this file.
1
/*
2
** This file is part of Vidalia, and is subject to the license terms in the
3
** LICENSE file, found in the top level directory of this distribution. If you
4
** did not receive the LICENSE file with this file, you may obtain it from the
5
** Vidalia source package distributed by the Vidalia Project at
6
** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7
** including this file, may be copied, modified, propagated, or distributed
8
** except according to the terms described in the LICENSE file.
9
*/
10
11
#include "
ServiceList.h
"
12
13
14
/** Default constructor. */
15
ServiceList::ServiceList
()
16
{
17
}
18
19
/** Constructor to create a new Servicelist with initial settings */
20
void
ServiceList::addService
(
Service
service)
21
{
22
_services
.append(service);
23
}
24
25
/** Destructor */
26
ServiceList::~ServiceList
()
27
{
28
}
29
30
/* Sets the serviceList */
31
void
ServiceList::setServices
(QList<Service> services)
32
{
33
_services
=
services
;
34
}
35
36
/** Writes ServiceList class data from <b>myObj</b> to the QDataStream
37
* <b>out</b>. */
38
QDataStream&
operator<<
(QDataStream &out,
const
ServiceList
&myObj)
39
{
40
out << myObj.
services
();
/* Write the services*/
41
return
out;
42
}
43
44
/** Reads ServiceList class data in from the QDataStream <b>in</b> and
45
populates * the <b>myObj</b> object accordingly. */
46
QDataStream&
operator>>
(QDataStream &in,
ServiceList
&myObj)
47
{
48
QList<Service> services;
49
/* Read in from the data stream */
50
in >> services;
51
/* Set the appropriate class member variables */
52
myObj.
setServices
(services);
53
/* Return the updated data stream */
54
return
in;
55
}
56
ServiceList::_services
QList< Service > _services
Definition:
ServiceList.h:45
ServiceList::services
QList< Service > services() const
Definition:
ServiceList.h:32
Service
Definition:
Service.h:19
ServiceList::setServices
void setServices(QList< Service > services)
Definition:
ServiceList.cpp:31
operator>>
QDataStream & operator>>(QDataStream &in, ServiceList &myObj)
Definition:
ServiceList.cpp:46
operator<<
QDataStream & operator<<(QDataStream &out, const ServiceList &myObj)
Definition:
ServiceList.cpp:38
ServiceList::~ServiceList
virtual ~ServiceList()
Definition:
ServiceList.cpp:26
ServiceList.h
ServiceList::ServiceList
ServiceList()
Definition:
ServiceList.cpp:15
ServiceList::addService
void addService(Service service)
Definition:
ServiceList.cpp:20
ServiceList
Definition:
ServiceList.h:19
Generated by
1.8.17