mksqlite  2.5
A MATLAB interface to SQLite
Classes | Functions | Variables
locale.hpp File Reference

(Error-)messages in english and german. More...

#include "config.h"
#include "svn_revision.h"
#include <cstdarg>
#include "blosc/blosc.h"
+ Include dependency graph for locale.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Err
 Helperclass for error message transport. More...
 

Macros

Message Identifiers

Most messages are identified by their identifiers. Each enumerated message has a representation in english and in german.

Other messages, which have no translation have the identifier MSG_PURESTRING and its text is taken in a buffer Err::m_static_msg.

#define MSG_PURESTRING   -2
 
#define MSG_NOERROR   -1
 
#define MSG_HELLO   0
 
#define MSG_INVALIDDBHANDLE   1
 
#define MSG_IMPOSSIBLE   2
 
#define MSG_USAGE   3
 
#define MSG_INVALIDARG   4
 
#define MSG_CLOSINGFILES   5
 
#define MSG_CANTCOPYSTRING   6
 
#define MSG_NOOPENARG   7
 
#define MSG_NOFREESLOT   8
 
#define MSG_CANTOPEN   9
 
#define MSG_DBNOTOPEN   10
 
#define MSG_INVQUERY   11
 
#define MSG_CANTCREATEOUTPUT   12
 
#define MSG_UNKNWNDBTYPE   13
 
#define MSG_BUSYTIMEOUTFAIL   14
 
#define MSG_MSGUNIQUEWARN   15
 
#define MSG_UNEXPECTEDARG   16
 
#define MSG_MISSINGARGL   17
 
#define MSG_ERRMEMORY   18
 
#define MSG_UNSUPPVARTYPE   19
 
#define MSG_UNSUPPTBH   20
 
#define MSG_ERRPLATFORMDETECT   21
 
#define MSG_WARNDIFFARCH   22
 
#define MSG_BLOBTOOBIG   23
 
#define MSG_ERRCOMPRESSION   24
 
#define MSG_UNKCOMPRESSOR   25
 
#define MSG_ERRCOMPRARG   26
 
#define MSG_ERRCOMPRLOGMINVALS   27
 
#define MSG_ERRUNKOPENMODE   28
 
#define MSG_ERRUNKTHREADMODE   29
 
#define MSG_ERRCANTCLOSE   30
 
#define MSG_ERRCLOSEDBS   31
 
#define MSG_ERRNOTSUPPORTED   32
 
#define MSG_EXTENSION_EN   33
 
#define MSG_EXTENSION_DIS   34
 
#define MSG_EXTENSION_FAIL   35
 
#define MSG_MISSINGARG   36
 
#define MSG_MISSINGARG_CELL   37
 
#define MSG_MISSINGARG_STRUCT   38
 
#define MSG_NUMARGEXPCT   39
 
#define MSG_SINGLECELLNOTALLOWED   40
 
#define MSG_SINGLESTRUCTNOTALLOWED   41
 
#define MSG_ERRVARNAME   42
 
#define MSG_STREAMINGNEEDTYBLOBS   43
 
#define MSG_STREAMINGNOTSUPPORTED   44
 
#define MSG_RESULTTYPE   45
 
#define MSG_DBID_SUPFLOUS   46
 
#define MSG_FCNHARGEXPCT   47
 
#define MSG_LITERALARGEXPCT   48
 
#define MSG_RECURSIVECALL   49
 
#define MSG_INVALIDFUNCTION   50
 
#define MSG_ERRNULLDBID   51
 
#define MSG_ERRINTERNAL   52
 
#define MSG_ABORTED   53
 

Functions

const char * getLocaleMsg (int iMsgNr)
 Returns the translation for a defined message. More...
 
bool setLocale (int iLang)
 Sets the current locale. More...
 
int getLocale ()
 Get current locale id.
 

Variables

static const char * messages_0 []
 Message table for english translations (Language==0)
 
static const char * messages_1 []
 Message table for german translations (Language=1)
 
const char * STR_RESULT_TYPES []
 Text representations. More...
 
static int Language = -1
 Number of language in use. More...
 
static const char ** messages []
 Message Tables. More...
 

Detailed Description

(Error-)messages in english and german.

All text strings omitted by mksqlite are cumulated in this file for the case of further translations.

Authors
Martin Kortmann mail@.nosp@m.kort.nosp@m.mann..nosp@m.de, Andreas Martin andim.nosp@m.arti.nosp@m.n@use.nosp@m.rs.s.nosp@m.ource.nosp@m.forg.nosp@m.e.net
Version
2.5
Date
2008-2017
Precondition
Warning
Bug:

Definition in file locale.hpp.

Function Documentation

◆ getLocaleMsg()

const char * getLocaleMsg ( int  iMsgNr)

Returns the translation for a defined message.

Parameters
[in]iMsgNrMessage identifier (see Message Identifier)
Returns
Pointer to translation

Definition at line 480 of file locale.hpp.

References getLocale(), Language, and messages.

Referenced by Mksqlite::argReadCommand(), blob_unpack(), SQLstackitem::closeDb(), ValueMex::GetString(), mex_module_deinit(), SQLiface::mexFcnWrapper(), Mksqlite::Mksqlite(), Err::set_printf(), Err::warn(), and Mksqlite::warnOnDefDbid().

+ Here is the caller graph for this function:

◆ setLocale()

bool setLocale ( int  iLang)

Sets the current locale.

Parameters
[in]iLangnumber identifying current locale
Returns
true on success

Definition at line 504 of file locale.hpp.

References Language, and messages.

Referenced by mexFunction().

+ Here is the caller graph for this function:

Variable Documentation

◆ Language

int Language = -1
static

Number of language in use.

A number <0 means "uninitialized"

Definition at line 462 of file locale.hpp.

Referenced by getLocale(), getLocaleMsg(), and setLocale().

◆ messages

const char** messages[]
static
Initial value:
=
{
}
static const char * messages_0[]
Message table for english translations (Language==0)
Definition: locale.hpp:308
static const char * messages_1[]
Message table for german translations (Language=1)
Definition: locale.hpp:379

Message Tables.

Definition at line 468 of file locale.hpp.

Referenced by getLocaleMsg(), and setLocale().

◆ STR_RESULT_TYPES

const char* STR_RESULT_TYPES[]
Initial value:
= {
"array of structs",
"struct of arrays",
"matrix/cell array"
}

Text representations.

See also
RESULT_TYPES constants defined in config.h

Definition at line 450 of file locale.hpp.