#include <apt-pkg/indexfile.h>
#include <apt-pkg/metaindex.h>
+#include <apt-pkg/debmetaindex.h>
+
#include <string>
#include <vector>
/*}}}*/
metaIndex::~metaIndex()
{
- if (Indexes == 0)
- return;
- for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin();
- I != (*Indexes).end(); ++I)
- delete *I;
- delete Indexes;
+ if (Indexes != 0)
+ {
+ for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin();
+ I != (*Indexes).end(); ++I)
+ delete *I;
+ delete Indexes;
+ }
+ for (auto const &E: Entries)
+ delete E.second;
}
// one line Getters for public fields /*{{{*/
std::swap(LoadedSuccessfully, OldMetaIndex->LoadedSuccessfully);
}
/*}}}*/
+
+bool metaIndex::IsArchitectureSupported(std::string const &arch) const /*{{{*/
+{
+ debReleaseIndex const * const deb = dynamic_cast<debReleaseIndex const *>(this);
+ if (deb != NULL)
+ return deb->IsArchitectureSupported(arch);
+ return true;
+}
+ /*}}}*/
+bool metaIndex::IsArchitectureAllSupportedFor(IndexTarget const &target) const/*{{{*/
+{
+ debReleaseIndex const * const deb = dynamic_cast<debReleaseIndex const *>(this);
+ if (deb != NULL)
+ return deb->IsArchitectureAllSupportedFor(target);
+ return true;
+}
+ /*}}}*/