62 [[nodiscard]]
virtual std::string
Version()
const = 0;
94 virtual void ProgramId(
const std::string& program_id) = 0;
102 [[nodiscard]]
virtual std::string
ProgramId()
const = 0;
138 [[nodiscard]]
virtual bool IsMdf4()
const = 0;
181 virtual bool Write(std::FILE* file) = 0;
189 [[nodiscard]]
const std::string&
Name()
const {
return name_; }
197 void Name(
const std::string& name) { name_ = name; }
204 [[nodiscard]]
const std::string&
FileName()
const {
return filename_; }
215 uint16_t standard_flags, uint16_t custom_flags) = 0;
218 uint16_t& custom_flags)
const = 0;
235 std::string filename_;
Interface against an attached file.
Definition iattachment.h:21
Defines a MDF channel (CN) block.
Definition ichannel.h:126
Interface to a data group (DG) block.
Definition idatagroup.h:42
Implements an user interface against a MDF file.
Definition mdffile.h:37
virtual void ProgramId(const std::string &program_id)=0
Sets the program identifier int the ID block.
virtual void IsFinalized(bool finalized, std::FILE *file, uint16_t standard_flags, uint16_t custom_flags)=0
Sets the finalize state for the file.
virtual void DataGroups(DataGroupList &dest) const =0
Fetch a list of all measurements.
virtual std::string Version() const =0
Returns the file version.
const std::string & Name() const
Display name of the file.
Definition mdffile.h:189
virtual bool Write(std::FILE *file)=0
Saves all blocks onto the file.
MdfFile()=default
Default constructor.
virtual std::string ProgramId() const =0
Returns the program identifier.
virtual bool IsFinalized(uint16_t &standard_flags, uint16_t &custom_flags) const =0
Returns true if the file is finalized.
virtual void ReadEverythingButData(std::FILE *file)=0
Reads in all expect raw data from the file.
int MainVersion() const
Returns the main version of the file.
virtual bool IsFinalizedDone() const
virtual void ReadHeader(std::FILE *file)=0
Reads the information about the file.
virtual IHeader * Header() const =0
Returns the header object.
virtual void Attachments(AttachmentList &dest) const =0
Fetch a list of attachments.
virtual bool IsMdf4() const =0
Returns true if this is a MDF4 file.
virtual void ReadMeasurementInfo(std::FILE *file)=0
Reads the measurement information about the file.
virtual void MinorVersion(int minor)=0
Sets the minor version of the file.
virtual IDataGroup * CreateDataGroup()=0
Creates a new measurement (DG block).
virtual ~MdfFile()=default
Default destructor.
const std::string & FileName() const
Returns the full name of the file.
Definition mdffile.h:204
virtual IDataGroup * FindParentDataGroup(const IChannel &channel) const =0
Returns a parent data group (DG) depending a channel.
void Name(const std::string &name)
Set the display name of the file.
Definition mdffile.h:197
virtual IAttachment * CreateAttachment()
Creates a new attachment (AT block).
void FileName(const std::string &filename)
Sets the file name.
int MinorVersion() const
Returns the minor version number of the MDF file.
Main namespace for the MDF library.
Definition canmessage.h:17
std::vector< const IAttachment * > AttachmentList
List of pointers to attachments.
Definition mdffile.h:24
std::vector< IDataGroup * > DataGroupList
List of pointers to measurements (DG block).
Definition mdffile.h:28