DataDirector API
StructuredMemory_XML_Config.h
Go to the documentation of this file.
1 /*! \file StructuredMemory_XML_Config.h
2  \brief The StructuredMemory_XML_Config. Utility class that parses an XML config file
3  for the StructuredMemory asset and caches the list of attributes defined by the config file
4 
5  \par Copyright Information
6 
7  Copyright (c) 2012 The DiSTI Corporation.<br>
8  11301 Corporate Blvd; Suite 100<br>
9  Orlando, Florida 32817<br>
10  USA<br>
11  <br>
12  All rights reserved.<br>
13 
14  This Software contains proprietary trade secrets of DiSTI and may not be
15 reproduced, in whole or part, in any form, or by any means of electronic,
16 mechanical, or otherwise, without the written permission of DiSTI. Said
17 permission may be derived through the purchase of applicable DiSTI product
18 licenses which detail the distribution rights of this content and any
19 Derivative Works based on this or other copyrighted DiSTI Software.
20 
21  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
22 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
23 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
24 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
25 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
26 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
27 
28  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
29 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
30 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
31 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
32 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
33 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBLITY
34 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
35 EXCEED FIVE DOLLARS (US$5.00).
36 
37  The aforementioned terms and restrictions are governed by the laws of the
38 State of Florida and the United States of America.
39 
40 */
41 
42 #ifndef _StructuredMemory_XML_Config_h_
43 #define _StructuredMemory_XML_Config_h_
44 
45 #include "DDD_AttributeList.h"
46 #include "DDD_LogFacade.h"
47 #include "dynamic_array.h"
48 #include "dynamic_ptr_array.h"
49 
50 #include "lmx_utils.h"
51 #include "../DDD_StructuredMemory.h"
52 
53 namespace disti
54 {
55 
56 class ChunkAttribute;
57 class ChunkProducer;
58 class ChunkDescription;
59 
60 class DDD_EXPORT StructuredMemory_XML_Config : public DDD_LogFacade
61 {
62 protected:
63  /** Adds a rule to a chunk description
64  * \param producer The producer that owns the chunk
65  * \param newChunk The chunk to add the rule to
66  * \param chunk The LMX structure defining the rule
67  */
68  void AddRule(ChunkProducer *producer, ChunkDescription *newChunk, tns::c_Rule &rule);
69 
70  /** Adds an attribute to a chunk description
71  * \param newChunk The chunk to add the rule to
72  * \param attribute The LMX structure defining the attribute
73  * \param currentOffset The current offset within the chunk (inout parameter)
74  */
75  void AddAttribute(ChunkDescription *newChunk, tns::c_ChunkAttribute &attribute, unsigned int &currentOffset);
76 
77  /** Adds a chunk to a producer
78  * \param producer The producer to add the chunk to
79  * \param chunk The LMX structure defining the chunk
80  */
81  void AddChunkDescription(ChunkProducer *producer, tns::c_Chunk &chunk);
82 
83 public:
84 
85  /** Creates a chunk producer by loading a configuration file
86  * \param filename The name of the file to read
87  * \return A pointer to a newly created chunk producer or NULL on failure
88  */
89  ChunkProducer *LoadConfiguration(const char *filename);
90 };
91 
92 } // end of namespace disti
93 
94 #endif
95 
Definition: ChunkProducer.h:183
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
Definition: ChunkProducer.h:237
Facade to provide a simpler interface to the DDD_Log singleton. Its second purpose is for decoupling;...
Definition: DDD_LogFacade.h:50
The DDD_AttributeList class. Maintains a list of Data Director attributes.
The disti::DynamicPtrArray class. A templated array of objects pointers capable of dynamically growin...
Definition: StructuredMemory_XML_Config.h:60
Definition: AttributeChangedEmitter.h:46