Back to Serial Studio

MDF Lib: include/mdf/iattachment.h Source File

lib/mdflib/docs/manual/html/iattachment_8h_source.html

3.2.76.6 KB
Original Source

| MDF Lib 2.2

Interface against MDF 3/4 files |

Loading...

Searching...

No Matches

iattachment.h

Go to the documentation of this file.

1/*

2 * Copyright 2021 Ingemar Hedvall

3 * SPDX-License-Identifier: MIT

4 */

5

9#pragma once

10#include <optional>

11#include <string>

12#include "mdf/iblock.h"

13#include "mdf/imetadata.h"

14namespace mdf {

15

21class IAttachment : public IBlock {

22 public:

23virtual ~IAttachment() override = default;

24

26virtual void CreatorIndex(uint16_t creator) = 0;

27

34 [[nodiscard]] virtual uint16_t CreatorIndex() const = 0;

35

36

37virtual void IsEmbedded(bool embed) = 0;

38 [[nodiscard]] virtual bool IsEmbedded() const = 0;

39

40virtual void IsCompressed(bool compress) = 0;

41 [[nodiscard]] virtual bool IsCompressed() const = 0;

42

48 [[nodiscard]] virtual std::optional<std::string> Md5() const = 0;

49

56virtual void FileName(const std::string& filename) = 0;

57

63 [[nodiscard]] virtual const std::string& FileName() const = 0;

64

70virtual void FileType(const std::string& file_type) = 0;

71

77 [[nodiscard]] virtual const std::string& FileType() const = 0;

78

85 [[nodiscard]] virtual IMetaData* CreateMetaData() = 0;

86

92 [[nodiscard]] virtual IMetaData* MetaData() const = 0;

93};

94

95} // namespace mdf

mdf::IAttachment

Interface against an attached file.

Definition iattachment.h:21

mdf::IAttachment::~IAttachment

virtual ~IAttachment() override=default

Default destructor.

mdf::IAttachment::CreatorIndex

virtual void CreatorIndex(uint16_t creator)=0

Sets the Creator index.

mdf::IAttachment::CreatorIndex

virtual uint16_t CreatorIndex() const =0

Returns the creator index.

mdf::IAttachment::FileName

virtual void FileName(const std::string &filename)=0

Sets the filename. Include path.

mdf::IAttachment::IsEmbedded

virtual void IsEmbedded(bool embed)=0

Set true if embedded.

mdf::IAttachment::IsEmbedded

virtual bool IsEmbedded() const =0

True if embedded.

mdf::IAttachment::IsCompressed

virtual bool IsCompressed() const =0

True if compressed.

mdf::IAttachment::FileType

virtual void FileType(const std::string &file_type)=0

Sets the MIME type of the file.

mdf::IAttachment::Md5

virtual std::optional< std::string > Md5() const =0

Return the MDG checksum if it exist.

mdf::IAttachment::FileType

virtual const std::string & FileType() const =0

Returns the MIME type of the string.

mdf::IAttachment::MetaData

virtual IMetaData * MetaData() const =0

Returns the meta-data (MD) block.

mdf::IAttachment::CreateMetaData

virtual IMetaData * CreateMetaData()=0

Create a meta-data (MD) block.

mdf::IAttachment::IsCompressed

virtual void IsCompressed(bool compress)=0

Set true tp compress.

mdf::IAttachment::FileName

virtual const std::string & FileName() const =0

Returns the filename.

mdf::IBlock

Base class for all MDF blocks.

Definition iblock.h:19

mdf::IMetaData

Interface against an meta data block (MD) in a MDF4 file.

Definition imetadata.h:27

iblock.h

All MDF blocks inherits from the IBlock class. The interface class is used internally in lists....

imetadata.h

mdf

Main namespace for the MDF library.

Definition canmessage.h:17


Generated by 1.12.0