MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / dictionaryName

Class dictionaryName

src/OpenFOAM/db/dictionary/dictionary.H:79–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77\*---------------------------------------------------------------------------*/
78
79class dictionaryName
80{
81 // Private data
82
83 fileName name_;
84
85
86public:
87
88 // Constructors
89
90 //- Construct dictionaryName null
91 dictionaryName()
92 {}
93
94 //- Construct dictionaryName as copy of the given fileName
95 dictionaryName(const fileName& name)
96 :
97 name_(name)
98 {}
99
100
101 // Member functions
102
103 //- Return the dictionary name
104 const fileName& name() const
105 {
106 return name_;
107 }
108
109 //- Return the dictionary name
110 fileName& name()
111 {
112 return name_;
113 }
114
115 //- Return the local dictionary name (final part of scoped name)
116 const word dictName() const
117 {
118 const word scopedName = name_.name();
119
120 string::size_type i = scopedName.rfind('.');
121
122 if (i == scopedName.npos)
123 {
124 return scopedName;
125 }
126 else
127 {
128 return scopedName.substr(i + 1, scopedName.npos);
129 }
130 }
131};
132
133
134/*---------------------------------------------------------------------------*\

Callers 2

dictionary.CFile · 0.85
dictionaryIO.CFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected