13 Star 69 Fork 22

johnsonyl/cpps

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cpps_uint256.h 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
#pragma once
#include <cpps/cpps.h>
#include "BigInt.h"
using uint256_t = BigInt;
class cpps_uint256
{
public:
cpps_uint256() {
}
// +
cpps_uint256 * _add(cpps::C* c, cpps::object _right);
//_constructor
void _constructor(cpps::C* c, cpps::object _right);
// -
cpps_uint256 * _sub(cpps::C* c, cpps::object _right);
// *
cpps_uint256 * _mul(cpps::C* c, cpps::object _right);
// /
cpps_uint256 * _div(cpps::C* c, cpps::object _right);
// %
cpps_uint256 * _quyu(cpps::C* c, cpps::object _right);
// =
cpps_uint256 * _assignment(cpps::C* c, cpps::object _right);
// <
bool _less(cpps::C* c, cpps::object _right);
// >
bool _bigger(cpps::C* c, cpps::object _right);
// >=
bool _biggerorequel(cpps::C* c, cpps::object _right);
// ==
bool _equel(cpps::C* c, cpps::object _right);
// <=
bool _lessandequel(cpps::C* c, cpps::object _right);
// ++
cpps_uint256 * _rightautoincrease(cpps::C* c);
// --
cpps_uint256 * _rightautodecrease(cpps::C* c);
// ++left
cpps_uint256 * _leftautoincrease(cpps::C* c);
// --left
cpps_uint256 * _leftautodecrease(cpps::C* c);
// !=
bool _notequel(cpps::C* c, cpps::object _right);
// *=
cpps_uint256 * _mulandassignment(cpps::C* c, cpps::object _right);
// /=
cpps_uint256 * _divandassignment(cpps::C* c, cpps::object _right);
// +=
cpps_uint256 * _addandassignment(cpps::C* c, cpps::object _right);
// -=
cpps_uint256 * _subandassignment(cpps::C* c, cpps::object _right);
// -left
cpps_uint256 * _minus(cpps::C* c);
// +left
cpps_uint256 * _plus(cpps::C* c);
// !left
bool _not(cpps::C* c);
// ~left
cpps_uint256 * _not2(cpps::C* c);
//tostring
std::string _tostring();
//tostring
std::string _tohex();
//tostring
std::string _todec();
//toint
cpps_integer _toint();
//hash_value
cpps_integer _hash_value();
uint256_t _value;
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/cppscript/cpps.git
git@gitee.com:cppscript/cpps.git
cppscript
cpps
cpps
master

搜索帮助