export_argument.hpp
Go to the documentation of this file.
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 
00026 
00027 
00034 #ifndef ACADO_TOOLKIT_EXPORT_ARGUMENT_HPP
00035 #define ACADO_TOOLKIT_EXPORT_ARGUMENT_HPP
00036 
00037 #include <acado/utils/acado_utils.hpp>
00038 #include <acado/matrix_vector/matrix_vector.hpp>
00039 #include <acado/code_generation/export_data.hpp>
00040 #include <acado/code_generation/export_index.hpp>
00041 
00042 BEGIN_NAMESPACE_ACADO
00043 
00044 
00045 class ExportArgumentInternal;
00046 
00047 
00061 class ExportArgument : public ExportData
00062 {
00063     //
00064     // PUBLIC MEMBER FUNCTIONS:
00065     //
00066     public:
00067 
00070         ExportArgument( );
00071 
00084                 ExportArgument( const std::string& _name,
00085                                                 uint _nRows = 1,
00086                                                 uint _nCols = 1,
00087                                                 ExportType _type = REAL,
00088                                                 ExportStruct _dataStruct = ACADO_LOCAL,
00089                                                 bool _callByValue = false,
00090                                                 const ExportIndex& _addressIdx = emptyConstExportIndex,
00091                                                 const std::string& _prefix = std::string()
00092                                                 );
00093 
00106                 ExportArgument( const std::string& _name,
00107                                                 const DMatrixPtr& _data,
00108                                                 ExportType _type = REAL,
00109                                                 ExportStruct _dataStruct = ACADO_LOCAL,
00110                                                 bool _callByValue = false,
00111                                                 const ExportIndex& _addressIdx = emptyConstExportIndex,
00112                                                 const std::string& _prefix = std::string()
00113                                                 );
00114 
00115                 ExportArgument( const DMatrix& _data
00116                                                 );
00117 
00118                 ExportArgumentInternal* operator->();
00119 
00120                 const ExportArgumentInternal* operator->() const;
00121 
00129                 ExportArgument getAddress(      const ExportIndex& _rowIdx,
00130                                                                         const ExportIndex& _colIdx = emptyConstExportIndex
00131                                                                         ) const;
00132 
00140                 const std::string getAddressString(     bool withDataStruct = true
00141                                                                                         ) const;
00142 
00143 
00148                 virtual uint getNumRows( ) const;
00149 
00154                 virtual uint getNumCols( ) const;
00155 
00160                 virtual uint getDim( ) const;
00161 
00162 
00168                 virtual bool isGiven( ) const;
00169 
00175                 bool isCalledByValue( ) const;
00176 
00181                 returnValue callByValue( );
00182 
00183 
00184 
00195                 virtual returnValue exportDataDeclaration(      std::ostream& stream,
00196                                                                                                         const std::string& _realString = "real_t",
00197                                                                                                         const std::string& _intString = "int",
00198                                                                                                         int _precision = 16
00199                                                                                                         ) const;
00200 };
00201 
00202 
00203 static const ExportArgument emptyConstExportArgument;
00204 
00205 
00206 CLOSE_NAMESPACE_ACADO
00207 
00208 
00209 #endif  // ACADO_TOOLKIT_EXPORT_ARGUMENT_HPP
00210 
00211 // end of file.


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:37:01