]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.22
authorfred <fred>
Thu, 9 Jan 1997 23:21:26 +0000 (23:21 +0000)
committerfred <fred>
Thu, 9 Jan 1997 23:21:26 +0000 (23:21 +0000)
Documentation/CodingStyle.pod
hdr/getcommand.hh
hdr/inputcommand.hh
src/inputcommand.cc

index a0ffcaf4ea3ca37d2ccbb70daa11cabf96df5c70..995188dec2fe1b6d4ebbb3275a14e1d75a52e78a 100644 (file)
@@ -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<type> is a Hungarian notation postfix
 
 =head2 COMMENTS
 
+The source is commented in the DOC++ style.  Check out doc++ at
+F<http://www.ZIB-Berlin.DE/VisPar/doc++/doc++.html>
+
        /// short description
        class Class {
                ///
index 79e6bd407a2b9f5c85fc0e02743a305ae15f6aaa..e2ce456cf79acec76d25fecd674b6309ca2f9e40 100644 (file)
@@ -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
index 639b6542e1e6582e127905f84f152fa0b8102d52..61f968ee53cbea66cc8f35781fffefab9749d2d0 100644 (file)
@@ -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<Scalar> args;
+    Array<Scalar> args;
     void print()const;
     Input_command();
 
     operator Command();
 };
-
-Input_command* get_meterchange_command( int,int);
-Input_command* get_key_interpret_command(svec<int >);
-Input_command* get_clef_interpret_command(String w);
+Input_command *get_meterchange_command( int,int);
+Input_command *get_key_interpret_command(Array<int >);
+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<int>);
-Input_command *get_bar_command( );
-
-svec<int> get_default_grouping(int count);
+Input_command *get_grouping_command(Array<int>);
+Input_command *get_bar_command(String);
+Input_command *get_newmeasure_command();
+Array<int> get_default_grouping(int count);
 #endif // INPUTCOMMAND_HH
 
index fda5ceefcf5b85d853e0b5393a737251c5c1463c..9cedc52c2ab5c42d5d235999f533d85bab375d1b 100644 (file)
@@ -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(svec<int>a ) 
+get_grouping_command(Array<int>a ) 
 {
     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(svec<int >a ) 
+get_key_interpret_command(Array<int >a ) 
 {
     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<args.sz(); i++)
+       for (int i = 0; i<args.size(); i++)
            mtor << "`"<<args[i] <<"',";
     }
     mtor << "}\n";
@@ -131,10 +130,19 @@ get_clef_interpret_command(String w)
     return c;
 }
 
-svec<int>
+Input_command*
+get_bar_command(String w)
+{
+    Input_command*c = new Input_command;
+    c->args.add("BAR");
+    c->args.add(w);
+    return c;
+}
+
+Array<int>
 get_default_grouping(int count)
 {
-    svec<int> s;
+    Array<int> s;
     if (!(count % 3 )) {
        for (int i=0; i < count/3; i++)
            s.add(3);