PageRenderTime 164ms CodeModel.GetById 149ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/Dlls/Delta.ContentSystem.xml

#
XML | 511 lines | 511 code | 0 blank | 0 comment | 0 complexity | 46fd67ce9d1f02f2370be088e9dd68f3 MD5 | raw file
  1<?xml version="1.0" encoding="utf-8"?>
  2<doc>
  3  <assembly>
  4    <name>Delta.ContentSystem</name>
  5  </assembly>
  6  <members>
  7    <member name="T:Delta.ContentSystem.Xml.XmlData">
  8      <summary>
  9            XML content class, which is both a basic implementation that is useful
 10            for testing for the whole content system and also an important class for
 11            for the Localization system (which is based on the Localization.xml
 12            file), which is also located in this assembly.
 13            <para />
 14            Note: This class is not publicly available, but you can re-implement it
 15            quickly, all it does is: <c>XmlNode.LoadFile(RelativeFilePath)</c></summary>
 16    </member>
 17    <member name="T:Delta.ContentSystem.Content">
 18      <summary>
 19            Content base class to keep content free from platform and framework
 20            types we need in specific modules. For example new Image(name) loads a
 21            texture, but on the native implementation it could be an XNA Texture2D,
 22            an OpenTK texture id or a SlimDX texture object, we just don't know!
 23            We also have many other great advantages through the ContentManager like
 24            automatic content reloading and language specific content with automatic
 25            updates if the language changes. Most properties and details are
 26            in the ContentMetaData class and all the heavy lifting is done by the
 27            Content System Server, which we can talk through the content client.
 28            <para />
 29            See http://DeltaEngine.net/Wiki.ContentSystem for details.
 30            <para />
 31            Note: Each Content class can also implement the ISaveLoadBinary
 32            interface, which is then used to both save and load data. Saving is not
 33            really needed for games as all content is generated by the content
 34            system on the server, but thanks to this interface we can easily support
 35            saving content data in the same way there too (e.g. for effects, scenes,
 36            materials, etc., but not for textures or sound files).
 37            <para />
 38            Please note that even while the Load method is called right away the
 39            constructor when creating a new content instance via the static Get,
 40            it does not mean that the native data is loaded right away. Usually it
 41            is, but for content that needs some time to be initialized like
 42            textures or sounds, the derived content classes can decide to load
 43            their native data delayed when it is actually needed (for rendering
 44            or when first playing it). This has two advantages and a disadvantage.
 45            First of all it saves a lot of memory and initial loading time, which
 46            will make your game startup almost instantly. However since content
 47            is loaded later you might not be so happy about it when the game is
 48            stuttering while playing until you have all content that you need.
 49            The solution to this is to use scenes, which solves many things in the
 50            Content System. Once a scene is opened, all content is pre-loaded the
 51            first time the scene is getting updated (via Run). This way all the
 52            content that you create when opening your scene both in the SceneEditor
 53            and in code (loading levels, textures, music, sounds, etc.) is loaded
 54            right away, but you still have the option to load more stuff later.
 55            </summary>
 56    </member>
 57    <member name="F:Delta.ContentSystem.Content.EmptyName">
 58      <summary>
 59            If the default (fallback) is needed directly, then just use this
 60            identifier as content name. Please note that null or strings starting
 61            with &gt; will also be considered as un-loadable content and just a
 62            dummy ContentData object is returned (and LoadFallbackData is used).
 63            This is also used for generated content (e.g. meshes, materials or
 64            scenes that are created during runtime). Please note that these
 65            generated content classes have always DefaultId (empty string) or
 66            start with &gt; (plus some name like "&gt;GeneratedMeshBox&lt;"), this
 67            is how you know if content was loaded or generated.
 68            </summary>
 69    </member>
 70    <member name="M:Delta.ContentSystem.Content.Exists(System.String,Delta.ContentSystem.ContentType)">
 71      <summary>
 72            Check if a specific content with given name and type exists. The
 73            content entry is not loaded and we do not care about languages here.
 74            </summary>
 75      <param name="contentName">Name to search for, will only search for
 76            content in our current language in the flatData dictionary</param>
 77      <param name="contentType">Type to search for in the flatData dictionary
 78            </param>
 79      <returns>
 80            True if we have such a content meta data, false otherwise (not found)
 81            </returns>
 82    </member>
 83    <member name="M:Delta.ContentSystem.Content.Equals(System.Object,System.Object)">
 84      <summary>
 85            Equals, just trying to hide it from intellisense.
 86            </summary>
 87      <param name="objA">The first System.Object to compare.</param>
 88      <param name="objB">The second System.Object to compare.</param>
 89      <returns>true if objA is the same instance as objB; otherwise, false.
 90            </returns>
 91    </member>
 92    <member name="M:Delta.ContentSystem.Content.ReferenceEquals(System.Object,System.Object)">
 93      <summary>
 94            Hide method to hide ReferenceEquals from intellisense.
 95            </summary>
 96      <param name="objA">The first System.Object to compare.</param>
 97      <param name="objB">The second System.Object to compare.</param>
 98      <returns>true if objA is the same instance as objB or if both are null
 99            references; otherwise, false.</returns>
