DSP/LabelMap: Amend class formatting

Places the most important stuff, the public interface first.
This commit is contained in:
Lioncash 2019-06-07 17:05:23 -04:00
parent e73a3ba1c6
commit 0a1249ea40
1 changed files with 10 additions and 9 deletions

View File

@ -21,6 +21,16 @@ enum LabelType
class LabelMap class LabelMap
{ {
public:
LabelMap();
~LabelMap() {}
void RegisterDefaults();
void RegisterLabel(const std::string& label, u16 lval, LabelType type = LABEL_VALUE);
void DeleteLabel(const std::string& label);
bool GetLabelValue(const std::string& label, u16* value, LabelType type = LABEL_ANY) const;
void Clear();
private:
struct label_t struct label_t
{ {
label_t(const std::string& lbl, s32 address, LabelType ltype) label_t(const std::string& lbl, s32 address, LabelType ltype)
@ -32,14 +42,5 @@ class LabelMap
LabelType type; LabelType type;
}; };
std::vector<label_t> labels; std::vector<label_t> labels;
public:
LabelMap();
~LabelMap() {}
void RegisterDefaults();
void RegisterLabel(const std::string& label, u16 lval, LabelType type = LABEL_VALUE);
void DeleteLabel(const std::string& label);
bool GetLabelValue(const std::string& label, u16* value, LabelType type = LABEL_ANY) const;
void Clear();
}; };
} // namespace DSP } // namespace DSP