Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
a3c6d6ac
Commit
a3c6d6ac
authored
Dec 08, 2010
by
Mark Olesen
Browse files
COMP: incomplete Time class used in objectRegistryTemplates
parent
f5f51aeb
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/Make/files
View file @
a3c6d6ac
...
...
@@ -64,6 +64,11 @@ $(sha1)/SHA1Digest.C
primitives/random/Random/Random.C
primitives/random/cachedRandom/cachedRandom.H
ranges = primitives/ranges
$(ranges)/scalarRange/scalarRange.C
$(ranges)/scalarRange/scalarRanges.C
containers/HashTables/HashTable/HashTableCore.C
containers/HashTables/StaticHashTable/StaticHashTableCore.C
containers/Lists/SortableList/ParSortableListName.C
...
...
@@ -194,9 +199,6 @@ $(Time)/timeSelector.C
$(Time)/instant/instant.C
db/scalarRange/scalarRange.C
db/scalarRange/scalarRanges.C
dimensionSet/dimensionSet.C
dimensionSet/dimensionSetIO.C
dimensionSet/dimensionSets.C
...
...
src/OpenFOAM/db/objectRegistry/objectRegistry.C
View file @
a3c6d6ac
...
...
@@ -31,6 +31,14 @@ License
defineTypeNameAndDebug
(
Foam
::
objectRegistry
,
0
);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
bool
Foam
::
objectRegistry
::
parentNotTime
()
const
{
return
(
&
parent_
!=
dynamic_cast
<
const
objectRegistry
*>
(
&
time_
));
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam
::
objectRegistry
::
objectRegistry
...
...
src/OpenFOAM/db/objectRegistry/objectRegistry.H
View file @
a3c6d6ac
...
...
@@ -69,6 +69,10 @@ class objectRegistry
// Private Member Functions
//- Is the objectRegistry parent_ different from time_
// Used to terminate searching within the ancestors
bool
parentNotTime
()
const
;
//- Disallow Copy constructor
objectRegistry
(
const
objectRegistry
&
);
...
...
src/OpenFOAM/db/objectRegistry/objectRegistryTemplates.C
View file @
a3c6d6ac
...
...
@@ -84,22 +84,13 @@ bool Foam::objectRegistry::foundObject(const word& name) const
{
return
true
;
}
else
{
return
false
;
}
}
else
else
if
(
this
->
parentNotTime
())
{
if
(
&
parent_
!=
dynamic_cast
<
const
objectRegistry
*>
(
&
time_
))
{
return
parent_
.
foundObject
<
Type
>
(
name
);
}
else
{
return
false
;
}
return
parent_
.
foundObject
<
Type
>
(
name
);
}
return
false
;
}
...
...
@@ -117,8 +108,10 @@ const Type& Foam::objectRegistry::lookupObject(const word& name) const
return
*
vpsiPtr_
;
}
FatalErrorIn
(
"objectRegistry::lookupObject<Type>(const word&) const"
)
<<
nl
FatalErrorIn
(
"objectRegistry::lookupObject<Type>(const word&) const"
)
<<
nl
<<
" lookup of "
<<
name
<<
" from objectRegistry "
<<
this
->
name
()
<<
" successful
\n
but it is not a "
<<
Type
::
typeName
...
...
@@ -127,23 +120,21 @@ const Type& Foam::objectRegistry::lookupObject(const word& name) const
}
else
{
if
(
&
parent_
!=
dynamic_cast
<
const
objectRegistry
*>
(
&
t
ime
_
))
if
(
this
->
parentNotT
ime
(
))
{
return
parent_
.
lookupObject
<
Type
>
(
name
);
}
else
{
FatalErrorIn
(
"objectRegistry::lookupObject<Type>(const word&) const"
)
<<
nl
<<
" request for "
<<
Type
::
typeName
<<
" "
<<
name
<<
" from objectRegistry "
<<
this
->
name
()
<<
" failed
\n
available objects of type "
<<
Type
::
typeName
<<
" are"
<<
nl
<<
names
<
Type
>
()
<<
abort
(
FatalError
);
}
FatalErrorIn
(
"objectRegistry::lookupObject<Type>(const word&) const"
)
<<
nl
<<
" request for "
<<
Type
::
typeName
<<
" "
<<
name
<<
" from objectRegistry "
<<
this
->
name
()
<<
" failed
\n
available objects of type "
<<
Type
::
typeName
<<
" are"
<<
nl
<<
names
<
Type
>
()
<<
abort
(
FatalError
);
}
return
*
reinterpret_cast
<
const
Type
*
>
(
0
);
...
...
src/OpenFOAM/
db
/scalarRange/scalarRange.C
→
src/OpenFOAM/
primitives/ranges
/scalarRange/scalarRange.C
View file @
a3c6d6ac
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C)
1991
-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C)
2007
-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
src/OpenFOAM/
db
/scalarRange/scalarRange.H
→
src/OpenFOAM/
primitives/ranges
/scalarRange/scalarRange.H
View file @
a3c6d6ac
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C)
1991
-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C)
2007
-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
src/OpenFOAM/
db
/scalarRange/scalarRanges.C
→
src/OpenFOAM/
primitives/ranges
/scalarRange/scalarRanges.C
View file @
a3c6d6ac
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C)
1991
-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C)
2007
-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
src/OpenFOAM/
db
/scalarRange/scalarRanges.H
→
src/OpenFOAM/
primitives/ranges
/scalarRange/scalarRanges.H
View file @
a3c6d6ac
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C)
1991
-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C)
2007
-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment