top | up | prev | next

ResourceTable Class

Definition at line 39 of ResourceTable.hpp

Member Functions

void AddResource(const Resource& resource)
bool Contains(const std::u32string& resourceName) const
void Dump(CodeFormatter& formatter)
void Read(BinaryReader& reader)
const std::vector<Resource>& Resources() const
void Write(BinaryWriter& writer)

Member Variables

std::set<std::u32string> resourceNameSet
std::vector<Resource> resources

Member Function Details

AddResource Member Function

void cmajor::symbols::ResourceTable::AddResource(const Resource & resource)

Definition at line 85 of ResourceTable.cpp :
 86 {
 87     resourceNameSet.insert(resource.name);
 88     resources.push_back(resource);
 89 }


Declaration at line 43 of ResourceTable.hpp


Contains Member Function

bool cmajor::symbols::ResourceTable::Contains(const std::u32string& resourceName) const

Definition at line 80 of ResourceTable.cpp :
 81 {
 82     return resourceNameSet.find(resourceName) != resourceNameSet.cend();
 83 }


Declaration at line 42 of ResourceTable.hpp


Dump Member Function

void cmajor::symbols::ResourceTable::Dump(CodeFormatter& formatter)

Definition at line 128 of ResourceTable.cpp :
129 {
130     formatter.WriteLine("RESOURCE TABLE:");
131     int index = 0;
132     for (Resource& resource : resources)
133     {
134         resource.Dump(formatterindex);
135         ++index;
136     }
137 }


Calls: cmajor::symbols::Resource::Dump


Read Member Function

void cmajor::symbols::ResourceTable::Read(BinaryReader& reader)

Definition at line 109 of ResourceTable.cpp

Calls: cmajor::symbols::Resource::Read


Resources Member Function

const std::vector<Resource >& cmajor::symbols::ResourceTable::Resources() const

Definition at line 44 of ResourceTable.hpp :
44 { return resources; }


Write Member Function

void cmajor::symbols::ResourceTable::Write(BinaryWriter& writer)

Definition at line 91 of ResourceTable.cpp

Calls: cmajor::symbols::ResourceTable::Write

Called by: cmajor::symbols::ResourceTable::Write


top | up | prev | next