LOST  0.0.1
LOST: Open-source Star Tracker
lost::MultiDatabase Class Reference

#include <databases.hpp>

Public Member Functions

 MultiDatabase (const unsigned char *buffer)
 Create a multidatabase from a serialized multidatabase. More...
 
const unsigned char * SubDatabasePointer (int32_t magicValue) const
 MultiDatabase memory layout: More...
 

Detailed Description

Definition at line 104 of file databases.hpp.

Constructor & Destructor Documentation

◆ MultiDatabase()

lost::MultiDatabase::MultiDatabase ( const unsigned char *  buffer)
inlineexplicit

Create a multidatabase from a serialized multidatabase.

Definition at line 107 of file databases.hpp.

Member Function Documentation

◆ SubDatabasePointer()

const unsigned char * lost::MultiDatabase::SubDatabasePointer ( int32_t  magicValue) const

MultiDatabase memory layout:

| size | name | description | |---—+-------------—+------------------------------------------—| | 4 | magicValue | unique database identifier | | 4 | flags | [X, X, X, isDouble?] | | 4 | databaseLength | length in bytes (32-bit unsigned) | | n | database | the entire database. 8-byte aligned | | ... | ... | More databases (each has value, length, db) | | 4 | caboose | 4 null bytes indicate the end |

return a pointer to the start of the database type indicated by the magic value, if such a sub-database is present in the database

Parameters
magicValue
Returns
Returns a pointer to the start of the database type indicated by the magic value, null if not found

Definition at line 316 of file databases.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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