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 // This code is separated in bool.hxx
17 // but will be inlined in arrayof.hxx
19 // If you need additionnal headers, please add it in arrayof.hxx
21 //#ifndef __ARRAYOF_HXX__
22 // #error This file must only be include by arrayof.hxx
28 #include "arrayof.hxx"
32 class EXTERN_AST Bool : public ArrayOf<int>
47 Bool(int _iRows, int _iCols);
48 Bool(int _iDims, const int* _piDims);
49 Bool(int _iRows, int _iCols, int **_piData);
55 /*zero or one set filler*/
67 bool operator==(const InternalType& it);
68 bool operator!=(const InternalType& it);
70 /* return type as string ( double, int, cell, list, ... )*/
71 virtual std::wstring getTypeStr() const
75 /* return type as short string ( s, i, ce, l, ... )*/
76 virtual std::wstring getShortTypeStr() const
81 virtual bool transpose(InternalType *& out);
83 virtual bool isNativeType() override
88 virtual void fillDefaultValues() override
91 memset(m_pRealData, 0x00, sizeof(int) * size);
95 inline ScilabType getType(void)
99 inline ScilabId getId(void)
101 return isScalar() ? IdScalarBool : IdBool;
104 virtual ast::Exp* getExp(const Location& loc);
107 virtual bool subMatrixToString(std::wostringstream& ostr, int* _piDims, int _iDims) override;
109 virtual int getNullValue();
110 virtual Bool* createEmpty(int _iDims, int* _piDims, bool _bComplex = false);
111 virtual int copyValue(int _iData);
112 virtual void deleteAll();
113 virtual void deleteImg();
114 virtual int* allocData(int _iSize);
120 template class types::ArrayOf<int>;//Bool
122 #endif /* !__BOOL_HXX__ */