F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
SerializableFile.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title SerializableFile.hpp
3// \author dinkel
4// \brief hpp file for SerializableFile
5//
6// \copyright
7// Copyright 2009-2016, by the California Institute of Technology.
8// ALL RIGHTS RESERVED. United States Government Sponsorship
9// acknowledged.
10//
11// ======================================================================
12
13#ifndef Fw_SerializableFile_HPP
14#define Fw_SerializableFile_HPP
15
19
20namespace Fw {
21
24
25 public:
26 enum Status {
32 };
33
34 // NOTE!: This should not be used with an allocator that can return a smaller buffer than requested
35 SerializableFile(MemAllocator* allocator, NATIVE_UINT_TYPE maxSerializedSize);
37
38 Status load(const char* fileName, Serializable& serializable);
39 Status save(const char* fileName, Serializable& serializable);
40
41 PRIVATE:
42 void reset();
43 MemAllocator* allocator;
44 bool recoverable; // don't care; for allocator
45 NATIVE_UINT_TYPE actualSize; // for checking
46 SerialBuffer buffer;
47 };
48}
49
50#endif
PlatformUIntType NATIVE_UINT_TYPE
Definition BasicTypes.h:52
Defines a base class for a memory allocator for classes.
A variable-length serializable buffer.
The type of a packet header.
Status save(const char *fileName, Serializable &serializable)
Status load(const char *fileName, Serializable &serializable)
forward declaration
Definition Buffer.cpp:21