/usr/include/x86_64-linux-gnu/zypp/UserData.h is in libzypp-dev 14.29.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | /*---------------------------------------------------------------------\
| ____ _ __ __ ___ |
| |__ / \ / / . \ . \ |
| / / \ V /| _/ _/ |
| / /__ | | | | | | |
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
/** \file zypp/UserData.h
*/
#ifndef ZYPP_USERDATA_H
#define ZYPP_USERDATA_H
#include <iosfwd>
#include <string>
#include <map>
#include <boost/any.hpp>
#include "zypp/base/PtrTypes.h"
#include "zypp/ContentType.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{
///////////////////////////////////////////////////////////////////
namespace callback
{
///////////////////////////////////////////////////////////////////
/// \class UserData
/// \brief Typesafe passing of user data via callbacks
///
/// Basically a <tt>std::map<std::string,boost::any></tt> plus
/// associated \ref ContentType.
///////////////////////////////////////////////////////////////////
class UserData
{
typedef std::map<std::string,boost::any> DataType;
public:
/** Default ctor */
UserData()
{}
public:
/** Get type */
const ContentType & type() const
{ return _type; }
/** Set type */
void type( const ContentType & type_r )
{ _type = type_r; }
public:
/** Validate object in a boolean context: has data */
explicit operator bool() const
{ return ! ( _dataP == nullptr || _dataP->empty() ); }
private:
ContentType _type;
shared_ptr<DataType> _dataP;
};
/** \relates UserData Stream output */
inline std::ostream & operator<<( std::ostream & str, const UserData & obj )
{ return str << "UserData(" << obj.type() << ")";}
} // namespace callback
///////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
#endif // ZYPP_USERDATA_H
|