CARMA C++
PDB_Validator.h
1 /*
2  * Project Database MongoDB Validator
3  */
4 
5 #ifndef PDB_VALIDATOR_H
6 #define PDB_VALIDATOR_H
7 
8 #include <mongo/client/dbclient.h>
9 #include <mongo/bson/bsonobj.h>
10 #include <string>
11 
12 namespace carma {
13 namespace observertools {
14 
15 // forward declaration to avoid bringing in an extra header
16 class PDB_DB_Params;
17 
18 std::string getObjectName(const mongo::BSONObj &obj);
19 
20 void checkProjectObject(const mongo::BSONObj &obj);
21 void checkObsblockObject(const mongo::BSONObj &obj);
22 void checkSubobsblockObject(const mongo::BSONObj &obj);
23 void checkTrialObject(const mongo::BSONObj &obj);
24 void checkScriptObject(const mongo::BSONObj &obj);
25 
26 // check the entire database, returning the number of failures
27 unsigned int checkEntireDatabase(const PDB_DB_Params &db);
28 
29 } // namespace carma::observertools
30 } // namespace carma
31 
32 #endif /* PDB_VALIDATOR_H */
33 
34 /* vim: set ts=8 sts=8 sw=8 noet tw=92: */