Adapt doc following renaming of ResourceProxy to EmbeddedResourceProxy in SimGear
simgear::ResourceProxy has been renamed to simgear::EmbeddedResourceProxy in SimGear commit 2200fad30ebfd68cefd461d5443b8612621b4643[1]. Adapt Docs/README.embedded-resources accordingly. [1] This was done in order to avoid confusion with the unrelated classes simgear::ResourceProvider and simgear::ResourceManager.
This commit is contained in:
parent
52f2d9b4b2
commit
70277258bf
1 changed files with 12 additions and 12 deletions
|
@ -15,7 +15,7 @@ Contents
|
||||||
1. The CharArrayStream and ZlibStream classes
|
1. The CharArrayStream and ZlibStream classes
|
||||||
2. The “embedded resources” system
|
2. The “embedded resources” system
|
||||||
3. About the XML resource declaration files
|
3. About the XML resource declaration files
|
||||||
4. The ResourceProxy class
|
4. The EmbeddedResourceProxy class
|
||||||
|
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
|
@ -368,18 +368,18 @@ other XML resource declaration files:
|
||||||
initFlightGearEmbeddedResources();
|
initFlightGearEmbeddedResources();
|
||||||
|
|
||||||
|
|
||||||
4) The ResourceProxy class
|
4) The EmbeddedResourceProxy class
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
SimGear contains a ResourceProxy class that allows one to access real
|
SimGear contains an EmbeddedResourceProxy class that allows one to
|
||||||
files or embedded resources in a unified way. When using it, one can
|
access real files or embedded resources in a unified way. When using it,
|
||||||
switch from one data source to the other with minimal code changes,
|
one can switch from one data source to the other with minimal code
|
||||||
possibly even at runtime (in which case there is obviously no code
|
changes, possibly even at runtime (in which case there is obviously no
|
||||||
change at all).
|
code change at all).
|
||||||
|
|
||||||
Sample usage (from FlightGear):
|
Sample usage (from FlightGear):
|
||||||
|
|
||||||
simgear::ResourceProxy proxy(globals->get_fg_root(), "/FGData");
|
simgear::EmbeddedResourceProxy proxy(globals->get_fg_root(), "/FGData");
|
||||||
proxy.setUseEmbeddedResources(false); // can also be set via the constructor
|
proxy.setUseEmbeddedResources(false); // can also be set via the constructor
|
||||||
|
|
||||||
std::string s = proxy.getString("/some/path");
|
std::string s = proxy.getString("/some/path");
|
||||||
|
@ -466,9 +466,9 @@ Footnotes
|
||||||
std::ios_base::failure exception.
|
std::ios_base::failure exception.
|
||||||
|
|
||||||
[9] flightgear/CMakeModules/GenerateFlightgearResources.cmake in my
|
[9] flightgear/CMakeModules/GenerateFlightgearResources.cmake in my
|
||||||
'i18n-and-init-work-v2-rebased' branch (not merged into 'next' at
|
'i18n-and-init-work-v2' branch (not merged into 'next' at the time
|
||||||
the time of this writing).
|
of this writing).
|
||||||
|
|
||||||
[10] https://sourceforge.net/p/flightgear/simgear/ci/next/tree/simgear/embedded_resources/ResourceProxy.hxx
|
[10] https://sourceforge.net/p/flightgear/simgear/ci/next/tree/simgear/embedded_resources/EmbeddedResourceProxy.hxx
|
||||||
|
|
||||||
[11] https://sourceforge.net/p/flightgear/simgear/ci/next/tree/simgear/embedded_resources/embedded_resources_test.cxx
|
[11] https://sourceforge.net/p/flightgear/simgear/ci/next/tree/simgear/embedded_resources/embedded_resources_test.cxx
|
||||||
|
|
Loading…
Reference in a new issue