export_data_internal.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 #ifndef ACADO_TOOLKIT_EXPORT_DATA_INTERNAL_HPP
26 #define ACADO_TOOLKIT_EXPORT_DATA_INTERNAL_HPP
27 
30 
32 
34 {
35 public:
36 
45  explicit ExportDataInternal( const std::string& _name = std::string(),
46  ExportType _type = REAL,
47  ExportStruct _dataStruct = ACADO_LOCAL,
48  const std::string& _prefix = std::string()
49  );
50 
53  virtual ~ExportDataInternal( );
54 
55  virtual ExportDataInternal* clone() const = 0;
56 
63  returnValue setName( const std::string& _name
64  );
65 
73  );
74 
82  );
83 
90  returnValue setPrefix( const std::string& _prefix
91  );
96  std::string getName( ) const;
97 
102  ExportType getType( ) const;
103 
111  std::string getTypeString( const std::string& _realString = "real_t",
112  const std::string& _intString = "int"
113  ) const;
114 
119  ExportStruct getDataStruct( ) const;
120 
125  std::string getDataStructString( ) const;
126 
131  std::string getPrefix( ) const;
132 
138  std::string getFullName( ) const;
139 
140 
151  virtual returnValue exportDataDeclaration( std::ostream& stream,
152  const std::string& _realString = "real_t",
153  const std::string& _intString = "int",
154  int _precision = 16
155  ) const = 0;
156 
162  virtual bool isGiven( ) const = 0;
163 
164  virtual returnValue setDoc( const std::string& _doc );
165  virtual std::string getDoc( ) const;
166 
167  //
168  // PROTECTED MEMBER FUNCTIONS:
169  //
170 protected:
171 
172  returnValue setFullName( void );
173 
174 protected:
175 
177  std::string name;
178 
181 
183  std::string prefix;
184 
187 
189  std::string fullName;
190 
192  std::string description;
193 
194 
195 public:
196  static std::string fcnPrefix;
197 };
198 
200 
201 #endif // ACADO_TOOLKIT_EXPORT_DATA_INTERNAL_HPP
Internal class for the reference counting framework, see comments on the public class.
virtual bool isGiven() const =0
returnValue setDataStruct(ExportStruct _dataStruct)
std::string getFullName() const
Allows to pass back messages to the calling function.
std::string getTypeString(const std::string &_realString="real_t", const std::string &_intString="int") const
ExportDataInternal(const std::string &_name=std::string(), ExportType _type=REAL, ExportStruct _dataStruct=ACADO_LOCAL, const std::string &_prefix=std::string())
#define CLOSE_NAMESPACE_ACADO
virtual std::string getDoc() const
ExportStruct
virtual returnValue setDoc(const std::string &_doc)
returnValue setPrefix(const std::string &_prefix)
virtual ExportDataInternal * clone() const =0
Make a deep copy of the instance.
static std::string fcnPrefix
ExportType getType() const
ExportType
returnValue setName(const std::string &_name)
std::string getName() const
std::string getDataStructString() const
ExportStruct getDataStruct() const
#define BEGIN_NAMESPACE_ACADO
std::string getPrefix() const
returnValue setType(ExportType _type)
virtual returnValue exportDataDeclaration(std::ostream &stream, const std::string &_realString="real_t", const std::string &_intString="int", int _precision=16) const =0
returnValue setFullName(void)


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:33