Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91171494
container.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 8, 15:13
Size
1 KB
Mime Type
text/x-c
Expires
Sun, Nov 10, 15:13 (2 d)
Engine
blob
Format
Raw Data
Handle
22211558
Attached To
rLIBMULTISCALE LibMultiScale
container.cc
View Options
#include "container.hh"
#include "domain_interface.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
//! copy the container info
void
ContainerInterface
::
acquireContext
(
const
LMObject
&
obj
)
{
LMObject
::
acquireContext
(
obj
);
if
(
auto
*
ptr
=
dynamic_cast
<
const
ContainerInterface
*>
(
&
obj
))
{
bounding_box
=
ptr
->
getBoundingBox
();
if
(
ptr
->
hasRefManager
())
this
->
setRefManager
(
ptr
->
getRefManager
());
}
if
(
auto
*
ptr
=
dynamic_cast
<
const
DomainInterface
*>
(
&
obj
))
{
bounding_box
=
ptr
->
getDomainBoundingBox
();
}
}
/* -------------------------------------------------------------------------- */
//! return the ReferenceManager
std
::
shared_ptr
<
ReferenceManagerInterface
>
ContainerInterface
::
getRefManager
()
const
{
if
(
refmanager
.
expired
())
LM_THROW
(
"cannot access undefined Reference Manager"
);
return
refmanager
.
lock
();
}
/* -------------------------------------------------------------------------- */
bool
ContainerInterface
::
hasRefManager
()
const
{
return
!
refmanager
.
expired
();
}
/* -------------------------------------------------------------------------- */
void
ContainerInterface
::
setRefManager
(
std
::
weak_ptr
<
ReferenceManagerInterface
>
refMgr
)
{
refmanager
=
refMgr
;
}
/* -------------------------------------------------------------------------- */
__END_LIBMULTISCALE__
Event Timeline
Log In to Comment