rms.hpp
Go to the documentation of this file.
00001 #ifndef LIBRMS_RMS_HPP_
00002 #define LIBRMS_RMS_HPP_
00003 
00004 #include <mysql/mysql.h>
00005 #include <rms/study.hpp>
00006 #include <string>
00007 #include <vector>
00008 
00009 namespace librms
00010 {
00011 
00012 class study;
00013 
00014 #define RMS_DEFAULT_SERVER "localhost"
00015 
00016 #define RMS_DEFAULT_PORT 3306
00017 
00018 #define RMS_DEFAULT_USER "ros"
00019 
00020 #define RMS_DEFAULT_PASSWORD ""
00021 
00022 #define RMS_DEFAULT_DATABASE "rms"
00023 
00024 class rms
00025 {
00026 public:
00027   rms(std::string host, unsigned int port, std::string user, std::string password, std::string database);
00028 
00029   ~rms();
00030 
00031   unsigned int get_port() const;
00032 
00033   std::string get_host() const;
00034 
00035   std::string get_user() const;
00036 
00037   std::string get_password() const;
00038 
00039   std::string get_database() const;
00040 
00041   bool connected();
00042 
00043   bool connect();
00044 
00045   librms::study get_study(unsigned int id);
00046 
00047   MYSQL_RES *query(std::string query);
00048 
00049 private:
00050   MYSQL *conn_; 
00052   std::string host_, user_, password_, database_;
00053   bool connected_;
00054   unsigned int port_;
00055 };
00056 
00057 }
00058 
00059 #endif


librms
Author(s): Russell Toris
autogenerated on Fri Aug 28 2015 11:26:43