2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2008-2008 - DIGITEO - Antoine ELIAS
5 * Copyright (C) 2012 - 2016 - Scilab Enterprises
7 * This file is hereby licensed under the terms of the GNU GPL v2.0,
8 * pursuant to article 5.3.4 of the CeCILL v.2.1.
9 * This file was originally licensed under the terms of the CeCILL v2.1,
10 * and continues to be available under such terms.
11 * For more information, see the COPYING file which you should have received
12 * along with this program.
16 #ifndef __GRAPHICHANDLE_HXX__
17 #define __GRAPHICHANDLE_HXX__
19 #include "arrayof.hxx"
24 class EXTERN_AST GraphicHandle : public ArrayOf<long long>
27 GraphicHandle(long long _handle);
28 GraphicHandle(int _iRows, int _iCols);
29 GraphicHandle(int _iDims, const int* _piDims);
31 virtual ~GraphicHandle();
33 GraphicHandle* clone();
47 bool operator==(const InternalType& it);
48 bool operator!=(const InternalType& it);
50 /* return type as string ( double, int, cell, list, ... )*/
51 virtual std::wstring getTypeStr() const
55 /* return type as short string ( s, i, ce, l, ... )*/
56 virtual std::wstring getShortTypeStr() const
71 virtual bool neg(InternalType *& /*out*/)
76 virtual bool transpose(InternalType *& out);
78 virtual bool isFieldExtractionOverloadable() const
83 virtual bool invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_list & out, const ast::Exp & e) override ;
85 bool getMemory(long long* _piSize, long long* _piSizePlusType);
88 inline ScilabType getType(void)
92 inline ScilabId getId(void)
94 return isScalar() ? IdScalarHandle : IdHandle;
98 virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override;
100 virtual long long getNullValue();
101 virtual GraphicHandle* createEmpty(int _iDims, int* _piDims, bool _bComplex = false);
102 virtual long long copyValue(long long _handle);
103 virtual void deleteAll();
104 virtual void deleteImg();
105 virtual long long* allocData(int _iSize);
110 template class types::ArrayOf<long long>; //GraphicHandle
112 #endif /* !__GRAPHICHANDLE_HXX__ */