v2.0.0
Loading...
Searching...
No Matches
FIFFLIB::FiffId Class Reference

Universally unique identifier. More...

#include <fiff_id.h>

Public Types

typedef QSharedPointer< FiffIdSPtr
typedef QSharedPointer< const FiffIdConstSPtr

Public Member Functions

 FiffId ()
 FiffId (const FiffId &p_FiffId)
 ~FiffId ()
void clear ()
void print () const
bool isEmpty () const
QString toMachidString () const

Static Public Member Functions

static FiffId new_file_id ()
static bool get_machid (int *fixed_id)
static FiffIdgetDefault ()
static qint32 storageSize ()

Public Attributes

fiff_int_t version
fiff_int_t machid [2]
FiffTime time

Friends

bool operator== (const FiffId &f1, const FiffId &f2)

Detailed Description

Universally unique identifier.

These universally unique identifiers are also used to identify blocks within the files.

Definition at line 67 of file fiff_id.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const FiffId> FIFFLIB::FiffId::ConstSPtr

Const shared pointer type for FiffId.

Definition at line 71 of file fiff_id.h.

◆ SPtr

typedef QSharedPointer<FiffId> FIFFLIB::FiffId::SPtr

Shared pointer type for FiffId.

Definition at line 70 of file fiff_id.h.

Constructor & Destructor Documentation

◆ FiffId() [1/2]

FiffId::FiffId ( )

Default Constructor

Definition at line 57 of file fiff_id.cpp.

◆ FiffId() [2/2]

FiffId::FiffId ( const FiffId & p_FiffId)

Copy constructor.

Parameters
[in]p_FiffIdUniversially unique identifier which should be copied.

Definition at line 68 of file fiff_id.cpp.

◆ ~FiffId()

FiffId::~FiffId ( )

Destroys the universially unique identifier.

Definition at line 79 of file fiff_id.cpp.

Member Function Documentation

◆ clear()

void FiffId::clear ( )

Resets the File identifier.

Definition at line 115 of file fiff_id.cpp.

◆ get_machid()

bool FiffId::get_machid ( int * fixed_id)
static

Returns the machine ID consisting of a two integer number.

Parameters
[out]fixed_idPointer to an array of at least 2 ints to receive the machine ID.
Returns
true if succeeded, false otherwise.

Definition at line 126 of file fiff_id.cpp.

◆ getDefault()

FiffId & FiffId::getDefault ( )
static

Returns a default FiffId object to be used as a mutable placeholder for a default instance of the class.

Returns
Reference to the default FiffId instance.

Definition at line 210 of file fiff_id.cpp.

◆ isEmpty()

bool FIFFLIB::FiffId::isEmpty ( ) const
inline

True if FIFF id is empty.

Returns
true if FIFF id is empty.

Definition at line 176 of file fiff_id.h.

◆ new_file_id()

FiffId FiffId::new_file_id ( )
static

Constructs a (hopefully) unique file id.

Returns
A new unique FiffId.

Definition at line 85 of file fiff_id.cpp.

◆ print()

void FiffId::print ( ) const

Prints the id.

Definition at line 164 of file fiff_id.cpp.

◆ storageSize()

qint32 FIFFLIB::FiffId::storageSize ( )
inlinestatic

Size of the old struct (fiffIdRec) 5*int = 5*4 = 20

Returns
the size of the old struct fiffIdRec.

Definition at line 183 of file fiff_id.h.

◆ toMachidString()

QString FiffId::toMachidString ( ) const

Returns the machine ID as a human-readable string.

Returns
The machine ID formatted as a string.

Definition at line 175 of file fiff_id.cpp.

◆ operator==

bool operator== ( const FiffId & f1,
const FiffId & f2 )
friend

Compares two FiffId instances for equality.

Parameters
[in]f1First FiffId.
[in]f2Second FiffId.
Returns
true if both IDs are equal, false otherwise.

Definition at line 190 of file fiff_id.h.

Member Data Documentation

◆ machid

fiff_int_t FIFFLIB::FiffId::machid[2]

Unique machine ID.

Definition at line 167 of file fiff_id.h.

◆ time

FiffTime FIFFLIB::FiffId::time

Time of the ID creation.

Definition at line 168 of file fiff_id.h.

◆ version

fiff_int_t FIFFLIB::FiffId::version

File version.

Definition at line 166 of file fiff_id.h.


The documentation for this class was generated from the following files: