gloox
1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
dataformreported.cpp
1
/*
2
Copyright (c) 2006-2009 by Jakob Schroeter <js@camaya.net>
3
This file is part of the gloox library. http://camaya.net/gloox
4
5
This software is distributed under a license. The full license
6
agreement can be found in the file LICENSE in this distribution.
7
This software may not be copied, modified, sold or distributed
8
other than expressed in the named license agreement.
9
10
This software is distributed without any warranty.
11
*/
12
13
14
#include "dataformreported.h"
15
16
#include "tag.h"
17
18
namespace
gloox
19
{
20
21
DataFormReported::DataFormReported
()
22
{
23
}
24
25
DataFormReported::DataFormReported
(
Tag
* tag )
26
{
27
if
( tag->
name
() !=
"reported"
)
28
return
;
29
30
const
TagList
&l = tag->
children
();
31
TagList::const_iterator it = l.begin();
32
for
( ; it != l.end(); ++it )
33
{
34
DataFormField
* f =
new
DataFormField
( (*it) );
35
m_fields.push_back( f );
36
}
37
}
38
39
DataFormReported::~DataFormReported
()
40
{
41
}
42
43
Tag
*
DataFormReported::tag
()
const
44
{
45
Tag
* r =
new
Tag
(
"reported"
);
46
DataFormFieldContainer::FieldList::const_iterator it = m_fields.begin();
47
for
( ; it != m_fields.end(); ++it )
48
{
49
r->
addChild
( (*it)->tag() );
50
}
51
return
r;
52
}
53
54
}
Generated on Thu Jun 27 2013 13:02:35 for gloox by
1.8.1.2