100    </member>
101    <member name="F:Delta.ContentSystem.Content.NativeClassObject">
102      <summary>
103            Link to the disposable and cloneable native class object, which we
104            need in case we to clone the native object data. For example Load can
105            determinate that two image data content instances should share their
106            internal native data for the same atlas image. (see Load method).
107            <para />
108            Note: This is also used to dispose native data when the content system
109            wants to free memory. Each class should implement a reload mechanism
110            to ensure the native object can still be used and reloaded after it
111            has been disposed (e.g. a texture, a font, etc.)
112            </summary>
113    </member>
114    <member name="F:Delta.ContentSystem.Content.ContentChanged">
115      <summary>
116            Helper delegate to automatically notify external classes in case a
117            content reload is happening here. Basically every time the content
118            is loaded and then the Reload method is called, this is called too
119            (except for the very first time, which just initializes the data).
120            </summary>
121    </member>
122    <member name="M:Delta.ContentSystem.Content.#ctor(System.String,Delta.ContentSystem.ContentType)">
123      <summary>
124            The content constructor just searches for the ContentMetaData entry
125            with the ContentManager.Add method and links it up for this content
126            object (happens in the Reload method actually). Derived classes must
127            just implement the Load method plus Clone and Dispose to allow cloning
128            and unloading content (usually with custom logic, e.g. textures).
129            </summary>
130      <param name="setName">
131            Name for this content object, should not contain any path, project,
132            scene or any special character! If this is empty or starts with an
133            &gt; character, we assume this is code generated content
134            (e.g. "&gt;IntroScene&lt;" or "") and no loading will happen!
135            </param>
136      <param name="setType">Type of content to load (image, sound)</param>
137    </member>
138    <member name="M:Delta.ContentSystem.Content.Dispose">
139      <summary>
140            Dispose, this makes sure after disposing content we also kill all the
141            links to the ContentManager. And we make sure the Data is not longer
142            used plus all attached native objects are also disposed when they are
143            not longer needed via NativeClassObject.Dispose!
144            <para />
145            Note: This does not kill the native data directly, instead the
146            RemoveThisFromContentManager method is used to check if we can kill
147            the native data or not if there are still cloned instances alive.
148            <para />
149            Also note that almost no content class needs to override this method
150            as only the disposing of the native data is critical, the content
151            meta data can be ignored and the data class has rarely any resources
152            that need disposing for cloned objects (native data still can be
153            handled with the DisposeNativeObject event).
154            </summary>
155    </member>
156    <member name="M:Delta.ContentSystem.Content.ToString">
157      <summary>
158            Returns a <see cref="T:System.String" /> with the class name and the
159            content name and type.
160            </summary>
161      <returns>
162            A <see cref="T:System.String" /> with the class name and content type.
163            </returns>
164    </member>
165    <member name="M:Delta.ContentSystem.Content.Reload">
166      <summary>
167            Load or reload the content. Can be used to reload content and force
168            calling Load when the native data is gone after disposing. Also
169            important to make sure that we can clone native data like Textures or
170            Sounds (so we don't load native resources like atlas images twice).
171            </summary>
172    </member>
173    <member name="M:Delta.ContentSystem.Content.Reload(System.String,Delta.ContentSystem.ContentType,System.Boolean)">
174      <summary>
175            Load or reload the content, only used internally in the ContentManager
176            and from this Content constructor to load the content initially.
177            </summary>
178      <param name="setName">Content name to load</param>
179      <param name="setType">Content type</param>
180      <param name="alsoNotifyNativeObjectViaContentChangedEvent">
181            This is only set to true if this Reload is called by the
182            ContentManager. Then the ContentChanged event is also fired (otherwise
183            we would get into trouble with stack overflows if ContentChanged also
184            does a Reload like for Texture Loads, where it is required).
185            </param>
186    </member>
187    <member name="M:Delta.ContentSystem.Content.Load(Delta.ContentSystem.Content)">
188      <summary>
189            Native load data method, can consist of very few lines of code, in
190            many cases is just one single line of code trying to load the native
191            content. This method should not fail (it is called from the content
192            constructor and that would crash then too), instead handle exceptions
193            or missing data and load fallback data directly in the content class.
194            <para />
195            Please note that even while this method is called right away the
196            constructor when creating a new content instance via the static Get,
197            it does not mean that the native data is loaded right away. Usually it
198            is, but for content that needs some time to be initialized like
199            textures or sounds, the derived content classes can decide to load
200            their native data delayed when it is actually needed (for rendering
201            or when first playing it). This has two advantages and a disadvantage.
202            First of all it saves a lot of memory and initial loading time, which
203            will make your game startup almost instantly. However since content
204            is loaded later you might not be so happy about it when the game is
205            stuttering while playing until you have all content that you need.
206            The solution to this is to use scenes, which solves many things in the
207            Content System. Once a scene is opened, all content is pre-loaded the
208            first time the scene is getting updated (via Run). This way all the
209            content that you create when opening your scene both in the SceneEditor
210            and in code (loading levels, textures, music, sounds, etc.) is loaded
211            right away, but you still have the option to load more stuff later.
212            </summary>
213      <param name="alreadyLoadedNativeData">If we already have native data
214            loaded, clone it from this instance. Only used if not null. Please
215            note that this is only used for other objects that had the same
216            RawFileId and are already loaded and returned true for this method.
217            </param>
218    </member>
219    <member name="P:Delta.ContentSystem.Content.Path">
220      <summary>
221            The content directory path by default is always "Content". All content
222            files are stored in that directory or its sub directories, all file
223            paths to content are relative to this directory! Note: For the
224            ContentManager tool this can be changed to different project names,
225            you can use Content.Path or ContentManager.Name property for the current
226            name of the content directory (setting it is internal). Note: If these
227            properties are different (can only happen in the ContentManager tool)
228            then the ContentManager needs to be disposed and restarted with the
229            new Content.Path, which is required when switching content projects.
230            </summary>
231    </member>
232    <member name="P:Delta.ContentSystem.Content.TotalNumberOfUsableContentEntries">
233      <summary>
234            Returns the number of content meta data entries that have been created
235            and made available by the content system (server side) and can be used
236            in the current project with the current language. For the current
237            number of loaded content files use the following properties:
238            <see cref="P:Delta.ContentSystem.Content.CurrentlyLoadedContentEntries" /> and
239            <see cref="P:Delta.ContentSystem.Content.CurrentlyLoadedContentMemorySize" /></summary>
240    </member>
241    <member name="P:Delta.ContentSystem.Content.CurrentlyLoadedContentEntries">
242      <summary>
243            Number of currently loaded content entries (including clones and
244            content that links to the same native data, like atlas textures).
245            </summary>
246    </member>
247    <member name="P:Delta.ContentSystem.Content.TotalLoadedContentMemorySize">
248      <summary>
249            Returns the same size in bytes as CurrentlyLoadedContentMemorySize,
250            but instead of a dictionary with the size for each content type, it
251            is all added up here to the overall total content memory usage
252            currently needed by this application.
253            </summary>
254    </member>
255    <member name="P:Delta.ContentSystem.Content.Name">
256      <summary>
257            Name of this content file, only for informational purposes, you cannot
258            change this outside of the constructor (same as Type)!
259            </summary>
260    </member>
261    <member name="P:Delta.ContentSystem.Content.FailedToLoad">
262      <summary>
263            Failed to load the native data? In that case the fallback was used and
264            as soon as we have new data available we should try to reload. The
265            ToString method will also show the failed to load error (good for
266            debugging) and the fallback itself is usually visible on screen (e.g.
267            image is displayed as a fallback checker map, sounds and music are
268            not played, but an error message is shown on the screen, etc.)
269            This property is not saved or loaded and it can be set internally or
270            by the classes that use this content object (e.g. textures or sounds).
271            </summary>
272    </member>
273    <member name="P:Delta.ContentSystem.Content.RelativeFilePath">
274      <summary>
275            Returns the relative file path from the application directory to
276            find the content, which is just the Content directory + the filename
277            we got from ContentMetaData. Some native classes do not need this as
278            they load content directly from the LocalFilePath (e.g. XNA).
279            </summary>
280    </member>
281    <member name="P:Delta.ContentSystem.Content.Type">
282      <summary>
283            ContentType for this content file, only for informational purposes,
284            you cannot change this outside of the constructor!
285            </summary>
286    </member>
287    <member name="P:Delta.ContentSystem.Content.MemorySize">
288      <summary>
289            Native memory size needed for this content object. By default this is
290            the file size as most content is just loaded 1:1, but each content
291            class can override this and return the actual number of needed bytes.
292            For example when compressing or decompressing content or creating
293            additional content, this property should return the needed memory size.
294            </summary>
295    </member>
296    <member name="M:Delta.ContentSystem.Xml.XmlData.Get(System.String)">
297      <summary>
298            This is the only method to load XmlData content. If a content object
299            has already been loaded, it will be returned again.
300            </summary>
301      <param name="contentName">Name of the Xml content to load</param>
302      <returns>The loaded XmlData object (or fallback if it failed)</returns>
303    </member>
304    <member name="M:Delta.ContentSystem.Xml.XmlData.#ctor(System.String,Delta.ContentSystem.ContentType)">
305      <summary>
306            Pass through constructor for derived classes. XmlData is always
307            loaded as soon as possible (which is immediately in this constructor)
308            </summary>
309      <param name="setName">Name of the set.</param>
310      <param name="contentType">Type of the content.</param>
311    </member>
312    <member name="M:Delta.ContentSystem.Xml.XmlData.#ctor(System.String)">
313      <summary>
314            Create xml content based on the content system. Loading happens in
315            the Load method, all content is loaded right away.
316            </summary>
317      <param name="setName">Name of the xml content to load.</param>
318    </member>
319    <member name="M:Delta.ContentSystem.Xml.XmlData.Load(Delta.ContentSystem.Content)">
320      <summary>
321            Native load method, will just load the xml data.
322            </summary>
323    </member>
324    <member name="P:Delta.ContentSystem.Xml.XmlData.RootNode">
325      <summary>
326            Xml data, which is loaded in the Load method (via the constructor).
327            </summary>
328    </member>
329    <member name="T:Delta.ContentSystem.Xml.Localization">
330      <summary>
331            Localization class, which is based on the Localization.xml content file
332            that will be loaded via XmlData like every other content file. To use
333            this class just access the static methods to get text strings. Image
334            localization works automatically via the content system once we switch
335            the current language (see Settings.Language). Currently we only care
336            about the 5 standard languages: English, German, French, Spanish and
337            Italian, but more can easily be added to the content and localization
338            file without changing any code (since the language is just a string
339            from the Settings.xml).
340            </summary>
341    </member>
342    <member name="F:Delta.ContentSystem.Xml.Localization.English">
343      <summary>
344            Name for the english (international) content language.
345            </summary>
346    </member>
347    <member name="F:Delta.ContentSystem.Xml.Localization.German">
348      <summary>
349            Name for the german content language.
350            </summary>
351    </member>
352    <member name="F:Delta.ContentSystem.Xml.Localization.French">
353      <summary>
354            Name for the french content language.
355            </summary>
356    </member>
357    <member name="F:Delta.ContentSystem.Xml.Localization.Spanish">
358      <summary>
359            Name for the spanish content language.
360            </summary>
361    </member>
362    <member name="F:Delta.ContentSystem.Xml.Localization.Italian">
363      <summary>
364            Name for the italian content language.
365            </summary>
366    </member>
367    <member name="F:Delta.ContentSystem.Xml.Localization.WarnIfLanguageKeyWasNotFound">
368      <summary>
369            By default the Get method will not warn about missing language keys
370            and just return the language key back if nothing was found in the
371            Localization.xml content file. This is useful for the most parts of
372            the engine and many unit tests, especially in the UI system, which is
373            not translated (but can easily be done by adding localization texts).
374            </summary>
375    </member>
376    <member name="M:Delta.ContentSystem.Xml.Localization.Equals(System.Object,System.Object)">
377      <summary>
378            Equals, just here to hide it from intellisense.
379            </summary>
380      <param name="objA">Object 1 to compare</param>
381      <param name="objB">Object 2 to compare</param>
382      <returns>True if both objects are equal</returns>
383    </member>
384    <member name="M:Delta.ContentSystem.Xml.Localization.ReferenceEquals(System.Object,System.Object)">
385      <summary>
386            Reference equals, just here to hide it from intellisense.
387            </summary>
388      <param name="objA">The obj A.</param>
389      <param name="objB">The obj B.</param>
390      <returns>True if objects are equal</returns>
391    </member>
392    <member name="M:Delta.ContentSystem.Xml.Localization.Get(System.String,System.String)">
393      <summary>
394            Get localized string if we have it in the Localization.xml file.
395            If you need more precise text strings based on each scene in the game
396            use the optional sceneName parameter! Uses Settings.Language.
397            </summary>
398      <param name="text">
399            The text we are searching for (usually a key, but can be any string,
400            which will be returned if nothing is found).
401            </param>
402      <param name="sceneName">Name of the scene to search in first.</param>
403      <returns>The localized text for the current language</returns>
404    </member>
405    <member name="T:Delta.ContentSystem.ContentType">
406      <summary>
407            Content type for ContentData, must be one of the given types here! All
408            types except Project have parents and except for Project and Scene they
409            all must be in a Scene. See http://deltaengine.net/Wiki.ContentFormats.
410            <para />Invalid type (-1) is used for Projects and other negative numbers
411            are for direct content project data,
412            <para />Scene=0, UIScreen=1, UITheme=2, Level=3,<para />Image=4,
413            ImageAnimation=5, Shader=6, Mesh=7, MeshAnimation=8,<para />
414            ParticleEffect=9, Font=10,<para />Sound=11, Music=12, Video=13,<para />
415            PhysicsCollision=14, Xml=15,<para />JustStore=16 and above 16 for custom
416            types (see each IContentPlugin for type numbers, but be aware of type
417            number collisions, which need to be avoided for each content project).
418            </summary>
419    </member>
420    <member name="F:Delta.ContentSystem.ContentType.Scene">
421      <summary>
422            Binary scene content file, created by the SceneEditor and usually
423            loaded when creating and opening scenes. Extension is .DeltaScene.
424            This class is managed by the Delta.Scenes.Scene class and all content
425            is sorted by projects first and then by Scenes. This is important for
426            optimizations, streaming, generating content and reducing how much
427            content needs to be loaded for each game scene.
428            <para />
429            For this reason you will always be forced to create a scene and
430            a project first before you can important content. Using content
431            however is very easy, you can use whatever content from all projects
432            and scenes in all other projects and scenes (content from each scene
433            is however always preferred if you have the same content name).
434            </summary>
435    </member>
436    <member name="F:Delta.ContentSystem.ContentType.Sound">
437      <summary>
438            Sound file for sound playback, just a .wav file on most platforms.
439            Any format can be used for importing, the processed sound file might
440            however differ greatly in terms of quality (hz, stereo, bit-rate).
441            Modify your project content quality settings to change how sound files
442            are processed.
443            </summary>
444    </member>
445    <member name="F:Delta.ContentSystem.ContentType.Music">
446      <summary>
447            Music file for playing in the background or even use streaming.
448            This is just an .mp3 file (or .ogg for OpenTK platforms), but it can
449            also be imported from a .wav file.
450            </summary>
451    </member>
452    <member name="F:Delta.ContentSystem.ContentType.Video">
453      <summary>
454            Video file for multimedia. Supports .mp4 video files for many mobile
455            platforms (iOS, Android)! iPhone uses .m4v, which is the same as .mp4.
456            .wmv is used fo WP7. All the decissions are made on the server side!
457            </summary>
458    </member>
459    <member name="T:Delta.ContentSystem.EmptySceneData">
460      <summary>
461            Empty scene data fallback class that does not contain any data, it is
462            just the fallback to make projects without scenes work. Normally you
463            would use SceneData, which loads all the required data for a scene.
464            <para />
465            Most importantly we always have only one scene active. All content that
466            is loaded during the time that scene is open will automatically be
467            disposed when closing the scene. This way we can open new scenes and
468            make sure all content from the previous scenes has been unloaded. If
469            you load new scenes while the old one is still open (stack add), you can
470            load additional content, but nothing gets disposed automatically.
471            <para />
472            Note: This class is not publicly available and only used as fallback
473            internally. However it is also the base class for SceneData in the
474            Delta.ContentSystem.UserInterfaces namespace. SceneData is used in the
475            sealed and protected Scene class (in Delta.Scenes).
476            </summary>
477    </member>
478    <member name="M:Delta.ContentSystem.EmptySceneData.#ctor(System.String)">
479      <summary>
480            Create scene content based on the content system. Loading happens in
481            the Load method, all content is loaded right away.
482            </summary>
483      <param name="setName">Name of the scene name to load.</param>
484    </member>
485    <member name="M:Delta.ContentSystem.EmptySceneData.Dispose">
486      <summary>
487            Dispose native data, which is called when the content system wants
488            to free up some memory. This does NOT mean the whole content is
489            disposed, this only happens if all instances of the used native
490            content are released (we keep track of this in the ContentManager).
491            Use the RemoveThisFromContentManager method to check if we can kill
492            the native data or not.
493            </summary>
494    </member>
495    <member name="M:Delta.ContentSystem.EmptySceneData.Load(Delta.ContentSystem.Content)">
496      <summary>
497            Native load method, will load all the scene data. This method does
498            nothing here except setting currentScene. This class must be derived
499            and all functionality must be implemented in the derived class.
500            </summary>
501      <param name="alreadyLoadedNativeData">Not used here</param>
502    </member>
503    <member name="P:Delta.ContentSystem.EmptySceneData.Current">
504      <summary>
505            By default the empty project scene is set (it is also set when no
506            other scene is set anymore and Dispose was called from the last one).
507            Each scene can have children and a parent.
508            </summary>
509    </member>
510  </members>
511</doc>