mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
* Pull in framework changes from data-products branch * Pull in changes to DpManager from data-products branch * Pull in DpWriter from data-products branch * Fix spelling * Revise FileNameString * Fix warnings in CI * Fix static analysis warnings * Fix static analysis warnings * Revise formatting and comments * Revise banner comments * Revise FileNameString per PR comment * Revise path names in config headers If a header H.hpp exists in the F Prime source base, then is dangerous. Because [project root] and [fprime root] are both in the list of include paths, it's not clear whether this means "include [project root]/config/H.hpp" or "include [fprime root]/config/H.hpp." On the other hand, or has no such ambiguity, because only one of [project root]/config and [fprime root]/config is in the list of include paths. * Revise path names in config headers If a header H.hpp exists in the F Prime source base, then `#include "config/H.hpp"` is dangerous. Because [project root] and [fprime root] are both in the list of include paths, it's not clear whether this means "include [project root]/config/H.hpp" or "include [fprime root]/config/H.hpp." On the other hand, include <config/H.hpp> or `#include "config/H.hpp"` has no such ambiguity, because only one of [project root]/config and [fprime root]/config is in the list of include paths.
38 lines
1.5 KiB
C++
38 lines
1.5 KiB
C++
#ifndef FW_FILENAMESTRING_HPP
|
|
#define FW_FILENAMESTRING_HPP
|
|
|
|
#include <FpConfig.hpp>
|
|
|
|
#include "Fw/Cfg/SerIds.hpp"
|
|
#include "Fw/Types/StringType.hpp"
|
|
#include "config/FppConstantsAc.hpp"
|
|
|
|
namespace Fw {
|
|
|
|
class FileNameString : public Fw::StringBase {
|
|
public:
|
|
enum {
|
|
SERIALIZED_TYPE_ID = FW_TYPEID_FILE_NAME_STRING, //!< typeid for string type
|
|
STRING_SIZE = FileNameStringSize, //!< Storage for string
|
|
SERIALIZED_SIZE = STRING_SIZE + sizeof(FwBuffSizeType) //!< Serialized size is size of buffer + size field
|
|
};
|
|
|
|
explicit FileNameString(const char* src); //!< char* source constructor
|
|
explicit FileNameString(const StringBase& src); //!< other string constructor
|
|
explicit FileNameString(const FileNameString& src); //!< String string constructor
|
|
FileNameString(); //!< default constructor
|
|
FileNameString& operator=(const FileNameString& other); //!< assignment operator
|
|
FileNameString& operator=(const StringBase& other); //!< other string assignment operator
|
|
FileNameString& operator=(const char* other); //!< char* assignment operator
|
|
~FileNameString(); //!< destructor
|
|
|
|
const char* toChar() const; //!< gets char buffer
|
|
NATIVE_UINT_TYPE getCapacity() const; //!< return buffer size
|
|
|
|
private:
|
|
char m_buf[FileNameString::STRING_SIZE]; //!< storage for string data
|
|
};
|
|
} // namespace Fw
|
|
|
|
#endif
|