Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
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     
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         
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