From: fred Date: Thu, 9 Jan 1997 23:21:26 +0000 (+0000) Subject: lilypond-0.0.22 X-Git-Tag: release/1.5.59~6421 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e523e714054aa02ff8a890c2eb48240e832c875e;p=lilypond.git lilypond-0.0.22 --- diff --git a/Documentation/CodingStyle.pod b/Documentation/CodingStyle.pod index a0ffcaf4ea..995188dec2 100644 --- a/Documentation/CodingStyle.pod +++ b/Documentation/CodingStyle.pod @@ -6,8 +6,6 @@ CodingStyle - standards while programming for LilyPond Please use these standards while doing programming for LilyPond - - Functions and methods do not return errorcodes, but use assert for checking status. @@ -33,16 +31,16 @@ in emacs: =head2 DATA MEMBERS - Class::member - -if the member's name resembles its type, then I use + Class::member() + Class::member_type_() - class Fubular { ..} - - Class::fubular_ +the C is a Hungarian notation postfix =head2 COMMENTS +The source is commented in the DOC++ style. Check out doc++ at +F + /// short description class Class { /// diff --git a/hdr/getcommand.hh b/hdr/getcommand.hh index 79e6bd407a..e2ce456cf7 100644 --- a/hdr/getcommand.hh +++ b/hdr/getcommand.hh @@ -10,7 +10,9 @@ Command* get_meter_command(int,int); +Command get_defaultbar_command(); +void split_bar_command(Command &pre_com, Command &no_break_com, Command &post_com,String s); #endif // GETCOMMAND_HH diff --git a/hdr/inputcommand.hh b/hdr/inputcommand.hh index 639b6542e1..61f968ee53 100644 --- a/hdr/inputcommand.hh +++ b/hdr/inputcommand.hh @@ -8,27 +8,26 @@ #define INPUTCOMMAND_HH #include "proto.hh" #include "scalar.hh" -#include "vray.hh" +#include "varray.hh" #include "moment.hh" struct Input_command { /// analogous to argv[] - svec args; + Array args; void print()const; Input_command(); operator Command(); }; - -Input_command* get_meterchange_command( int,int); -Input_command* get_key_interpret_command(svec); -Input_command* get_clef_interpret_command(String w); +Input_command *get_meterchange_command( int,int); +Input_command *get_key_interpret_command(Array); +Input_command *get_clef_interpret_command(String w); Input_command *get_reset_command(); Input_command *get_partial_command(Moment u); Input_command *get_skip_command(int,Moment); -Input_command *get_grouping_command(svec); -Input_command *get_bar_command( ); - -svec get_default_grouping(int count); +Input_command *get_grouping_command(Array); +Input_command *get_bar_command(String); +Input_command *get_newmeasure_command(); +Array get_default_grouping(int count); #endif // INPUTCOMMAND_HH diff --git a/src/inputcommand.cc b/src/inputcommand.cc index fda5ceefcf..9cedc52c2a 100644 --- a/src/inputcommand.cc +++ b/src/inputcommand.cc @@ -10,7 +10,7 @@ Input_command::Input_command() Input_command::operator Command() { Command c; - if (!args.sz()) + if (!args.size()) return c; c.code = INTERPRET; @@ -45,22 +45,22 @@ get_partial_command(Moment u) } Input_command* -get_grouping_command(sveca ) +get_grouping_command(Arraya ) { Input_command*c = new Input_command; c->args.add("GROUPING"); - for (int i=0; i < a.sz(); i ++) + for (int i=0; i < a.size(); i ++) c->args.add(a[i]); return c; } Input_command* -get_key_interpret_command(sveca ) +get_key_interpret_command(Arraya ) { Input_command*c = new Input_command; c->args.add("KEY"); - for (int i=0; i < a.sz(); i ++) { + for (int i=0; i < a.size(); i ++) { c->args.add(a[i]); } return c; @@ -87,12 +87,11 @@ get_meterchange_command(int n, int m) } Input_command * -get_bar_command() +get_newmeasure_command() { Input_command*c = new Input_command; - c->args.add( "BAR"); - c->args.add( "|"); + c->args.add( "NEWMEASURE"); return c; } @@ -114,9 +113,9 @@ void Input_command::print()const { mtor << "{ "; - if (args.sz()) { + if (args.size()) { mtor<< " args: "; - for (int i = 0; i +Input_command* +get_bar_command(String w) +{ + Input_command*c = new Input_command; + c->args.add("BAR"); + c->args.add(w); + return c; +} + +Array get_default_grouping(int count) { - svec s; + Array s; if (!(count % 3 )) { for (int i=0; i < count/3; i++) s.add(3);