2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2008-2010 - DIGITEO - Bruno JOFRET
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
19 #include "internal.hxx"
23 #include "core_math.h"
24 #include "dynlib_types.h"
32 class TYPES_IMPEXP GenericType : public InternalType
44 GenericType() : InternalType(), m_iRows(0), m_iCols(0), m_iSize(0), m_iDims(0) {}
46 bool hasAllIndexesOfRow(int _iRow, int* _piCoord, int _iCoordCount);
47 bool hasAllIndexesOfCol(int _iCol, int* _piCoord, int _iCoordCount);
50 virtual ~GenericType() {}
53 std::cout << "types::GenericType";
55 virtual bool isComplex()
59 virtual bool isScalar()
69 int getVarMaxDim(int _iCurrentDim, int _iMaxDim);
71 std::wstring DimToString();
78 /* FIXME : should be : virtual GenericType* get(int _iPos) = 0; */
79 virtual GenericType* getColumnValues(int _iPos) = 0;
81 bool isIdentity(void);
82 virtual bool isAssignable(void)
87 virtual RealType getType(void)
92 /* return type as string ( double, int, cell, list, ... )*/
93 virtual std::wstring getTypeStr()
95 return L"generictype";
97 /* return type as short string ( s, i, ce, l, ... )*/
98 virtual std::wstring getShortTypeStr()
103 virtual InternalType* clone(void)
108 virtual bool resize(int* _piDims, int _iDims)
112 virtual bool resize(int _iNewRows, int _iNewCols)
117 virtual bool reshape(int* _piDims, int _iDims)
121 virtual bool reshape(int _iNewRows, int _iNewCols)
128 static int get_max_size(int* _piDims, int _iDims)
136 for (int i = 0 ; i < _iDims ; i++)
143 #endif /* !__TYPES_HXX__ */