A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/sys__path_8cpp_source.html below:

NCBI C++ ToolKit: src/gui/widgets/wx/sys_path.cpp Source File

39 #include <wx/filename.h> 40 #include <wx/stdpaths.h> 42 #include <wx/tokenzr.h> 45 #include <wx/apptrait.h> 65

paths.UseAppInfo(wxStandardPaths::AppInfo_None);

70 

wxStandardPathsBase& paths = wxGUIAppTraits().GetStandardPaths();

71

paths.UseAppInfo(wxStandardPaths::AppInfo_None);

91

wxString path1 = path, path2;

93  size_t

pos = path.find_first_of(

wxT

(

"\\/"

));

94  if

(pos != wxString::npos) {

95

path1 = path.substr(0, pos);

96

path2 = path.substr(pos + 1);

107  const

wxString& subdir)

109

wxString ret_val(path);

112

ret_val = it->second;

114  if

(ret_val ==

wxT

(

"<bin>"

)) {

115 #if defined( NCBI_OS_DARWIN ) && !defined( _DEBUG ) 118

wxFileName fname(

GetStdPath

(), wxEmptyString );

119

fname.AppendDir(

wxT

(

"bin"

));

120

ret_val = fname.GetPath();

122

}

else if

(ret_val ==

wxT

(

"<std>"

)) {

124

}

else if

(ret_val ==

wxT

(

"<home>"

)) {

126

}

else if

(ret_val ==

wxT

(

"<pkgdir>"

)) {

127

wxFileName fname(

GetStdPath

(), wxEmptyString);

128

fname.AppendDir(

wxT

(

"packages"

));

129

ret_val = fname.GetPath();

130

}

else if

(ret_val ==

wxT

(

"<res>"

)) {

135  if

( !subdir.empty() ) {

136

ret_val += wxFileName::GetPathSeparator();

143  const

wxString& delim)

145

wxArrayString toks = ::wxStringTokenize(path, delim);

147  size_t count

= toks.GetCount();

148  for

(

size_t i

= 0;

i

<

count

;

i

++ ) {

149

wxString p =

ResolvePath

(toks[

i

].Trim().Trim(

false

));

150  if

(wxFileName::FileExists(p))

154  return

wxEmptyString;

164

::wxGetEnv(

wxT

(

"NCBI_GBENCH_HOME"

), &ret_val);

166  if

(ret_val.empty()) {

169  if

(!ret_val.empty()) {

170

wxFileName fname(ret_val);

171  const

wxArrayString& dirs = fname.GetDirs();

172  if

(!dirs.IsEmpty() && dirs.Last() ==

wxT

(

"bin"

))

173

fname.RemoveLastDir();

175

ret_val = fname.GetPath();

179  if

(ret_val.empty()) {

181

<<

"Can't identify the application's execution path. " 182  "Some components may be unavailable."

);

192

wxFileName fname(path, wxEmptyString);

193

fname.AppendDir(

wxT

(

"share"

));

194

fname.AppendDir(

wxT

(

"gbench"

));

195  return

fname.GetPath();

211  if

(!ret_val.empty()) {

212

wxFileName fname(ret_val, wxEmptyString);

213 #if defined(NCBI_OS_MSWIN) || defined(NCBI_OS_DARWIN) 214

fname.AppendDir(

wxT

(

"GenomeWorkbench2"

));

216

fname.AppendDir(

wxT

(

".gbench2"

));

219

fname.AppendDir(

wxT

(

"instances"

));

220

fname.AppendDir(wxString::FromUTF8(

sm_Inst

.c_str()));

223

ret_val = fname.GetPath();

234

wxString PATH =

wxT

(

"PATH"

);

237

::wxGetEnv(PATH, &base_path);

239  const

wxChar path_sep =

247

wxString::size_type pos = base_path.find(path);

253  for

(;pos != wxString::npos; pos = base_path.find(path, pos)) {

254  if

(pos > 0 && base_path[pos - 1] != path_sep) {

255

pos += path.length();

258  if

(pos + path.length() < base_path.length() && base_path[pos + 1] != path_sep) {

259

pos += path.length();

263

base_path.erase(pos, path.length());

278

base_path += path_sep;

283

::wxSetEnv(PATH, base_path);

EPathMode

Add an element to the environment's PATH variable.

static wxString GetHomePath(void)

the user-specific application-specific home directory corresponds to the <home> alias above.

static wxString GetResourcePath(void)

the shared resource path corresponds to the <res> alias above.

static void SetInst(const string &inst)

static wxString ResolvePath(const wxString &path, const wxString &rel_name)

Utility function to hide the platform specifics of locating our standard directories and files.

static void BindAlias(const wxString &alias, const wxString &path)

Bind an alias to an existing path The application expects certain aliases to be present; if they are ...

static TAliasMap sm_AliasMap

static wxString GetStdPath(void)

the applicaton installation directory.

static void AddToPath(const wxString &path, EPathMode mode=ePath_Prepend)

PATH variable manipulators.

static wxStandardPathsBase & GetStandardPaths()

static wxString ResolvePathExisting(const wxString &path, const wxString &delim=wxT(","))

Utility function to hide the platform specifics of locating our standard directories.

container_type::const_iterator const_iterator

const_iterator end() const

const_iterator find(const key_type &key) const

#define LOG_POST(message)

This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...

void Warning(CExceptionArgs_Base &args)

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define DEFINE_STATIC_FAST_MUTEX(id)

Define static fast mutex and initialize it.

const TYPE & Get(const CNamedParameterList *param)

Multi-threading – mutexes; rw-locks; semaphore.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4