taken over interface changes

This commit is contained in:
Robin Müller 2020-08-25 14:00:27 +02:00
parent 9a06cb846c
commit 3001911d69
5 changed files with 482 additions and 482 deletions

View File

@ -1,7 +1,7 @@
#include <framework/serviceinterface/ServiceInterfaceStream.h> #include "../serviceinterface/ServiceInterfaceStream.h"
#include <framework/storagemanager/ConstStorageAccessor.h> #include "../storagemanager/ConstStorageAccessor.h"
#include <framework/storagemanager/StorageManagerIF.h> #include "../storagemanager/StorageManagerIF.h"
#include <framework/globalfunctions/arrayprinter.h> #include "../globalfunctions/arrayprinter.h"
ConstStorageAccessor::ConstStorageAccessor(store_address_t storeId): ConstStorageAccessor::ConstStorageAccessor(store_address_t storeId):
storeId(storeId) {} storeId(storeId) {}

View File

@ -1,7 +1,7 @@
#ifndef FRAMEWORK_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_ #ifndef FRAMEWORK_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_
#define FRAMEWORK_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_ #define FRAMEWORK_STORAGEMANAGER_CONSTSTORAGEACCESSOR_H_
#include "storeAddress.h" #include "../storagemanager/storeAddress.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include <cstddef> #include <cstddef>
@ -80,13 +80,13 @@ public:
* @return * @return
*/ */
ConstStorageAccessor& operator= (ConstStorageAccessor&&); ConstStorageAccessor& operator= (ConstStorageAccessor&&);
ConstStorageAccessor (ConstStorageAccessor&&); ConstStorageAccessor(ConstStorageAccessor&&);
//! The copy ctor and copy assignemnt should be deleted implicitely //! The copy ctor and copy assignemnt should be deleted implicitely
//! according to https://foonathan.net/2019/02/special-member-functions/ //! according to https://foonathan.net/2019/02/special-member-functions/
//! but I still deleted them to make it more explicit. (remember rule of 5). //! but I still deleted them to make it more explicit. (remember rule of 5).
ConstStorageAccessor& operator= (ConstStorageAccessor&) = delete; ConstStorageAccessor& operator=(const ConstStorageAccessor&) = delete;
ConstStorageAccessor (ConstStorageAccessor&) = delete; ConstStorageAccessor(const ConstStorageAccessor&) = delete;
protected: protected:
const uint8_t* constDataPointer = nullptr; const uint8_t* constDataPointer = nullptr;
store_address_t storeId; store_address_t storeId;

View File

@ -1,5 +1,5 @@
#include "StorageAccessor.h" #include "../storagemanager/StorageAccessor.h"
#include "StorageManagerIF.h" #include "../storagemanager/StorageManagerIF.h"
#include "../serviceinterface/ServiceInterfaceStream.h" #include "../serviceinterface/ServiceInterfaceStream.h"
StorageAccessor::StorageAccessor(store_address_t storeId): StorageAccessor::StorageAccessor(store_address_t storeId):

View File

@ -1,7 +1,7 @@
#ifndef FRAMEWORK_STORAGEMANAGER_STORAGEACCESSOR_H_ #ifndef FRAMEWORK_STORAGEMANAGER_STORAGEACCESSOR_H_
#define FRAMEWORK_STORAGEMANAGER_STORAGEACCESSOR_H_ #define FRAMEWORK_STORAGEMANAGER_STORAGEACCESSOR_H_
#include "ConstStorageAccessor.h" #include "../storagemanager/ConstStorageAccessor.h"
class StorageManagerIF; class StorageManagerIF;
@ -17,16 +17,17 @@ class StorageAccessor: public ConstStorageAccessor {
public: public:
StorageAccessor(store_address_t storeId); StorageAccessor(store_address_t storeId);
StorageAccessor(store_address_t storeId, StorageManagerIF* store); StorageAccessor(store_address_t storeId, StorageManagerIF* store);
/** /**
* @brief Move ctor and move assignment allow returning accessors as * @brief Move ctor and move assignment allow returning accessors as
* a returnvalue. They prevent resource being free prematurely. * a returnvalue. They prevent resource being freed prematurely.
* Refer to: https://github.com/MicrosoftDocs/cpp-docs/blob/master/docs/cpp/ * See: https://github.com/MicrosoftDocs/cpp-docs/blob/master/docs/cpp/
* move-constructors-and-move-assignment-operators-cpp.md * move-constructors-and-move-assignment-operators-cpp.md
* @param * @param
* @return * @return
*/ */
StorageAccessor& operator= (StorageAccessor&&); StorageAccessor& operator=(StorageAccessor&&);
StorageAccessor (StorageAccessor&&); StorageAccessor(StorageAccessor&&);
ReturnValue_t write(uint8_t *data, size_t size, ReturnValue_t write(uint8_t *data, size_t size,
uint16_t offset = 0); uint16_t offset = 0);

View File

@ -1,7 +1,6 @@
#ifndef STORAGEMANAGERIF_H_H #ifndef STORAGEMANAGERIF_H_H
#define STORAGEMANAGERIF_H_H #define STORAGEMANAGERIF_H_H
#include "../events/Event.h" #include "../events/Event.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include "../storagemanager/StorageAccessor.h" #include "../storagemanager/StorageAccessor.h"