source: to-imperative/trunk/runtime/rf_integer.hh @ 988

Last change on this file since 988 was 988, checked in by pooh, 18 years ago
  • Started long integer arithmetic implementation.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 886 bytes
Line 
1#ifndef __rf_integer_hh__
2#define __rf_integer_hh__
3
4#include "rf_types.hh"
5#include "rf_expr.hh"
6#include "rf_term.hh"
7#include "pxx_chunk_allocator.hh"
8#include <gmp.h>
9
10namespace rftype
11{
12
13using namespace rfrt;
14
15class Integer :
16  public Term
17{
18
19private:
20
21  static pxx::ChunkAllocator<mpz_t> mpz_allocator ;
22
23public:
24
25  inline Integer (intptr_t _n) ;
26  inline Integer (pxx::WString& _str) ;
27  inline ~Integer () ;
28
29  static Expr create_expr (intptr_t _n) ;
30  static Expr create_expr (pxx::WString& _str);
31
32  inline size_t get_char_len () const ;
33
34  static void ctor (Integer* _to, Integer const* _from) ;
35  static int compare (Integer const* _shint1, Integer const* _shint2) ;
36  static uint32_t hash (Integer const* _shint) ;
37  static pxx::WString to_string (Integer const* _shint) ;
38  static short_type_funcs_t funcs ;
39  static TypeRegister reg ;
40
41};
42
43}
44
45#endif // __rf_integer_hh__
Note: See TracBrowser for help on using the repository browser.