]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/context.hh
* input/regression/tie-dot.ly: new file.
[lilypond.git] / lily / include / context.hh
index de4f346fdc72a1d5df2d996323e9a1ab733e51b4..4766944b6af9ce9a73adfedcff45cf2b374c8a67 100644 (file)
 #define CONTEXT_HH
 
 #include <map>
+using namespace std;
 
 #include "moment.hh"
 #include "lily-proto.hh"
+#include "virtual-methods.hh"
 
 class Context
 {
@@ -20,7 +22,7 @@ class Context
   Context (Context const &src);
 
   DECLARE_SMOBS (Context, dummy);
-
+  DECLARE_CLASSNAME(Context);
   void terminate ();
 
 private:
@@ -28,8 +30,8 @@ private:
   int iterator_count_;
   bool init_;
 
-  std::map<String, int> grob_counts_;
-  std::map<String, int> context_counts_;
+  map<String, int> grob_counts_;
+  map<String, int> context_counts_;
 
 protected:
   Object_key const *key_;
@@ -40,14 +42,14 @@ protected:
   SCM context_list_;
   SCM accepts_list_;
   SCM aliases_;
-  SCM implementation_;
+  Translator_group *implementation_;
   String id_string_;
 
   friend class Context_def;
   void clear_key_disambiguations ();
 
 public:
-  Object_key const *get_key () const;
+  Object_key const *key () const { return key_; }
   Object_key const *get_grob_key (String);
   Object_key const *get_context_key (String, String);
 
@@ -56,16 +58,15 @@ public:
   SCM children_contexts () const { return context_list_; }
   SCM default_child_context_name () const;
 
-  Translator_group *implementation () const;
+  Translator_group *implementation () const { return implementation_; }
   Context *get_parent_context () const;
   Context (Object_key const *);
 
   /* properties:  */
-  void execute_pushpop_property (SCM prop, SCM sym, SCM val);
   SCM internal_get_property (SCM name_sym) const;
   SCM properties_as_alist () const;
   void internal_set_property (SCM var_sym, SCM value);
-  Context *where_defined (SCM name_sym) const;
+  Context *where_defined (SCM name_sym, SCM *value) const;
   void unset_property (SCM var_sym);
 
   Context *remove_context (Context *trans);
@@ -100,6 +101,8 @@ public:
 
 void apply_property_operations (Context *tg, SCM pre_init_ops);
 void execute_pushpop_property (Context *trg, SCM prop, SCM eltprop, SCM val);
+void execute_general_pushpop_property (Context *context,
+                                      SCM context_property, SCM grob_property_path, SCM val);
 SCM updated_grob_properties (Context *tg, SCM sym);
 Context *find_context_below (Context *where,
                             SCM type_sym, String id);
@@ -112,6 +115,7 @@ DECLARE_UNSMOB (Context, context);
 
 Moment measure_position (Context const *context);
 Rational measure_length (Context const *context);
+void set_context_property_on_children (Context *trans, SCM sym, SCM val);
 
 #endif /* CONTEXT_HH */