MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / CtrlrIDManager

Method CtrlrIDManager

Source/Core/CtrlrIDManager.cpp:6–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "CtrlrPropertyEditors/CtrlrPropertyComponent.h"
5
6CtrlrIDManager::CtrlrIDManager() : ctrlrIdTree(Ids::ctrlr)
7{
8 XmlDocument contstantsDoc (String (BinaryData::CtrlrIDs_xml, BinaryData::CtrlrIDs_xmlSize));
9 XmlDocument vendorsDoc (String (BinaryData::CtrlrMIDIVendors_xml, BinaryData::CtrlrMIDIVendors_xmlSize));
10
11 {
12 ScopedPointer <XmlElement> xml (contstantsDoc.getDocumentElement().release());
13 if (xml)
14 {
15 ctrlrIdTree = ValueTree::fromXml (*xml);
16
17 if (ctrlrIdTree.isValid())
18 constantsTree = ctrlrIdTree.getChildWithName ("constants");
19 }
20 }
21
22 {
23 ScopedPointer <XmlElement> xml (vendorsDoc.getDocumentElement().release());
24 if (xml)
25 {
26 vendorTree = ValueTree::fromXml (*xml);
27
28 if (vendorTree.isValid())
29 {
30 /* let's sort it alphabeticaly */
31 VendorComparator c;
32 vendorTree.sort (c, nullptr, false);
33 }
34 }
35 }
36}
37
38CtrlrIDManager::~CtrlrIDManager()
39{

Callers

nothing calls this directly

Calls 5

getDocumentElementMethod · 0.80
StringFunction · 0.50
releaseMethod · 0.45
isValidMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected