/vqdr/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/vqdr/trunk

« back to all changes in this revision

Viewing changes to src/libvqdr/context.vala

  • Committer: Gustav Hartvigsson
  • Date: 2022-06-01 12:44:04 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20220601124404-mpv4761nr16f0duq
run_gdb.sh +x

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
using Gee;
2
 
using VQDR.Common;
 
2
using Utils;
3
3
 
4
4
namespace VQDR.Expression {
5
5
  
11
11
    construct {
12
12
      changed = false;
13
13
      values = new Gee.TreeMap<string, Variable?>
14
 
                              (Common.Utils.str_cmp, null);
 
14
                              (Utils.str_cmp, null);
15
15
    }
16
16
    
17
17
    public Context () {
18
18
    }
19
19
    
20
20
    public void set_value (string name, 
21
 
                           int min_val,
22
 
                           int max_val,
23
 
                           int current_val) {
 
21
                           int32 min_val,
 
22
                           int32 max_val,
 
23
                           int32 current_val) {
24
24
      set_variable (name, Variable (min_val, max_val, current_val));
25
25
    }
26
26
    
48
48
       }
49
49
    }
50
50
    
51
 
    public int get_value (string name) throws ArgError {
 
51
    public FastNumber get_value (string name) throws ArgError {
52
52
      throw_name (name);
53
53
      return values.@get (name.down ()).current_val;
54
54
    }
55
55
    
56
 
    public int get_min_value (string name) throws ArgError {
 
56
    public FastNumber get_min_value (string name) throws ArgError {
57
57
      throw_name (name);
58
58
      return values.@get (name.down ()).min_val;
59
59
    }
60
60
    
61
 
    public int get_max_value (string name) throws ArgError {
 
61
    public FastNumber get_max_value (string name) throws ArgError {
62
62
      throw_name (name);
63
63
      return values.@get (name.down ()).max_val;
64
64
    }
65
65
 
66
 
    public int get_current_value (string name) throws ArgError {
 
66
    public FastNumber get_current_value (string name) throws ArgError {
67
67
      throw_name (name);
68
68
      return values.@get (name.down ()).current_val;
69
69
    }