/usr/include/dballe/db/mem/cursor.h is in libdballe-dev 7.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | #ifndef DBA_DB_MEM_CURSOR_H
#define DBA_DB_MEM_CURSOR_H
#include <dballe/memdb/memdb.h>
#include <dballe/memdb/results.h>
#include <dballe/db/db.h>
#include <iosfwd>
namespace dballe {
struct DB;
struct Record;
namespace memdb {
template<typename T> class ValueStorage;
}
namespace db {
namespace mem {
struct DB;
/**
* Simple typedef to make typing easier, and also to help some versions of swig
* match this complex type
*/
typedef std::vector<wreport::Varcode> AttrList;
namespace cursor {
std::unique_ptr<db::CursorStation> createStations(mem::DB& db, unsigned modifiers, memdb::Results<memdb::Station>& res);
std::unique_ptr<db::CursorStationData> createStationData(mem::DB& db, unsigned modifiers, memdb::Results<memdb::StationValue>& res);
std::unique_ptr<db::CursorData> createData(mem::DB& db, unsigned modifiers, memdb::Results<memdb::Value>& res);
std::unique_ptr<db::CursorData> createDataBest(mem::DB& db, unsigned modifiers, memdb::Results<memdb::Value>& res);
std::unique_ptr<db::CursorSummary> createSummary(mem::DB& db, unsigned modifiers, memdb::Results<memdb::Value>& res);
/**
* Wrapper around a Value index that compares so that all values from which the
* best report should be selected appear to be the same.
*
* This is exported only so that it can be unit tested.
*/
struct DataBestKey
{
const memdb::ValueStorage<memdb::Value>& values;
size_t idx;
DataBestKey(const memdb::ValueStorage<memdb::Value>& values, size_t idx);
const memdb::Value& value() const { return *values[idx]; }
bool operator<(const DataBestKey& o) const;
};
std::ostream& operator<<(std::ostream& out, const DataBestKey& k);
}
}
}
}
#endif
|