diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-10-23 22:12:59 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-10-23 22:12:59 +0100 |
commit | a64ba4196d174808f58e55f25d19555b2b1e553a (patch) | |
tree | e51a90ef99a658c6a8acc6792e28c8b57f87dbb8 | |
parent | Fix conversion type for sqlSource Ice::Short (diff) | |
download | slicer-a64ba4196d174808f58e55f25d19555b2b1e553a.tar.bz2 slicer-a64ba4196d174808f58e55f25d19555b2b1e553a.tar.xz slicer-a64ba4196d174808f58e55f25d19555b2b1e553a.zip |
Const connection pointers
-rw-r--r-- | slicer/db/sqlInsertSerializer.cpp | 6 | ||||
-rw-r--r-- | slicer/db/sqlInsertSerializer.h | 4 | ||||
-rw-r--r-- | slicer/db/sqlUpdateSerializer.cpp | 2 | ||||
-rw-r--r-- | slicer/db/sqlUpdateSerializer.h | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/slicer/db/sqlInsertSerializer.cpp b/slicer/db/sqlInsertSerializer.cpp index e8d44f5..2c2a0d5 100644 --- a/slicer/db/sqlInsertSerializer.cpp +++ b/slicer/db/sqlInsertSerializer.cpp @@ -9,7 +9,7 @@ namespace Slicer { const std::string md_auto = "db:auto"; - SqlInsertSerializer::SqlInsertSerializer(DB::Connection * c, const std::string & t) : + SqlInsertSerializer::SqlInsertSerializer(const DB::Connection * c, const std::string & t) : connection(c), tableName(t) { @@ -59,7 +59,7 @@ namespace Slicer { class IdSave : public Slicer::ValueSource { public: - IdSave(DB::Connection * c) : + IdSave(const DB::Connection * c) : connection(c) { } @@ -81,7 +81,7 @@ namespace Slicer { NumType(Ice::Double); private: - DB::Connection * connection; + const DB::Connection * connection; }; void diff --git a/slicer/db/sqlInsertSerializer.h b/slicer/db/sqlInsertSerializer.h index 359c655..389cea8 100644 --- a/slicer/db/sqlInsertSerializer.h +++ b/slicer/db/sqlInsertSerializer.h @@ -11,7 +11,7 @@ namespace Slicer { public: typedef boost::shared_ptr<DB::ModifyCommand> ModifyPtr; - SqlInsertSerializer(DB::Connection *, const std::string & tableName); + SqlInsertSerializer(const DB::Connection *, const std::string & tableName); virtual void Serialize(Slicer::ModelPartPtr) override; @@ -23,7 +23,7 @@ namespace Slicer { virtual void bindObjectAndExecute(Slicer::ModelPartPtr, DB::ModifyCommand *) const; virtual void bindObjectAndExecuteField(int & paramNo, DB::ModifyCommand *, Slicer::ModelPartPtr, HookCommonPtr) const; - DB::Connection * connection; + const DB::Connection * connection; const std::string tableName; }; diff --git a/slicer/db/sqlUpdateSerializer.cpp b/slicer/db/sqlUpdateSerializer.cpp index 75cbaae..f59e8ff 100644 --- a/slicer/db/sqlUpdateSerializer.cpp +++ b/slicer/db/sqlUpdateSerializer.cpp @@ -10,7 +10,7 @@ namespace Slicer { const std::string md_pkey = "db:pkey"; - SqlUpdateSerializer::SqlUpdateSerializer(DB::Connection * c, const std::string & t) : + SqlUpdateSerializer::SqlUpdateSerializer(const DB::Connection * c, const std::string & t) : connection(c), tableName(t) { diff --git a/slicer/db/sqlUpdateSerializer.h b/slicer/db/sqlUpdateSerializer.h index 6d9ef04..508bd2d 100644 --- a/slicer/db/sqlUpdateSerializer.h +++ b/slicer/db/sqlUpdateSerializer.h @@ -15,7 +15,7 @@ namespace Slicer { public: typedef boost::shared_ptr<DB::ModifyCommand> ModifyPtr; - SqlUpdateSerializer(DB::Connection *, const std::string & tableName); + SqlUpdateSerializer(const DB::Connection *, const std::string & tableName); virtual void Serialize(Slicer::ModelPartPtr) override; @@ -25,7 +25,7 @@ namespace Slicer { ModifyPtr createUpdate(Slicer::ModelPartPtr) const; static void bindObjectAndExecute(Slicer::ModelPartPtr, DB::ModifyCommand *); - DB::Connection * connection; + const DB::Connection * connection; const std::string tableName; }; } |