#include <fstream>
#include <mutex>
#include <sstream>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/msgdlg.h>
#include <pgm_base.h>
#include <trace_helpers.h>
#include "common.h"
#include "filename_resolver.h"
Go to the source code of this file.
|
static bool | getHollerith (const std::string &aString, size_t &aIndex, wxString &aResult) |
|
◆ CFGFILE_VERSION
#define CFGFILE_VERSION 1 |
◆ ERRFLG_ALIAS
◆ ERRFLG_ENVPATH
#define ERRFLG_ENVPATH (4) |
◆ ERRFLG_RELPATH
#define ERRFLG_RELPATH (2) |
◆ MASK_3D_RESOLVER
#define MASK_3D_RESOLVER "3D_RESOLVER" |
◆ RESOLVER_CONFIG
#define RESOLVER_CONFIG wxT( "3Dresolver.cfg" ) |
◆ getHollerith()
static bool getHollerith |
( |
const std::string & |
aString, |
|
|
size_t & |
aIndex, |
|
|
wxString & |
aResult |
|
) |
| |
|
static |
Definition at line 855 of file filename_resolver.cpp.
859 if( aIndex >= aString.size() )
861 std::ostringstream ostr;
862 ostr << __FILE__ <<
": " << __FUNCTION__ <<
": " << __LINE__ <<
"\n";
863 wxString errmsg =
"bad Hollerith string on line";
864 ostr <<
" * " << errmsg.ToUTF8() <<
"\n'" << aString <<
"'";
870 size_t i2 = aString.find(
'"', aIndex );
872 if( std::string::npos == i2 )
874 std::ostringstream ostr;
875 ostr << __FILE__ <<
": " << __FUNCTION__ <<
": " << __LINE__ <<
"\n";
876 wxString errmsg =
"missing opening quote mark in config file";
877 ostr <<
" * " << errmsg.ToUTF8() <<
"\n'" << aString <<
"'";
885 if( i2 >= aString.size() )
887 std::ostringstream ostr;
888 ostr << __FILE__ <<
": " << __FUNCTION__ <<
": " << __LINE__ <<
"\n";
889 wxString errmsg =
"invalid entry (unexpected end of line)";
890 ostr <<
" * " << errmsg.ToUTF8() <<
"\n'" << aString <<
"'";
898 while( aString[i2] >=
'0' && aString[i2] <=
'9' )
899 tnum.append( 1, aString[i2++] );
901 if( tnum.empty() || aString[i2++] !=
':' )
903 std::ostringstream ostr;
904 ostr << __FILE__ <<
": " << __FUNCTION__ <<
": " << __LINE__ <<
"\n";
905 wxString errmsg =
"bad Hollerith string on line";
906 ostr <<
" * " << errmsg.ToUTF8() <<
"\n'" << aString <<
"'";
912 std::istringstream istr;
917 if( (i2 + nchars) >= aString.size() )
919 std::ostringstream ostr;
920 ostr << __FILE__ <<
": " << __FUNCTION__ <<
": " << __LINE__ <<
"\n";
921 wxString errmsg =
"invalid entry (unexpected end of line)";
922 ostr <<
" * " << errmsg.ToUTF8() <<
"\n'" << aString <<
"'";
930 aResult = wxString::FromUTF8( aString.substr( i2, nchars ).c_str() );
934 if( i2 >= aString.size() || aString[i2] !=
'"' )
936 std::ostringstream ostr;
937 ostr << __FILE__ <<
": " << __FUNCTION__ <<
": " << __LINE__ <<
"\n";
938 wxString errmsg =
"missing closing quote mark in config file";
939 ostr <<
" * " << errmsg.ToUTF8() <<
"\n'" << aString <<
"'";
References MASK_3D_RESOLVER.
Referenced by FILENAME_RESOLVER::readPathList().
◆ mutex_resolver
std::mutex mutex_resolver |
|
static |