Vuo
2.4.4
Loading...
Searching...
No Matches
base
VuoType.cc
Go to the documentation of this file.
1
10
#include "
VuoType.hh
"
11
#include "
VuoStringUtilities.hh
"
12
13
15
const
string
VuoType::listTypeNamePrefix
=
"VuoList_"
;
16
18
const
string
VuoType::dictionaryTypeNamePrefix
=
"VuoDictionary_"
;
19
20
26
VuoType::VuoType
(
string
typeName)
27
:
VuoBase
<
VuoCompilerType
,void>(
"VuoType"
),
28
VuoModule
(typeName)
29
{
30
}
31
32
VuoType::~VuoType
(
void
)
33
{
34
}
35
40
bool
VuoType::isTypeName
(
const
string
&potentialTypeName)
41
{
42
return
potentialTypeName.find(
"."
) == string::npos;
43
}
44
48
bool
VuoType::isListTypeName
(
const
string
&typeName)
49
{
50
return
VuoStringUtilities::beginsWith
(typeName,
listTypeNamePrefix
);
51
}
52
56
bool
VuoType::isDictionaryTypeName
(
const
string
&typeName)
57
{
58
return
VuoStringUtilities::beginsWith
(typeName,
dictionaryTypeNamePrefix
);
59
}
60
65
string
VuoType::extractInnermostTypeName
(
const
string
&typeName)
66
{
67
string
t{typeName};
68
while
(
VuoStringUtilities::beginsWith
(t,
listTypeNamePrefix
))
69
t =
VuoStringUtilities::substrAfter
(t,
listTypeNamePrefix
);
70
71
return
t;
72
}
Generated on Thu Nov 9 2023 16:59:28 for Vuo by
1.9.8