MCPcopy Create free account
hub / github.com/devosoft/avida / cBaseConfigEntry

Method cBaseConfigEntry

avida-core/source/main/cAvidaConfig.cc:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43tList<cAvidaConfig::cBaseConfigCustomFormat> cAvidaConfig::global_format_list;
44
45cAvidaConfig::cBaseConfigEntry::cBaseConfigEntry(const cString& _name,
46 const cString& _type, const cString& _def, const cString& _desc)
47: config_name(1)
48, type(_type)
49, default_value(_def)
50, description(_desc)
51, use_overide(true)
52{
53 config_name[0] = _name;
54
55 // If the default value was originally a string, it will begin and end with
56 // quotes. We should make sure to remove those.
57 if (default_value[0] == '"') {
58 if (default_value.GetSize() > 2)
59 default_value = default_value.Substring(1, default_value.GetSize() - 2);
60 else default_value = "";
61 }
62}
63
64bool cAvidaConfig::Load(const cString& filename, const cString& working_dir, cUserFeedback* feedback,
65 const Apto::Map<Apto::String, Apto::String>* mappings, bool warn_default)

Callers

nothing calls this directly

Calls 2

SubstringMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected