00001 /* 00002 * This file is part of ACADO Toolkit. 00003 * 00004 * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization. 00005 * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau, 00006 * Milan Vukov, Rien Quirynen, KU Leuven. 00007 * Developed within the Optimization in Engineering Center (OPTEC) 00008 * under supervision of Moritz Diehl. All rights reserved. 00009 * 00010 * ACADO Toolkit is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 3 of the License, or (at your option) any later version. 00014 * 00015 * ACADO Toolkit is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with ACADO Toolkit; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00023 * 00024 */ 00025 #ifndef ACADO_TOOLKIT_EXPORT_DATA_INTERNAL_HPP 00026 #define ACADO_TOOLKIT_EXPORT_DATA_INTERNAL_HPP 00027 00028 #include <casadi/symbolic/shared_object.hpp> 00029 #include <acado/utils/acado_utils.hpp> 00030 00031 BEGIN_NAMESPACE_ACADO 00032 00033 class ExportDataInternal : public CasADi::SharedObjectNode 00034 { 00035 public: 00036 00045 explicit ExportDataInternal( const std::string& _name = std::string(), 00046 ExportType _type = REAL, 00047 ExportStruct _dataStruct = ACADO_LOCAL, 00048 const std::string& _prefix = std::string() 00049 ); 00050 00053 virtual ~ExportDataInternal( ); 00054 00055 virtual ExportDataInternal* clone() const = 0; 00056 00063 returnValue setName( const std::string& _name 00064 ); 00065 00072 returnValue setType( ExportType _type 00073 ); 00074 00081 returnValue setDataStruct( ExportStruct _dataStruct 00082 ); 00083 00090 returnValue setPrefix( const std::string& _prefix 00091 ); 00096 std::string getName( ) const; 00097 00102 ExportType getType( ) const; 00103 00111 std::string getTypeString( const std::string& _realString = "real_t", 00112 const std::string& _intString = "int" 00113 ) const; 00114 00119 ExportStruct getDataStruct( ) const; 00120 00125 std::string getDataStructString( ) const; 00126 00131 std::string getPrefix( ) const; 00132 00138 std::string getFullName( ) const; 00139 00140 00151 virtual returnValue exportDataDeclaration( std::ostream& stream, 00152 const std::string& _realString = "real_t", 00153 const std::string& _intString = "int", 00154 int _precision = 16 00155 ) const = 0; 00156 00162 virtual bool isGiven( ) const = 0; 00163 00164 virtual returnValue setDoc( const std::string& _doc ); 00165 virtual std::string getDoc( ) const; 00166 00167 // 00168 // PROTECTED MEMBER FUNCTIONS: 00169 // 00170 protected: 00171 00172 returnValue setFullName( void ); 00173 00174 protected: 00175 00177 std::string name; 00178 00180 ExportType type; 00181 00183 std::string prefix; 00184 00186 ExportStruct dataStruct; 00187 00189 std::string fullName; 00190 00192 std::string description; 00193 }; 00194 00195 CLOSE_NAMESPACE_ACADO 00196 00197 #endif // ACADO_TOOLKIT_EXPORT_DATA_INTERNAL_HPP