BioDynaMo
v1.05.125-2619fe54
Home
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
i
k
l
n
o
p
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
i
l
n
o
p
r
s
t
u
v
w
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
b
c
d
e
f
i
n
p
r
t
v
Enumerations
Enumerator
Related Functions
:
d
e
i
m
o
p
r
s
t
Files
File List
File Members
All
_
b
c
d
h
n
p
s
Functions
Variables
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
neuroscience
neuron_or_neurite.cc
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------
2
//
3
// Copyright (C) 2021 CERN & University of Surrey for the benefit of the
4
// BioDynaMo collaboration. All Rights Reserved.
5
//
6
// Licensed under the Apache License, Version 2.0 (the "License");
7
// you may not use this file except in compliance with the License.
8
//
9
// See the LICENSE file distributed with this work for details.
10
// See the NOTICE file distributed with this work for additional information
11
// regarding copyright ownership.
12
//
13
// -----------------------------------------------------------------------------
14
15
#include "
neuroscience/neuron_or_neurite.h
"
16
#include "
neuroscience/neurite_element.h
"
17
#include "
neuroscience/neuron_soma.h
"
18
19
namespace
bdm
{
20
namespace
neuroscience {
21
22
NeuronOrNeurite::~NeuronOrNeurite
() =
default
;
23
24
AgentPointer<NeuronOrNeurite>
NeuronOrNeurite::GetNeuronOrNeuriteAgentPtr
()
25
const
{
26
if
(
auto
* neuron =
dynamic_cast<
const
NeuronSoma
*
>
(
this
)) {
27
return
neuron->template GetAgentPtr<NeuronOrNeurite>();
28
}
else
if
(
auto
* neurite =
dynamic_cast<
const
NeuriteElement
*
>
(
this
)) {
29
return
neurite->template GetAgentPtr<NeuronOrNeurite>();
30
}
31
assert(
false
&&
"This code should not be reached."
);
32
return
AgentPointer<NeuronOrNeurite>
();
33
}
34
35
StructureIdentifierSWC
NeuronOrNeurite::GetIdentifierSWC
()
const
{
36
if
(
IsNeuronSoma
()) {
37
return
StructureIdentifierSWC::kSoma
;
38
}
else
{
39
return
StructureIdentifierSWC::kApicalDendrite
;
40
}
41
};
42
43
bool
NeuronOrNeurite::IsNeuronSoma
()
const
{
44
return
dynamic_cast<
const
NeuronSoma
*
>
(
this
) !=
nullptr
;
45
}
46
47
bool
NeuronOrNeurite::IsNeuriteElement
()
const
{
48
return
dynamic_cast<
const
NeuriteElement
*
>
(
this
) !=
nullptr
;
49
}
50
51
}
// namespace neuroscience
52
}
// namespace bdm
bdm
Definition:
agent.cc:39
bdm::AgentPointer
Definition:
agent_pointer.h:58
bdm::neuroscience::NeuronOrNeurite::GetNeuronOrNeuriteAgentPtr
AgentPointer< NeuronOrNeurite > GetNeuronOrNeuriteAgentPtr() const
Definition:
neuron_or_neurite.cc:24
bdm::neuroscience::kApicalDendrite
@ kApicalDendrite
Definition:
neuron_or_neurite.h:37
neuron_or_neurite.h
neuron_soma.h
neurite_element.h
bdm::neuroscience::NeuronSoma
Definition:
neuron_soma.h:30
bdm::neuroscience::NeuronOrNeurite::~NeuronOrNeurite
virtual ~NeuronOrNeurite()
bdm::neuroscience::NeuronOrNeurite::IsNeuronSoma
bool IsNeuronSoma() const
Definition:
neuron_or_neurite.cc:43
bdm::neuroscience::NeuronOrNeurite::GetIdentifierSWC
virtual StructureIdentifierSWC GetIdentifierSWC() const
Returns the SWC classification of the object.
Definition:
neuron_or_neurite.cc:35
bdm::neuroscience::StructureIdentifierSWC
StructureIdentifierSWC
Definition:
neuron_or_neurite.h:32
bdm::neuroscience::NeuronOrNeurite::IsNeuriteElement
bool IsNeuriteElement() const
Definition:
neuron_or_neurite.cc:47
bdm::neuroscience::kSoma
@ kSoma
Definition:
neuron_or_neurite.h:34
bdm::neuroscience::NeuriteElement
Definition:
neurite_element.h:56
Generated by
1.8.17