X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=zypp%2FNVRA.h;fp=zypp%2Fsolver%2FContext.cc;h=f84b9a3ec39544a4308a50ce4f787861c83113da;hb=d1f315a951358c4d165debd5bad28729b8b2de6a;hp=846ea3b0ae2a971ce18ae77136c9f826ab49ab77;hpb=bdfa28ac8be5c3691e7d9c2e6e6f42342deb156f;p=platform%2Fupstream%2Flibzypp.git diff --git a/zypp/solver/Context.cc b/zypp/NVRA.h similarity index 52% rename from zypp/solver/Context.cc rename to zypp/NVRA.h index 846ea3b..f84b9a3 100644 --- a/zypp/solver/Context.cc +++ b/zypp/NVRA.h @@ -6,55 +6,57 @@ | /_____||_| |_| |_| | | | \---------------------------------------------------------------------*/ -/** \file zypp/solver/Context.cc +/** \file zypp/NVRA.h * */ -#include +#ifndef ZYPP_NVRA_H +#define ZYPP_NVRA_H -#include "zypp/base/Logger.h" +#include +#include -#include "zypp/solver/Context.h" - -using namespace std; +#include "zypp/base/PtrTypes.h" +#include "zypp/Edition.h" +#include "zypp/Arch.h" /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////// - namespace solver - { ///////////////////////////////////////////////////////////////// - IMPL_PTR_TYPE(Context); - - /////////////////////////////////////////////////////////////////// - // - // METHOD NAME : Context::Context - // METHOD TYPE : Ctor - // - Context::Context() + /////////////////////////////////////////////////////////////////// + // + // CLASS NAME : NVRA + // + /** */ + struct NVRA + { + /** Default ctor */ + NVRA() {} - /////////////////////////////////////////////////////////////////// - // - // METHOD NAME : Context::~Context - // METHOD TYPE : Dtor - // - Context::~Context() + /** Ctor */ + explicit + NVRA( const std::string & name_r, + const Edition & edition_r = Edition(), + const Arch & arch_r = Arch() ) + : name( name_r ) + , edition( edition_r ) + , arch( arch_r ) {} - /****************************************************************** - ** - ** FUNCTION NAME : operator<< - ** FUNCTION TYPE : std::ostream & - */ - std::ostream & operator<<( std::ostream & str, const Context & obj ) - { - return str; - } - - ///////////////////////////////////////////////////////////////// - } // namespace solver + /** */ + std::string name; + /** */ + Edition edition; + /** */ + Arch arch; + }; /////////////////////////////////////////////////////////////////// + + /** \relates NVRA Stream output */ + std::ostream & operator<<( std::ostream & str, const NVRA & obj ); + ///////////////////////////////////////////////////////////////// } // namespace zypp /////////////////////////////////////////////////////////////////// +#endif // ZYPP_NVRA_H