( !
file.Exists() ) {
72 file.GetTime(&new_timestamp);
76<<
" appears not to have changed since last loaded");
102 if( !was_modified ) {
107 if(dest ==
nullptr) {
145 if( reg && !reg->
Empty() ) {
149name, style, scratch_entry, path);
153 if(&entry != &scratch_entry) {
154scratch_entry = entry;
163 boolwas_modified = reg->
Modified(rflags);
164reg->
Clear(rflags);
165 if( !was_modified ) {
178 returnscratch_entry;
191 _TRACE(
"CMetaRegistry::Load: looking for "<< name);
202 _TRACE(
"found in cache");
210 if(it->flags !=
flags|| it->reg_flags != reg_flags)
213 if(style ==
eName_AsIs&& it->actual_name == name) {
214 _TRACE(
"found in cache");
225scratch_entry.
length= 0;
229 returnscratch_entry;
231 returnscratch_entry;
244 _TRACE(
"CMetaRegistry::FindRegistry: looking for "<< name);
249 if( !
result.empty() ) {
260 if( !
result.empty() ) {
267 if(
CFile(name).Exists()) {
283 for(
stringname2(name); ; ) {
285 if( !
result.empty() ) {
314 if(it->registry == ® || it->actual_name == path) {
337TSearchPath::iterator it = find(path.begin(), path.end(),
kEmptyStr);
338 if(it == path.end()) {
341path_tail.assign(it + 1, path.end());
342path.erase(it, path.end());
347path.push_back(
".");
349 if( !home.empty() ) {
350path.push_back(home);
364 if(sysroot && *sysroot) {
369path.push_back(
"/etc");
381 if(dir2.size() && dir2 != dir) {
382path.push_back(dir2);
387 if( !path_tail.empty() ) {
389 if( !it->empty() ) {
405 if(style < k.
style) {
407}
else if(style > k.
style) {
void Release()
Manually force the resource to be released.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
static const char * str(char *buf, int n)
static CNcbiApplicationGuard InstanceGuard(void)
Singleton method.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
@ eIgnoreLinks
Do not follow symbolic links.
@ eFollowLinks
Follow symbolic links.
string GetProgramDirname(EFollowLinks follow_links=eIgnoreLinks) const
Get program directory name.
static string NormalizePath(const string &path, EFollowLinks follow_links=eIgnoreLinks)
Normalize a path.
static bool IsAbsolutePath(const string &path)
Check if a "path" is absolute for the current OS.
static string GetHome(EHomeWindows home=eHomeWindows_AppData)
Get user "home" directory.
static string MakePath(const string &dir=kEmptyStr, const string &base=kEmptyStr, const string &ext=kEmptyStr)
Assemble a path from basic components.
static string ConcatPath(const string &first, const string &second)
Concatenate two parts of the path for the current OS.
static string GetCwd(void)
Get the current working directory.
static void SplitPath(const string &path, string *dir=0, string *base=0, string *ext=0)
Split a path string into its basic components.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
int64_t Int8
8-byte (64-bit) signed integer
int TFlags
Binary OR of "EFlags".
static TFlags AssessImpact(TFlags flags, EOperation op)
Indicate which portions of the registry the given operation would affect.
bool Empty(TFlags flags=fAllLayers) const
Verify if Registry is empty.
bool Modified(TFlags flags=fPersistent) const
Verify if persistent values have been modified.
IRWRegistry * Read(CNcbiIstream &is, TFlags flags=0, const string &path=kEmptyStr)
Read and parse the stream "is", and merge its content with current Registry entries.
bool LoadBaseRegistries(TFlags flags=0, int metareg_flags=0, const string &path=kEmptyStr)
Load any base registries listed in [NCBI].Inherits; returns true if able to load at least one,...
bool Write(CNcbiOstream &os, TFlags flags=0) const
Write the registry content to output stream.
void Clear(TFlags flags=fAllLayers)
Reset the registry content.
void SetModifiedFlag(bool modified, TFlags flags=fPersistent)
Indicate whether any relevant values are out of sync with some external resource (typically a configu...
@ fJustCore
Ignore auxiliary subregistries.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
CNcbistrstream_Base< IO_PREFIX::strstream, IOS_BASE::in|IOS_BASE::out > CNcbiStrstream
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
Magic spell ;-) needed for some weird compilers... very empiric.
Static variables safety - create on demand, destroy on application termination.
Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...
std::istream & in(std::istream &in_, double &x_)
CTime timestamp
For cache validation.
Int8 length
For cache validation.
bool Reload(TFlags reload_flags=fReloadIfChanged)
Reload the configuration file.
CRef< IRWRegistry > registry
string actual_name
Either an absolute path or empty.
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