Mapper  0.9.0
API documentation
Namespaces | Classes | Typedefs | Enumerations | Functions
Ocd Namespace Reference

Namespaces

 string
 Private OCD string implementation details.
 

Classes

struct  AreaSymbolCommonV8
 
struct  AreaSymbolV11
 
struct  AreaSymbolV12
 
struct  AreaSymbolV8
 
struct  AreaSymbolV9
 
struct  BaseSymbolV11
 
struct  BaseSymbolV8
 
struct  BaseSymbolV9
 
struct  BasicTextAttributesV8
 
struct  CmykScreenV8
 
struct  CmykV8
 
struct  ColorInfoV8
 
struct  Custom8BitEncoding
 A trait for strings and file formats that use a custom 8 bit encoding. More...
 
struct  ExportSetupV8
 
struct  FileHeaderGeneric
 The generic header at the beginning of all supported OCD file formats. More...
 
struct  FileHeaderV12
 
struct  FileHeaderV8
 
struct  FileHeaderV9
 
struct  FormatV11
 OCD file format version 11 trait. More...
 
struct  FormatV12
 OCD file format version 11 trait. More...
 
struct  FormatV8
 OCD file format version 8 trait. More...
 
struct  FormatV9
 OCD file format version 9 trait. More...
 
struct  FramingAttributesV8
 
struct  GpsPointV8
 
struct  IconV8
 
struct  IconV9
 
struct  IndexBlock
 An IndexBlock collects 256 index entries, and the file position of the next index block if more index entries exist. More...
 
struct  LineSymbolCommonV8
 
struct  LineSymbolV11
 
struct  LineSymbolV8
 
struct  LineSymbolV9
 
struct  LineTextSymbolV11
 
struct  LineTextSymbolV8
 
struct  LineTextSymbolV9
 
struct  ObjectIndexEntryV8
 
struct  ObjectIndexEntryV9
 
struct  ObjectV12
 
struct  ObjectV8
 
struct  ObjectV9
 
struct  OcdPoint32
 The OCD file point data type. More...
 
struct  ParameterString
 The parameter string trait. More...
 
struct  ParameterStringIndexEntry
 An index entry for a parameter string. More...
 
struct  PascalString
 A string of max. More...
 
struct  PointSymbolElementV8
 
struct  PointSymbolV11
 
struct  PointSymbolV8
 
struct  PointSymbolV9
 
struct  PrintSetupV8
 
struct  RectangleSymbolV11
 
struct  RectangleSymbolV8
 
struct  RectangleSymbolV9
 
struct  SeparationInfoV8
 
struct  SetupV8
 
struct  SpecialTextAttributesV8
 
struct  SymbolHeaderV8
 
struct  SymbolIndexEntry
 An index entry for a symbol. More...
 
struct  TextSymbolV11
 
struct  TextSymbolV8
 
struct  TextSymbolV9
 
struct  Utf16PascalString
 A UTF-16LE-encoded string of max. More...
 
struct  Utf8Encoding
 A trait for strings and file formats that use UTF-8 encoding. More...
 
struct  Utf8PascalString
 A UTF-8-encoded string of max. More...
 
struct  ZoomRectV8
 

Typedefs

using FormatV10 = FormatV9
 
using FormatV2018 = FormatV12
 
typedef double PascalDouble
 

Enumerations

enum  FileType {
  TypeMap = 0, TypeCourseSetting = 1, TypeMapV8 = 2, TypeCourseSettingV8 = 3,
  TypeMapV7 = 7
}
 OCD filetypes. More...
 
enum  SymbolType {
  SymbolTypePoint = 1, SymbolTypeLine = 2, SymbolTypeArea = 3, SymbolTypeText = 4,
  SymbolTypeRectangle_V8 = 5, SymbolTypeLineText = 6, SymbolTypeRectangle_V9 = 7
}
 Symbol type values. More...
 
enum  SymbolFlags { SymbolRotatable = 0x01, SymbolIconCompressedV8 = 0x02, SymbolFavorite = 0x04 }
 General flags for symbols. More...
 
enum  SymbolStatus { SymbolNormal = 0, SymbolProtected = 1, SymbolHidden = 2 }
 Status flags for symbols. More...
 
enum  ObjectStatus { ObjectDeleted = 0, ObjectNormal = 1, ObjectHidden = 2, ObjectDeletedForUndo = 3 }
 Status values for objects. More...
 
enum  TextAlignment {
  HAlignMask = 0x03, HAlignLeft = 0x00, HAlignCenter = 0x01, HAlignRight = 0x02,
  HAlignJustified = 0x03, VAlignMask = 0x0c, VAlignBottom = 0x00, VAlignMiddle = 0x04,
  VAlignTop = 0x08
}
 Text alignment flags. More...
 
enum  HatchMode { HatchNone = 0, HatchSingle = 1, HatchCross = 2 }
 Area hatch mode values. More...
 
enum  StructureMode { StructureNone = 0, StructureAlignedRows = 1, StructureShiftedRows = 2 }
 Area pattern structure values. More...
 
enum  FramingMode { FramingNone = 0, FramingShadow = 1, FramingLine = 2, FramingRectangle = 3 }
 

Functions

 Q_STATIC_ASSERT (sizeof(double)==8)
 
 Q_STATIC_ASSERT (sizeof(FileHeaderGeneric)==8)
 
 Q_STATIC_ASSERT (sizeof(FormatV8::FileHeader) - sizeof(SymbolHeaderV8)==48)
 
 Q_STATIC_ASSERT (sizeof(FormatV9::FileHeader)==48)
 
 Q_STATIC_ASSERT (sizeof(FormatV12::FileHeader)==60)
 
 Q_STATIC_ASSERT (std::extent< decltype(IconV8::bits)>::value==IconV8::length())
 
 Q_STATIC_ASSERT (std::extent< decltype(IconV9::bits)>::value==IconV9::length())
 
bool operator== (const IconV8 &lhs, const IconV8 &rhs)
 
bool operator== (const IconV9 &lhs, const IconV9 &rhs)
 
const void * getBlockCheckedRaw (const QByteArray &byte_array, quint32 pos, quint32 block_size)
 
QByteArrayaddPadding (QByteArray &byte_array)
 Adds padding so that the next data is appended at a multiple of 8. More...
 
template<class BlockType >
const BlockType * getBlockChecked (const QByteArray &byte_array, quint32 pos)
 Returns a pointer to the (index) block at pos inside byte_array. More...
 
template<class BlockType >
BlockType * getBlockChecked (QByteArray &byte_array, quint32 pos)
 Returns a pointer to the (index) block at pos inside byte_array. More...
 
bool operator== (const CmykScreenV8 &lhs, const CmykScreenV8 &rhs)
 
bool operator!= (const CmykScreenV8 &lhs, const CmykScreenV8 &rhs)
 
bool operator!= (const IconV8 &lhs, const IconV8 &rhs)
 
bool operator!= (const IconV9 &lhs, const IconV9 &rhs)
 

Typedef Documentation

◆ FormatV10

using Ocd::FormatV10 = typedef FormatV9

◆ FormatV2018

using Ocd::FormatV2018 = typedef FormatV12

◆ PascalDouble

typedef double Ocd::PascalDouble

Enumeration Type Documentation

◆ FileType

OCD filetypes.

Enumerator
TypeMap 
TypeCourseSetting 
TypeMapV8 
TypeCourseSettingV8 
TypeMapV7 

◆ FramingMode

Enumerator
FramingNone 
FramingShadow 
FramingLine 

Somehow different in older versions.

FramingRectangle 
Since
V7

◆ HatchMode

Area hatch mode values.

Enumerator
HatchNone 
HatchSingle 
HatchCross 

◆ ObjectStatus

Status values for objects.

Enumerator
ObjectDeleted 
ObjectNormal 
ObjectHidden 
ObjectDeletedForUndo 

◆ StructureMode

Area pattern structure values.

Enumerator
StructureNone 
StructureAlignedRows 
StructureShiftedRows 

◆ SymbolFlags

General flags for symbols.

Enumerator
SymbolRotatable 
SymbolIconCompressedV8 
SymbolFavorite 

Only in V8.

◆ SymbolStatus

Status flags for symbols.

Enumerator
SymbolNormal 
SymbolProtected 
SymbolHidden 

◆ SymbolType

Symbol type values.

Enumerator
SymbolTypePoint 
SymbolTypeLine 
SymbolTypeArea 
SymbolTypeText 
SymbolTypeRectangle_V8 
SymbolTypeLineText 

Until V8.

SymbolTypeRectangle_V9 
Since
V9

◆ TextAlignment

Text alignment flags.

Enumerator
HAlignMask 
HAlignLeft 
HAlignCenter 
HAlignRight 
HAlignJustified 
VAlignMask 

All-line for line text symbols.

VAlignBottom 
Since
V10
VAlignMiddle 
Since
V10
VAlignTop 
Since
V10

Function Documentation

◆ addPadding()

QByteArray & Ocd::addPadding ( QByteArray byte_array)

Adds padding so that the next data is appended at a multiple of 8.

On most CPUs, access to unaligned data is slower than access to aligned data. This is an attempt to improve alignment. (Unaligned access even leads to undefined behaviour, but we declare OCD structures with pragma pack.)

◆ getBlockChecked() [1/2]

template<class BlockType >
const BlockType* Ocd::getBlockChecked ( const QByteArray byte_array,
quint32  pos 
)

Returns a pointer to the (index) block at pos inside byte_array.

This function returns nullptr if pos is zero, or if pos points to a block (at least partially) outside the byte_array.

◆ getBlockChecked() [2/2]

template<class BlockType >
BlockType* Ocd::getBlockChecked ( QByteArray byte_array,
quint32  pos 
)

Returns a pointer to the (index) block at pos inside byte_array.

Non-const overload. This will not cause a deep copy of the byte array.

◆ getBlockCheckedRaw()

const void* Ocd::getBlockCheckedRaw ( const QByteArray byte_array,
quint32  pos,
quint32  block_size 
)

◆ operator!=() [1/3]

bool Ocd::operator!= ( const CmykScreenV8 lhs,
const CmykScreenV8 rhs 
)
inline

◆ operator!=() [2/3]

bool Ocd::operator!= ( const IconV8 lhs,
const IconV8 rhs 
)
inline

◆ operator!=() [3/3]

bool Ocd::operator!= ( const IconV9 lhs,
const IconV9 rhs 
)
inline

◆ operator==() [1/3]

bool Ocd::operator== ( const CmykScreenV8 lhs,
const CmykScreenV8 rhs 
)
inline

◆ operator==() [2/3]

bool Ocd::operator== ( const IconV8 lhs,
const IconV8 rhs 
)

◆ operator==() [3/3]

bool Ocd::operator== ( const IconV9 lhs,
const IconV9 rhs 
)

◆ Q_STATIC_ASSERT() [1/7]

Ocd::Q_STATIC_ASSERT ( sizeof(double)  = =8)

◆ Q_STATIC_ASSERT() [2/7]

Ocd::Q_STATIC_ASSERT ( sizeof(FileHeaderGeneric = =8)

◆ Q_STATIC_ASSERT() [3/7]

Ocd::Q_STATIC_ASSERT ( sizeof(FormatV8::FileHeader) - sizeof(SymbolHeaderV8 = =48)

◆ Q_STATIC_ASSERT() [4/7]

Ocd::Q_STATIC_ASSERT ( sizeof(FormatV9::FileHeader = =48)

◆ Q_STATIC_ASSERT() [5/7]

Ocd::Q_STATIC_ASSERT ( sizeof(FormatV12::FileHeader = =60)

◆ Q_STATIC_ASSERT() [6/7]

Ocd::Q_STATIC_ASSERT ( std::extent< decltype(IconV8::bits)>::value  = =IconV8::length())

◆ Q_STATIC_ASSERT() [7/7]

Ocd::Q_STATIC_ASSERT ( std::extent< decltype(IconV9::bits)>::value  = =IconV9::length())