polserver/pol-core/bscript/berror.h
turleypol 1463b76c7c
Includes are now all relative to pol-core basefolder (#906)
* all except pol

* pol and includes under defines

* something weird has happened

* remove own folder from include searchpath

* fixed remaining, adapted include style for external headers

* missing include
2026-07-25 23:01:18 +02:00

60 lines
1.2 KiB
C++

/** @file
*
* @par History
*/
#ifndef BSCRIPT_BERROR_H
#define BSCRIPT_BERROR_H
#include <istream>
#include <string>
#include "clib/rawtypes.h"
#include "bscript/bstruct.h"
namespace Pol::Bscript
{
class ContIterator;
} // namespace Pol::Bscript
namespace Pol::Bscript
{
class BError final : public BStruct
{
public:
BError();
explicit BError( const char* errortext );
explicit BError( const std::string& errortext );
static BObjectImp* unpack( std::istream& is );
static unsigned int creations();
protected:
BError( const BError& i );
BError( std::istream& is, unsigned size );
BObjectImp* copy() const override;
BObjectRef OperSubscript( const BObject& obj ) override;
BObjectImp* array_assign( BObjectImp* idx, BObjectImp* target, bool copy ) override;
char packtype() const override;
const char* typetag() const override;
const char* typeOf() const override;
u8 typeOfInt() const override;
bool operator==( const BObjectImp& objimp ) const override;
bool operator<( const BObjectImp& objimp ) const override;
bool isTrue() const override;
ContIterator* createIterator( BObject* pIterVal ) override;
private:
static unsigned int creations_;
};
} // namespace Pol::Bscript
#endif