Vuo 2.4.4
Loading...
Searching...
No Matches
VuoGenericType.hh
Go to the documentation of this file.
1
10#pragma once
11
12#include "VuoType.hh"
13
19class VuoGenericType : public VuoType
20{
21public:
31
32 VuoGenericType(string typeName, vector<string> compatibleSpecializedTypes);
33 bool isSpecializedTypeCompatible(const string &typeName);
35 vector<string> getCompatibleSpecializedTypes(Compatibility &compatibility);
36
37 static bool isGenericTypeName(string typeName);
38 static vector<string> findGenericTypeNames(const string &stringToSearch);
39 static string replaceInnermostGenericTypeName(string genericTypeName, string replacementTypeName);
40 static bool replaceGenericTypeNamesInString(string &stringToSearch, const map<string, string> &specializedForGenericTypeName, vector<string> &orderedGenericTypeNames);
41 static string createGenericTypeName(unsigned int suffix);
42 static void sortGenericTypeNames(vector<string> &genericTypeNames);
43
44private:
45 vector<string> compatibleSpecializedTypes;
46
47 static const string genericTypeNamePrefix;
48
49 static size_t findGenericTypeName(string stringToSearch, size_t startPos, string &genericTypeName);
50 static bool isPairOfGenericTypesSorted(string type1, string type2);
51 static string extractSuffixStringFromGenericTypeName(string genericTypeName);
52 static unsigned int extractSuffixFromGenericTypeName(string genericTypeName);
53};