AtomImpl.cc

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00009 
00010 #include "zypp/TranslatedText.h"
00011 #include "zypp/base/String.h"
00012 #include "zypp/base/Logger.h"
00013 #include "zypp/repo/RepositoryImpl.h"
00014 #include "AtomImpl.h"
00015 #include "zypp/cache/CacheAttributes.h"
00016 
00017 using namespace std;
00018 using namespace zypp::detail;
00019 //using namespace::zypp::repo;
00020 
00022 namespace zypp { namespace repo { namespace cached {
00023 
00025 //
00026 //        CLASS NAME : AtomImpl
00027 //
00029 
00032 AtomImpl::AtomImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
00033     : _repository (repository_r),
00034       _id(id)
00035 {}
00036 
00037 Repository
00038 AtomImpl::repository() const
00039 {
00040   return _repository->selfRepository();
00041 }
00042 
00044 // ResObject Attributes
00046 
00047 TranslatedText AtomImpl::summary() const
00048 {
00049   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
00050 }
00051 
00052 TranslatedText AtomImpl::description() const
00053 {
00054   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
00055 }
00056 
00057 TranslatedText AtomImpl::insnotify() const
00058 {
00059   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
00060 }
00061 
00062 TranslatedText AtomImpl::delnotify() const
00063 {
00064   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
00065 }
00066 
00067 TranslatedText AtomImpl::licenseToConfirm() const
00068 {
00069   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
00070 }
00071 
00072 Vendor AtomImpl::vendor() const
00073 {
00074   return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
00075 }
00076 
00077 ByteCount AtomImpl::size() const
00078 {
00079   return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
00080 }
00081 
00082 bool AtomImpl::installOnly() const
00083 {
00084   return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
00085 }
00086 
00087 Date AtomImpl::buildtime() const
00088 {
00089   return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
00090 }
00091 
00092 Date AtomImpl::installtime() const
00093 {
00094   return Date();
00095 }
00096 
00098 } } } // namespace zypp::repo::cached
00100 

Generated on Tue Sep 25 19:23:00 2007 for libzypp by  doxygen 1.5.3