Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef CUPT_CACHE_PACKAGE_SEEN
00019 #define CUPT_CACHE_PACKAGE_SEEN
00020
00022
00023 #include <cupt/cache/version.hpp>
00024
00025 namespace cupt {
00026 namespace cache {
00027
00029 class CUPT_API Package
00030 {
00031 mutable vector< Version::InitializationParameters > __unparsed_versions;
00032 mutable vector< shared_ptr< Version > >* __parsed_versions;
00033
00034 CUPT_LOCAL void __merge_version(const shared_ptr< Version >&, vector< shared_ptr< Version > >& result) const;
00035
00036 Package(const Package&);
00037 Package& operator=(const Package&);
00038 protected:
00040 shared_ptr< const string > _binary_architecture;
00041
00042 CUPT_LOCAL vector< shared_ptr< Version > > _get_versions() const;
00043 CUPT_LOCAL virtual shared_ptr< Version > _parse_version(const Version::InitializationParameters&) const = 0;
00044 CUPT_LOCAL virtual bool _is_architecture_appropriate(const shared_ptr< const Version >&) const = 0;
00046 public:
00048
00051 Package(const shared_ptr< const string >& binaryArchitecture);
00053 virtual ~Package();
00055 void addEntry(const Version::InitializationParameters&);
00057 vector< shared_ptr< const Version > > getVersions() const;
00059
00063 shared_ptr< const Version > getSpecificVersion(const string& versionString) const;
00064
00066 static bool memoize;
00067 };
00068
00069 }
00070 }
00071
00072 #endif
00073