Foobar2000:Development:Storing Configuration

From Hydrogenaudio Knowledgebase
Revision as of 12:21, 22 June 2022 by DEATH (talk | contribs) (Created page with "Category:Foobar2000 Development == Storing configuration == In order to create your entries in the foobar2000 configuration files, you must instantiate some objects that...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Storing configuration

In order to create your entries in the foobar2000 configuration files, you must instantiate some objects that derive from cfg_var class. Those can be either predefined classes (cfg_int, cfg_string, etc) or your own classes implementing relevant methods.

Each cfg_var instance has a GUID assigned, to identify its configuration file entry. The GUID is passed to its constructor (which implementations must take care of, typically by providing a constructor that takes a GUID and forwards it to cfg_var constructor).

Note that cfg_var objects can only be instantiated statically (either directly as static objects, or as members of other static objects).

It is encouraged to create your own configuration files in foobar2000 profile for more complex data to allow easy import / export / backup.