libzypp: zypp/ResolverFocus.h Source File

libzypp 17.38.7

ResolverFocus.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
11#ifndef ZYPP_RESOLVERFOCUS_H
12#define ZYPP_RESOLVERFOCUS_H
13
14#include <iosfwd>
15#include <string>
16
17#include <zypp-core/Globals.h>
18
20namespace zypp
21{
23 enum class ResolverFocus
24 {
25 Default = 0
26 ,Job
27 ,Installed
28 ,Update
29 };
30
32 std::string asString( const ResolverFocus & val_r ) ZYPP_API;
33
37 bool fromString( const std::string & val_r, ResolverFocus & ret_r ) ZYPP_API;
38
42 inline ResolverFocus resolverFocusFromString( const std::string & val_r )
43 { ResolverFocus ret_r { ResolverFocus::Default }; fromString( val_r, ret_r ); return ret_r; }
44
46 inline std::ostream & operator<<( std::ostream & str, const ResolverFocus & obj )
47 { return str << asString( obj ); }
48
49} // namespace zypp
51#endif // ZYPP_RESOLVERFOCUS_H
Globals.h
Provides API related macros.
ZYPP_API
#define ZYPP_API
Definition Globals.h:69
str
String related utilities and Regular expression matching.
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::ResolverFocus
ResolverFocus
The resolver's general attitude.
Definition ResolverFocus.h:24
zypp::ResolverFocus::Update
@ Update
Focus on updating requested packages and their dependencies as much as possible.
Definition ResolverFocus.h:28
zypp::ResolverFocus::Default
@ Default
Request the standard behavior (as defined in zypp.conf or 'Job').
Definition ResolverFocus.h:25
zypp::ResolverFocus::Installed
@ Installed
Focus on applying as little changes to the installed packages as needed.
Definition ResolverFocus.h:27
zypp::ResolverFocus::Job
@ Job
Focus on installing the best version of the requested packages.
Definition ResolverFocus.h:26
zypp::resolverFocusFromString
ResolverFocus resolverFocusFromString(const std::string &val_r)
relates: ResolverFocus Conversion from string (convenience)
Definition ResolverFocus.h:42
zypp::fromString
bool fromString(const std::string &val_r, ResolverFocus &ret_r)
relates: ResolverFocus Conversion from string (enumerator name, case insensitive, empty string is Def...
Definition ResolverFocus.cc:39
zypp::asString
std::string asString(const Patch::Category &obj)
relates: Patch::Category string representation.
Definition Patch.cc:122
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
Definition Capabilities.cc:65