Page MenuHomeHEPForge

No OneTemporary

Index: trunk/npstat/swig/geners/AbsArchive.i
===================================================================
--- trunk/npstat/swig/geners/AbsArchive.i (revision 494)
+++ trunk/npstat/swig/geners/AbsArchive.i (revision 495)
@@ -1,55 +1,56 @@
+%include vec_string.i
%include geners/AbsRecord.i
%include geners/AbsReference.i
%include geners/CatalogEntry.i
%include geners/SearchSpecifier.i
%{
#include <sstream>
#include <stdexcept>
#include "geners/AbsArchive.hh"
%}
%ignore gs::AbsArchive::catalogEntry;
namespace gs {
%extend AbsArchive {
AbsArchive& store(const AbsRecord& record)
{
return *$self << record;
}
std::vector<unsigned long long> findItems(
const char* namePattern, const char* categoryPattern) const
{
std::vector<unsigned long long> idlist;
$self->itemSearch(namePattern, categoryPattern, &idlist);
return idlist;
}
std::vector<unsigned long long> findItems(
const SearchSpecifier& namePattern,
const SearchSpecifier& categoryPattern) const
{
std::vector<unsigned long long> idlist;
$self->itemSearch(namePattern, categoryPattern, &idlist);
return idlist;
}
gs::CatalogEntry getCatalogEntry(unsigned long long iid)
{
CPP11_shared_ptr<const gs::CatalogEntry> p =
$self->catalogEntry(iid);
if (!p.get())
{
std::ostringstream os;
os << "No item with id " << iid << " in the archive \""
<< $self->name() << '"';
throw std::invalid_argument(os.str());
}
return *p;
}
};
}
%include "geners/AbsArchive.hh"

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 8:19 PM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3806003
Default Alt Text
(1 KB)

Event Timeline