/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: 2024-12-21 22:39:17 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20241221223917-jbt2ylyz9nxjss49
various changes
[utils/utils.vala]
* Removed uneeded int32_abs function

[utils/stack]
* more informative error when trying to pop an empty stack.

[utils/random.vala]
* added c_names to functions (probobly not needed).

[utils/pair.vala]
* Made compact
* made FreeFunc delegates unowned to fix error
* added constructor Pair.with_free_func ().

[utils/named_vector.vala]
* made class compact.

[utils/meson.build]
* Reordered files in list
* added logger.vala.

[utils/logger.vala]
* Added fast and easy logger class.

[utils/fast_number.vala]
* added a bunch of cname CCode attributes.

[general]
* Spelling in comments and functions.

[meson.build]
* Made dependancies easier to read
* added vala posix dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
using Utils;
3
3
 
4
4
namespace VQDR.Expression {
5
 
  
 
5
  /**
 
6
   * This is just a glorified key-value store. It is only used to provide
 
7
   * a mapping between variable-names and a Variable instance.
 
8
   */
6
9
  public class Context : GLib.Object{
7
10
    private bool changed;
8
11
    private Gee.TreeMap<string, Variable?> values;
25
28
    }
26
29
    
27
30
    public Variable get_variable (string name) throws ArgError {
28
 
    throw_name (name);
29
 
    return values.@get (name.down ());
 
31
      throw_name (name);
 
32
      return values.@get (name.down ());
30
33
    }
31
 
    
 
34
 
32
35
    public void set_variable (string name, Variable? variable) {
33
36
      string new_name = name.down ();
34
37