Object structure. More...

#include <Object.h>

Collaboration diagram for IFS::Object:
[legend]

Public Types

enum  Type { Type::XX }
 
enum  Attribute { Attribute::ReadOnly, Attribute::Archive, Attribute::MAX }
 Object attributes. More...
 
using ID = uint16_t
 Object identifier. More...
 
using Attributes = BitSet< uint8_t, Attribute, size_t(Attribute::MAX)>
 

Public Member Functions

Type type () const
 
bool isRef () const
 
bool isNamed () const
 
bool isData () const
 
bool isDir () const
 
bool isMountPoint () const
 
size_t contentOffset () const
 return offset to start of object content More...
 
uint32_t contentSize () const
 return size of object content, excluding header and size fields More...
 
uint32_t childTableOffset () const
 
uint32_t childTableSize () const
 
uint32_t size () const
 total size this object occupies in the image More...
 
uint32_t sizeAligned () const
 

Public Attributes

uint8_t typeData
 Stored type plus flag. More...
 
union {
   struct {
      uint8_t   _contentSize
 
      union {
         struct {
            ID   id
 
         }   ref
 
         struct {
            uint32_t   value
 32-bit identifier, e.g. volume ID More...
 
         }   id32
 
         struct {
            uint8_t   attr
 
         }   objectAttributes
 
         struct {
            Compression::Type   type
 
            uint32_t   originalSize
 
         }   compression
 
         struct {
            UserRole   role
 
         }   ace
 
         struct {
            uint8_t   storenum
 
         }   objectStore
 
         struct {
            uint32_t   checksum
 
         }   end
 
      } 
 
   }   data8
 
   struct {
      uint16_t   _contentSize
 
      union {
         struct {
            uint8_t   namelen
 Length of object name. More...
 
            TimeStamp   mtime
 
         }   named
 
      } 
 
   }   data16
 
   struct {
      uint16_t   _contentSize
 Object size (excluding this header) More...
 
      uint8_t   _contentSizeHigh
 Allows data up to 16MByte. More...
 
   }   data24
 
}; 
 

Static Public Attributes

static constexpr uint8_t FWOBT_REF {0x80}
 

Detailed Description

Object structure.

Note
all objects conform to this structure. Only the first word (4 bytes) are required to nagivate the file system. All objects have an 8, 16 or 24-bit size field. Content is always immediately after this field. Reference objects are always 8-bit sized.

Member Typedef Documentation

◆ Attributes

◆ ID

Object identifier.

Member Enumeration Documentation

◆ Attribute

Object attributes.

Note
these are bit values
Enumerator
ReadOnly 

Object should not be modified or deleted.

Archive 

Object modified flag.

Note
Object has been changed on disk. Typically used by backup applications
MAX 

◆ Type

enum IFS::Object::Type
strong
Enumerator
XX 

Member Function Documentation

◆ childTableOffset()

uint32_t IFS::Object::childTableOffset ( ) const
inline

◆ childTableSize()

uint32_t IFS::Object::childTableSize ( ) const
inline

◆ contentOffset()

size_t IFS::Object::contentOffset ( ) const
inline

return offset to start of object content

◆ contentSize()

uint32_t IFS::Object::contentSize ( ) const
inline

return size of object content, excluding header and size fields

Return values
sizeor error code
Note
must check return error code

◆ isData()

bool IFS::Object::isData ( ) const
inline

◆ isDir()

bool IFS::Object::isDir ( ) const
inline

◆ isMountPoint()

bool IFS::Object::isMountPoint ( ) const
inline

◆ isNamed()

bool IFS::Object::isNamed ( ) const
inline

◆ isRef()

bool IFS::Object::isRef ( ) const
inline

◆ size()

uint32_t IFS::Object::size ( ) const
inline

total size this object occupies in the image

Return values
sizeor error code
Note
objects are word-aligned but this method returns only the used size

◆ sizeAligned()

uint32_t IFS::Object::sizeAligned ( ) const
inline

◆ type()

Type IFS::Object::type ( ) const
inline

Member Data Documentation

◆ @18

union { ... }

◆ _contentSize [1/2]

uint8_t IFS::Object::_contentSize

◆ _contentSize [2/2]

uint16_t IFS::Object::_contentSize

Object size (excluding this header)

◆ _contentSizeHigh

uint8_t IFS::Object::_contentSizeHigh

Allows data up to 16MByte.

◆ ace

struct { ... } IFS::Object::ace

◆ attr

uint8_t IFS::Object::attr

◆ checksum

uint32_t IFS::Object::checksum

◆ compression

struct { ... } IFS::Object::compression

◆ data16

struct { ... } IFS::Object::data16

◆ data24

struct { ... } IFS::Object::data24

◆ data8

struct { ... } IFS::Object::data8

◆ end

struct { ... } IFS::Object::end

◆ FWOBT_REF

constexpr uint8_t IFS::Object::FWOBT_REF {0x80}
static

◆ id

ID IFS::Object::id

◆ id32

struct { ... } IFS::Object::id32

◆ mtime

TimeStamp IFS::Object::mtime

◆ named

struct { ... } IFS::Object::named

◆ namelen

uint8_t IFS::Object::namelen

Length of object name.

◆ objectAttributes

struct { ... } IFS::Object::objectAttributes

◆ objectStore

struct { ... } IFS::Object::objectStore

◆ originalSize

uint32_t IFS::Object::originalSize

◆ ref

struct { ... } IFS::Object::ref

◆ role

UserRole IFS::Object::role

◆ storenum

uint8_t IFS::Object::storenum

◆ type

Compression::Type IFS::Object::type

◆ typeData

uint8_t IFS::Object::typeData

Stored type plus flag.

◆ value

uint32_t IFS::Object::value

32-bit identifier, e.g. volume ID


The documentation for this struct was generated from the following file: