Mapper  0.9.0
API documentation
Classes | Namespaces | Macros | Enumerations | Functions
ocd_types.h File Reference

(00b23e7 on 24 May 2019)

#include <cstddef>
#include <iterator>
#include <type_traits>
#include <QtGlobal>
#include <QByteArray>
#include <QChar>
#include <QString>
Include dependency graph for ocd_types.h:
This graph shows which files directly or indirectly include this file:

Classes

class  OcdFile< F >
 A template class for dealing with OCD files. More...
 
struct  Ocd::Custom8BitEncoding
 A trait for strings and file formats that use a custom 8 bit encoding. More...
 
struct  Ocd::Utf8Encoding
 A trait for strings and file formats that use UTF-8 encoding. More...
 
struct  Ocd::PascalString< N >
 A string of max. More...
 
struct  Ocd::Utf8PascalString< N >
 A UTF-8-encoded string of max. More...
 
struct  Ocd::Utf16PascalString< N >
 A UTF-16LE-encoded string of max. More...
 
struct  Ocd::FileHeaderGeneric
 The generic header at the beginning of all supported OCD file formats. More...
 
struct  Ocd::IndexBlock< E >
 An IndexBlock collects 256 index entries, and the file position of the next index block if more index entries exist. More...
 
struct  Ocd::ParameterStringIndexEntry
 An index entry for a parameter string. More...
 
struct  Ocd::ParameterString
 The parameter string trait. More...
 
struct  Ocd::SymbolIndexEntry
 An index entry for a symbol. More...
 
struct  Ocd::OcdPoint32
 The OCD file point data type. More...
 
class  OcdEntityIndexIterator< V >
 A template class which provides a forward iterator for OCD entity indices. More...
 
class  OcdEntityIndex< F, T >
 A template class for dealing with OCD entity indices. More...
 
struct  OcdEntityIndex< F, T >::value_type
 
class  OcdFile< F >
 A template class for dealing with OCD files. More...
 

Namespaces

 Ocd
 
 Ocd::string
 Private OCD string implementation details.
 

Macros

#define RESERVED_MEMBER_CONCAT2(A, B)   A ## B
 
#define RESERVED_MEMBER_CONCAT(A, B)   RESERVED_MEMBER_CONCAT2(A,B)
 
#define RESERVED_MEMBER   RESERVED_MEMBER_CONCAT( reserved_member_ , __LINE__ )
 A macro which generates a unique member name of the format reserved_member_LINE_NUMBER. More...
 
#define OCD_EXPLICIT_INSTANTIATION(keywords, F)
 Handle explicit instantiation of OcdFile related templates. More...
 

Enumerations

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

Functions

unsigned char Ocd::string::assign (const QByteArray &value, unsigned char max_length, char *first, char *last) noexcept
 
unsigned char Ocd::string::assignUtf8 (const QString &value, unsigned char max_length, char *first, char *last)
 
std::size_t Ocd::string::assignUtf16 (const QString &value, std::size_t max_length, QChar *first, QChar *last)
 
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. More...
 
template<class BlockType >
BlockType * Ocd::getBlockChecked (QByteArray &byte_array, quint32 pos)
 Returns a pointer to the (index) block at pos inside byte_array. More...
 
QByteArrayOcd::addPadding (QByteArray &byte_array)
 Adds padding so that the next data is appended at a multiple of 8. More...
 

Macro Definition Documentation

◆ OCD_EXPLICIT_INSTANTIATION

#define OCD_EXPLICIT_INSTANTIATION (   keywords,
 
)
Value:
keywords \
\
keywords \
\
keywords \
\
keywords \
OcdFile<F>::OcdFile();
typename T::IndexEntryType EntryType
The index entry type for the entity type.
Definition: ocd_types.h:452
EntryType & insert(const QByteArray &entity_data, const EntryType &entry)
Inserts an object with the given entry prototype.
Definition: ocd_types.cpp:482
A template class for dealing with OCD entity indices.
Definition: ocd_types.h:442

Handle explicit instantiation of OcdFile related templates.

This macro helps using explicit template instantiation. It can be invoked either with the keywords "extern template" (for explicit instantiation declaration), or with "template" (for explicit instantiation definition).

◆ RESERVED_MEMBER

#define RESERVED_MEMBER   RESERVED_MEMBER_CONCAT( reserved_member_ , __LINE__ )

A macro which generates a unique member name of the format reserved_member_LINE_NUMBER.

◆ RESERVED_MEMBER_CONCAT

#define RESERVED_MEMBER_CONCAT (   A,
 
)    RESERVED_MEMBER_CONCAT2(A,B)

◆ RESERVED_MEMBER_CONCAT2

#define RESERVED_MEMBER_CONCAT2 (   A,
 
)    A ## B