libzypp
14.29.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
UserData.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| ____ _ __ __ ___ |
3
| |__ / \ / / . \ . \ |
4
| / / \ V /| _/ _/ |
5
| / /__ | | | | | | |
6
| /_____||_| |_| |_| |
7
| |
8
\---------------------------------------------------------------------*/
11
#ifndef ZYPP_USERDATA_H
12
#define ZYPP_USERDATA_H
13
14
#include <iosfwd>
15
#include <string>
16
#include <map>
17
#include <boost/any.hpp>
18
19
#include "
zypp/base/PtrTypes.h
"
20
#include "
zypp/ContentType.h
"
21
23
namespace
zypp
24
{
26
namespace
callback
27
{
35
class
UserData
36
{
37
typedef
std::map<std::string,boost::any>
DataType
;
38
public
:
40
UserData
()
41
{}
42
43
public
:
45
const
ContentType
&
type
()
const
46
{
return
_type
; }
47
49
void
type
(
const
ContentType
& type_r )
50
{
_type
= type_r; }
51
52
public
:
54
explicit
operator
bool()
const
55
{
return
! (
_dataP
==
nullptr
||
_dataP
->empty() ); }
56
57
private
:
58
ContentType
_type
;
59
shared_ptr<DataType>
_dataP
;
60
};
61
63
inline
std::ostream &
operator<<
( std::ostream &
str
,
const
UserData
& obj )
64
{
return
str <<
"UserData("
<< obj.
type
() <<
")"
;}
65
66
}
// namespace callback
68
}
// namespace zypp
70
#endif // ZYPP_USERDATA_H
zypp::callback::UserData::operator<<
std::ostream & operator<<(std::ostream &str, const UserData &obj)
Definition:
UserData.h:63
str
String related utilities and Regular expression matching.
zypp::callback::UserData::type
void type(const ContentType &type_r)
Set type.
Definition:
UserData.h:49
PtrTypes.h
zypp::callback::UserData::_dataP
shared_ptr< DataType > _dataP
Definition:
UserData.h:59
zypp::callback::UserData::UserData
UserData()
Default ctor.
Definition:
UserData.h:40
zypp::callback::UserData::DataType
std::map< std::string, boost::any > DataType
Definition:
UserData.h:37
zypp::callback::UserData
Typesafe passing of user data via callbacks.
Definition:
UserData.h:35
ContentType.h
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition:
CodePitfalls.doc:1
zypp::callback::UserData::_type
ContentType _type
Definition:
UserData.h:58
zypp::callback::UserData::type
const ContentType & type() const
Get type.
Definition:
UserData.h:45
zypp::ContentType
Mime type like 'type/subtype' classification of content.
Definition:
ContentType.h:28
zypp
UserData.h
Generated on Thu Sep 25 2014 20:37:52 for libzypp by
1.8.8