/usr/include/root/Reflex/internal/ScopeName.h is in libroot-core-dev 5.34.14-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | // @(#)root/reflex:$Id$
// Author: Stefan Roiser 2004
// Copyright CERN, CH-1211 Geneva 23, 2004-2010, All rights reserved.
//
// Permission to use, copy, modify, and distribute this software for any
// purpose is hereby granted without fee, provided that this copyright and
// permissions notice appear in all copies and derivatives.
//
// This software is provided "as is" without express or implied warranty.
#ifndef Reflex_ScopeName
#define Reflex_ScopeName
// Include files
#include "Reflex/Kernel.h"
#include "Reflex/internal/LiteralString.h"
namespace Reflex {
// forward declarations
class ScopeBase;
class Scope;
/**
* @class ScopeName ScopeName.h Reflex/ScopeName.h
* @author Stefan Roiser
* @date 24/11/2003
* @ingroup Ref
*/
class RFLX_API ScopeName {
friend class Scope;
friend class ScopeBase;
public:
/** constructor */
ScopeName(const char* name,
ScopeBase * scopeBase);
/**
* ByName will return a pointer to a At which is given as an argument
* or 0 if none is found
* @param Name fully qualified Name of At
* @return pointer to At or 0 if none is found
*/
static Scope ByName(const std::string& name);
static void CleanUp();
/**
* DeleteScope will call the destructor of the ScopeBase this ScopeName is
* pointing to and aremove it's information from the data structures. The
* ScopeName information will remain.
*/
void DeleteScope() const;
/**
* Hide this scope from any lookup by appending the string " @HIDDEN@" to its name.
*/
void HideName();
/**
* Un-Hide this scope from any lookup by removing the string " @HIDDEN@" to its name.
*/
void UnhideName();
/**
* Name will return a string representation of Name of the Scope
* @return string representation of the Scope
*/
const char* Name() const;
/**
* Name will return a string representation of Name of the Scope
* @return string representation of the Scope
*/
const LiteralString& LiteralName() const { return fName; }
/**
* Name will return a string representation of Name of the Scope
* @return string representation of the Scope
*/
LiteralString& LiteralName() { return fName; }
/**
* ThisScope will return the unqualified Scope object of this ScopeName
* @return corresponding Scope
*/
Scope ThisScope() const;
/**
* Unload reflection information for this scope.
*/
void Unload();
/**
* ScopeAt will return the nth defined scope
* @param nth scope defined in the system
* @return nth scope defined in the system
*/
static Scope ScopeAt(size_t nth);
/**
* ScopeSize will return the number of currently defined scopes
* (resolved and unresolved ones)
* @return number of currently defined scopes
*/
static size_t ScopeSize();
static Scope_Iterator Scope_Begin();
static Scope_Iterator Scope_End();
static Reverse_Scope_Iterator Scope_RBegin();
static Reverse_Scope_Iterator Scope_REnd();
private:
/** destructor */
~ScopeName();
private:
/** pointer to the Name of the At in the static map */
LiteralString fName;
/**
* pointer to the resolved Scope
* @label scope base
* @link aggregation
* @supplierCardinality 0..1
* @clientCardinality 1
*/
mutable
ScopeBase * fScopeBase;
/**
* This scope
*/
Scope* fThisScope;
}; // class ScopeName
} // namespace Reflex
//-------------------------------------------------------------------------------
inline const char*
Reflex::ScopeName::Name() const {
//-------------------------------------------------------------------------------
return fName.c_str();
}
#endif //Reflex_ScopeName
|