X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=zypp%2Fsat%2FLookupAttrTools.h;h=9102addee541b4e1ae9836bc8813691012fc5b36;hb=95763429e4df1295fd4e9472af6bb8763231f557;hp=800e9c20529eafb5a6fadfccf3fa9f1deb3f8a01;hpb=57f0b183ee76e8d44a406ec8308a1544cc739658;p=platform%2Fupstream%2Flibzypp.git diff --git a/zypp/sat/LookupAttrTools.h b/zypp/sat/LookupAttrTools.h index 800e9c2..9102add 100644 --- a/zypp/sat/LookupAttrTools.h +++ b/zypp/sat/LookupAttrTools.h @@ -24,11 +24,11 @@ namespace zypp /////////////////////////////////////////////////////////////////// // - // CLASS NAME : LookupAttr::transformIterator + // CLASS NAME : LookupAttr::TransformIterator // - /** TransformIterator returning an \ref iterator value of type \c _ResultT. + /** TransformIterator returning an \ref iterator value of type \c TResult. * - * The underlying LookupAttr::iterators value is retrieved \ref asType<_AttrT> + * The underlying LookupAttr::iterators value is retrieved \ref asType * and the returned \ref ResultT is constructed fron that value. * * \code @@ -40,7 +40,7 @@ namespace zypp * {} * * public: - * typedef sat::LookupAttr::transformIterator iterator; + * typedef sat::LookupAttr::TransformIterator iterator; * * iterator begin() const { return iterator( _q.begin() ); } * iterator end() const { return iterator( _q.end() ); } @@ -52,21 +52,21 @@ namespace zypp * * \see \ref ArrayAttr. */ - template - class LookupAttr::transformIterator : public boost::iterator_adaptor< - transformIterator<_ResultT,_AttrT> // Derived + template + class LookupAttr::TransformIterator : public boost::iterator_adaptor< + TransformIterator // Derived , LookupAttr::iterator // Base - , _ResultT // Value + , TResult // Value , boost::forward_traversal_tag // CategoryOrTraversal - , _ResultT // Reference + , TResult // Reference > { public: - transformIterator() + TransformIterator() {} explicit - transformIterator( const LookupAttr::iterator & val_r ) + TransformIterator( const LookupAttr::iterator & val_r ) { this->base_reference() = val_r; } public: @@ -116,25 +116,25 @@ namespace zypp private: friend class boost::iterator_core_access; - _ResultT dereference() const + TResult dereference() const { const LookupAttr::iterator lit( this->base_reference() ); - return _ResultT( lit.asType<_AttrT>() ); + return TResult( lit.asType() ); } }; /////////////////////////////////////////////////////////////////// - template + template class ArrayAttr; - template - std::ostream & operator<<( std::ostream & str, const ArrayAttr<_ResultT,_AttrT> & obj ); + template + std::ostream & operator<<( std::ostream & str, const ArrayAttr & obj ); /////////////////////////////////////////////////////////////////// // // CLASS NAME : ArrayAttr // - /** \ref LookupAttr::transformIterator based container to retrieve list attributes. + /** \ref LookupAttr::TransformIterator based container to retrieve list attributes. * * You may pass \ref LookupAttr::REPO_ATTR as \ref LookupAttr::Location argument, * to lookup attributes associated with the \ref Repository as a whole @@ -150,10 +150,10 @@ namespace zypp * * \todo Maybe add some way to unify the result. */ - template + template class ArrayAttr { - friend std::ostream & operator<< <_ResultT,_AttrT>( std::ostream & str, const ArrayAttr<_ResultT,_AttrT> & obj ); + friend std::ostream & operator<< ( std::ostream & str, const ArrayAttr & obj ); public: ArrayAttr() @@ -172,7 +172,7 @@ namespace zypp {} public: - typedef LookupAttr::transformIterator<_ResultT,_AttrT> iterator; + typedef LookupAttr::TransformIterator iterator; typedef LookupAttr::size_type size_type; iterator begin() const @@ -194,7 +194,7 @@ namespace zypp public: - iterator find( const _ResultT & key_r ) const + iterator find( const TResult & key_r ) const { for_( it, begin(), end() ) { @@ -210,8 +210,8 @@ namespace zypp /////////////////////////////////////////////////////////////////// /** \relates LookupAttr::iterator Stream output. */ - template - inline std::ostream & operator<<( std::ostream & str, const ArrayAttr<_ResultT,_AttrT> & obj ) + template + inline std::ostream & operator<<( std::ostream & str, const ArrayAttr & obj ) { return dumpOn( str, obj._q ); } /////////////////////////////////////////////////////////////////