Adding Simple Objest test. Fixes some bugs

This commit is contained in:
IlushaShurupov 2023-07-31 20:16:05 +03:00 committed by Ilya Shurupov
parent edf0548046
commit 63029e6083
10 changed files with 74 additions and 15 deletions

View file

@ -46,14 +46,18 @@ namespace obj {
public:
Archiver() = default;
explicit Archiver(const char* location) {};
explicit Archiver(const char* location) {
mConnection.connect(tp::LocalConnection::Location(location), tp::LocalConnection::Type(tRead));
};
void writeBytes(const tp::int1* val, tp::ualni size) override {
mConnection.setPointer(mAddress);
mConnection.writeBytes(val, size);
incrementAddresses(size);
}
void readBytes(tp::int1* val, tp::ualni size) override {
mConnection.setPointer(mAddress);
mConnection.readBytes(val, size);
incrementAddresses(size);
}
@ -68,7 +72,7 @@ namespace obj {
bool isOpened() { return mConnection.getConnectionStatus().isOpened(); }
bool getSize() { return mConnection.size(); }
tp::ualni getSize() { return mConnection.size(); }
private:
void incrementAddresses(tp::ualni size) {