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

Method CtrlrPanelResource

Source/Core/CtrlrPanel/CtrlrPanelResource.cpp:14–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12*/
13
14CtrlrPanelResource::CtrlrPanelResource (CtrlrPanelResourceManager &_owner, const File &_resourceDataFile, const File &_resourceSourceFile, const String _resourceName)
15 : resourceDataFile(_resourceDataFile),
16 resourceHashCode(0),
17 resourceLoaded(false),
18 owner(_owner),
19 resourceName(_resourceName),
20 audioFormatReader(nullptr),
21 resourceTree(Ids::resource)
22{
23 if (resourceName == "")
24 {
25 resourceName = _resourceSourceFile.getFileNameWithoutExtension();
26 }
27
28 resourceHashCode = _resourceSourceFile.hashCode();
29 resourceType = owner.guessType (_resourceSourceFile);
30
31 load();
32
33 setProperty (Ids::resourceFile, resourceDataFile.getFileName(), false);
34 setSourceFile(_resourceSourceFile);
35 setProperty (Ids::resourceName, getName(), false);
36 setProperty (Ids::resourceSize, getSize(), false);
37 setProperty (Ids::resourceType, CtrlrPanelResourceManager::getTypeDescription(getType()), false);
38
39 resourceTree.addListener(this);
40}
41
42CtrlrPanelResource::~CtrlrPanelResource()
43{

Callers

nothing calls this directly

Calls 10

setPropertyFunction · 0.85
guessTypeMethod · 0.80
loadFunction · 0.50
getNameFunction · 0.50
getSizeFunction · 0.50
getTypeFunction · 0.50
hashCodeMethod · 0.45
getFileNameMethod · 0.45
addListenerMethod · 0.45

Tested by

no test coverage detected