export_argument_internal.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_INTERNAL_HPP
00035 #define ACADO_TOOLKIT_EXPORT_ARGUMENT_INTERNAL_HPP
00036 
00037 #include <acado/utils/acado_utils.hpp>
00038 #include <acado/matrix_vector/matrix_vector.hpp>
00039 #include <acado/code_generation/export_data_internal.hpp>
00040 #include <acado/code_generation/export_index.hpp>
00041 
00042 
00043 BEGIN_NAMESPACE_ACADO
00044 
00045 
00046 class ExportArithmeticStatement;
00047 class ExportIndex;
00048 
00049 
00063 class ExportArgumentInternal : public ExportDataInternal
00064 {
00065     //
00066     // PUBLIC MEMBER FUNCTIONS:
00067     //
00068     public:
00069 
00072         ExportArgumentInternal( );
00073 
00086                 ExportArgumentInternal( const std::string& _name,
00087                                                                 const DMatrixPtr& _data,
00088                                                                 ExportType _type,
00089                                                                 ExportStruct _dataStruct,
00090                                                                 bool _callByValue,
00091                                                                 const ExportIndex& _addressIdx,
00092                                                                 const std::string& _prefix
00093                                                                 );
00094 
00096                 virtual ~ExportArgumentInternal( );
00097 
00098                 virtual ExportArgumentInternal* clone() const;
00099 
00101                 virtual void deepCopyMembers(   std::map<CasADi::SharedObjectNode*, CasADi::SharedObject>& already_copied
00102                                                                                 );
00103 
00111                 ExportArgument getAddress(      const ExportIndex& rowIdx,
00112                                                                         const ExportIndex& colIdx = emptyConstExportIndex
00113                                                                         ) const;
00114 
00122                 const std::string getAddressString(     bool withDataStruct = true
00123                                                                                         ) const;
00124 
00125 
00130                 virtual uint getNumRows( ) const;
00131 
00136                 virtual uint getNumCols( ) const;
00137 
00142                 virtual uint getDim( ) const;
00143 
00144 
00150                 virtual bool isGiven( ) const;
00151 
00157                 bool isCalledByValue( ) const;
00158 
00163                 returnValue callByValue( );
00164 
00175                 virtual returnValue exportDataDeclaration(      std::ostream& stream,
00176                                                                                                         const std::string& _realString = "real_t",
00177                                                                                                         const std::string& _intString = "int",
00178                                                                                                         int _precision = 16
00179                                                                                                         ) const;
00180 
00181 
00182         //
00183         // PROTECTED MEMBER FUNCTIONS:
00184         //
00185         protected:
00186 
00191                 virtual uint getColDim( ) const;
00192 
00200                 virtual ExportIndex     getTotalIdx(    const ExportIndex& rowIdx,
00201                                                                                         const ExportIndex& colIdx
00202                                                                                         ) const;
00203 
00204 
00205         protected:
00206 
00207                 DMatrixPtr data;                                                                
00209                 ExportIndex addressIdx;                                         
00211                 bool callItByValue;                                     
00212 };
00213 
00214 
00215 CLOSE_NAMESPACE_ACADO
00216 
00217 
00218 #endif  // ACADO_TOOLKIT_EXPORT_ARGUMENT_INTERNAL_HPP
00219 
00220 // end of file.


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