Revision 1613 trunk/tests/xml/ADMB_XMLDoc.h

ADMB_XMLDoc.h (revision 1613)
9 9
#define __ADMB_XMLDoc__
10 10

  
11 11
#include <fvar.hpp>
12
#include <admodel.h>
12 13

  
13 14
#include <libxml/tree.h>
14 15
#include <libxml/parser.h>
......
17 18

  
18 19
using namespace std;
19 20

  
20
// forward declarations to avoid circular includes caused by
21
#include <admodel.h>
22
/*
23
class data_vector;
24
class data_matrix;
25
class named_dvariable;
26
class named_dvar_vector;
27
class named_dvar_matrix;
28
class param_init_bounded_number;
29
class param_init_bounded_vector;
30
class objective_function_value;
31
class initial_params;
32
class model_name_tag;
33
*/
21

  
34 22
/** Class for handling ADMB data types in XML. 
35 23
*/
36 24
class ADMB_XMLDoc
......
93 81
   int createXMLelement(const adstring& name, const param_init_bounded_number_vector& t, const adstring& title);
94 82
   int createXMLelement(const adstring& name, const param_init_bounded_number_matrix& t, const adstring& title, const int M);
95 83
   int createXMLelement(const adstring& name, const imatrix& t, const adstring& title);
96
   //int createXMLelement(const adstring& name, const data_int& t, const adstring& title);
97
   //int createXMLelement(const adstring& name, const data_number& t, const adstring& title);
98
   //int createXMLelement(const adstring& name, const data_vector& t, const adstring& title);
99
   //int createXMLelement(const adstring& name, const data_matrix& t, const adstring& title);
100 84
   /** @} */
101 85

  
102 86
   // -----------------------
......
111 95
   \return 1 if successful; 0 otherwise.
112 96
   */
113 97
   int createXMLelement(const data_int& t, const adstring& title);
98
   //int createXMLelement(const data_number& t, const adstring& title);
114 99
   int createXMLelement(const data_vector& t, const adstring& title);
115 100
   int createXMLelement(const data_matrix& t, const adstring& title);
116 101

  
......
207 192

  
208 193
}; // class ADMB_XMLDoc
209 194

  
195
/**
196
  Implements allocate(...) instances of named ADMB_XMLDoc generated
197
  by tpl2cpp in the DATA_SECTION
198
*/
210 199
class init_xml_doc : public ADMB_XMLDoc, public model_name_tag
211 200
{
212 201
public:
202
  /// create unallocated instance
213 203
  init_xml_doc(void) : ADMB_XMLDoc(), model_name_tag() {;}
204
  /**
205
  Allocate member variables.
206
  \param s Root name for input XML file. Default file extension is ".xml".
207
  */
214 208
  void allocate(const char * s);
215 209
  friend class model_parameters;
216 210
};

Also available in: Unified diff