#define CONTEXT_HH
#include <map>
+using namespace std;
#include "moment.hh"
#include "lily-proto.hh"
+#include "virtual-methods.hh"
class Context
{
Context (Context const &src);
DECLARE_SMOBS (Context, dummy);
-
+ DECLARE_CLASSNAME(Context);
void terminate ();
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_;
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);
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);
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);
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 */