MCPcopy Create free account
hub / github.com/beefytech/Beef / AddNamespaceUsage

Method AddNamespaceUsage

IDEHelper/Compiler/BfSystem.cpp:2577–2598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2575}
2576
2577void BfSystem::AddNamespaceUsage(const BfAtomComposite& namespaceStr, BfProject* bfProject)
2578{
2579 if (namespaceStr.IsEmpty())
2580 return;
2581
2582 if (namespaceStr.GetPartsCount() > 1)
2583 {
2584 BfAtomComposite subComposite;
2585 subComposite.Set(namespaceStr.mParts, namespaceStr.mSize - 1, NULL, 0);
2586 AddNamespaceUsage(subComposite, bfProject);
2587 }
2588
2589 int* valuePtr = NULL;
2590 if (bfProject->mNamespaces.TryAdd(namespaceStr, NULL, &valuePtr))
2591 {
2592 BfLogSys(this, "BfSystem::AddNamespaceUsage created %s in project: %p\n", namespaceStr.ToString().c_str(), bfProject);
2593 *valuePtr = 1;
2594 mTypeMapVersion++;
2595 }
2596 else
2597 (*valuePtr)++;
2598}
2599
2600void BfSystem::RemoveNamespaceUsage(const BfAtomComposite& namespaceStr, BfProject* bfProject)
2601{

Callers 2

VisitMethod · 0.80
InitMethod · 0.80

Calls 6

GetPartsCountMethod · 0.80
IsEmptyMethod · 0.45
SetMethod · 0.45
TryAddMethod · 0.45
c_strMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected