/* * TinyBlocks - tb_integer_block.h * TinyBlocks_IntegerBlock: bloco primitivo que contém um inteiro de 64 bits. * * IntegerBlocks são literais: têm 0 inputs e 1 output (TB_VALUE_INTEGER). */ #ifndef TINYBLOCKS_INTEGER_BLOCK_H #define TINYBLOCKS_INTEGER_BLOCK_H #include "tb_block.h" struct TinyBlocks_IntegerBlock { TinyBlocks_Block base; /* DEVE ser o primeiro campo */ int64_t value; }; /* -- Ciclo de vida --- */ TB_API TinyBlocks_IntegerBlock* tb_integer_block_create (TinyBlocks* rt, int64_t value); TB_API void tb_integer_block_destroy(TinyBlocks_IntegerBlock* ib, TinyBlocks* rt); /* -- Acesso ao valor --- */ TB_API int64_t tb_integer_block_get(const TinyBlocks_IntegerBlock* ib); TB_API void tb_integer_block_set(TinyBlocks_IntegerBlock* ib, int64_t value); #endif /* TINYBLOCKS_INTEGER_BLOCK_H */