From 14a14b11dc2b92670e8d85b8ef20aa4389fc447a Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Thu, 5 Aug 2021 10:06:59 +0200
Subject: [PATCH] DOC: Moved some doc strings

---
 include/caosdb/status_code.h        |  5 ++---
 include/caosdb/transaction.h        | 18 ++++++++++--------
 include/caosdb/transaction_status.h | 16 ++++++----------
 3 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/include/caosdb/status_code.h b/include/caosdb/status_code.h
index 9ca2f34..26f4abd 100644
--- a/include/caosdb/status_code.h
+++ b/include/caosdb/status_code.h
@@ -24,6 +24,8 @@
 
 #include <string>
 
+namespace caosdb {
+
 /**
  * StatusCodes represent the status of this client, it's connections,
  * configuration and so on.
@@ -33,9 +35,6 @@
  * GENERIC_TRANSACTION_ERROR indicates that *there are* errors in a
  * transaction).
  */
-
-namespace caosdb {
-
 enum StatusCode {
   INITIAL = -2,
   EXECUTING = -1,
diff --git a/include/caosdb/transaction.h b/include/caosdb/transaction.h
index 80d77d1..653dcf7 100644
--- a/include/caosdb/transaction.h
+++ b/include/caosdb/transaction.h
@@ -18,12 +18,8 @@
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
  *
  */
-
 #ifndef CAOSDB_TRANSACTION_H
 #define CAOSDB_TRANSACTION_H
-/**
- * @brief Creation and execution of transactions.
- */
 #include "boost/log/core/record.hpp"                  // for record
 #include "boost/log/sources/record_ostream.hpp"       // for basic_record_o...
 #include "boost/preprocessor/seq/limits/enum_256.hpp" // for BOOST_PP_SEQ_E...
@@ -41,7 +37,14 @@
 #include <string> // for string
 #include <vector> // for vector
 
-/*
+/**
+ * @brief Creation and execution of transactions.
+ * @author Timm Fitschen
+ * @date 2021-08-05
+ */
+namespace caosdb::transaction {
+
+/**
  * Do all necessary checks and assure that another retrieval (by id or by
  * query) can be added as a sub-request to a transaction.
  */
@@ -62,7 +65,7 @@
       "wrong TransactionType.")                                                \
   }
 
-/*
+/**
  * Do all necessary checks and assure that another deletion can be added as a
  * sub-request to a transaction.
  */
@@ -84,7 +87,7 @@
       "wrong TransactionType.")                                                \
   }
 
-/*
+/**
  * Do all necessary checks and assure that another insertion can be added as a
  * sub-request to a transaction.
  */
@@ -106,7 +109,6 @@
       "wrong TransactionType.")                                                \
   }
 
-namespace caosdb::transaction {
 using caosdb::entity::Entity;
 using ProtoEntity = caosdb::entity::v1alpha1::Entity;
 using caosdb::entity::v1alpha1::EntityTransactionService;
diff --git a/include/caosdb/transaction_status.h b/include/caosdb/transaction_status.h
index 8e54c8b..56c6b00 100644
--- a/include/caosdb/transaction_status.h
+++ b/include/caosdb/transaction_status.h
@@ -22,15 +22,6 @@
 #ifndef CAOSDB_TRANSACTION_STATUS_H
 #define CAOSDB_TRANSACTION_STATUS_H
 
-/**
- * TransactionStatus indicates the current status of a transaction and, when it
- * has already terminated, whether the transaction has been successful or not.
- *
- * A status code of 0 denotes a generic success state, positive values indicate
- * errors, and negative values indicate other states, such as different stages
- * of a transaction in process.
- */
-
 #include "caosdb/status_code.h"
 #include "caosdb/exceptions.h"
 #include <memory> // for shared_ptr, unique_ptr
@@ -44,7 +35,12 @@ using caosdb::exceptions::Exception;
 using caosdb::exceptions::TransactionError;
 
 /**
- * Status of a Request or Transaction.
+ * TransactionStatus indicates the current status of a transaction and, when it
+ * has already terminated, whether the transaction has been successful or not.
+ *
+ * A status code of 0 denotes a generic success state, positive values indicate
+ * errors, and negative values indicate other states, such as different stages
+ * of a transaction in process.
  */
 class TransactionStatus {
 public:
-- 
GitLab