jdkmidi class library documentation

Copyright © 2004 J.D. Koftinoff Software, Ltd.

Released under the GNU General Public License (GPL)




Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

include/jdkmidi/showcontrol.h

Go to the documentation of this file.
00001 /*
00002  *  libjdkmidi-2004 C++ Class Library for MIDI
00003  *
00004  *  Copyright (C) 2004  J.D. Koftinoff Software, Ltd.
00005  *  www.jdkoftinoff.com
00006  *  jeffk@jdkoftinoff.com
00007  *
00008  *  *** RELEASED UNDER THE GNU GENERAL PUBLIC LICENSE (GPL) April 27, 2004 ***
00009  *
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 */
00024 #ifndef _JDKMIDI_SHOWCONTROL_H
00025 #define _JDKMIDI_SHOWCONTROL_H
00026 
00027 
00028 
00029 #include "jdkmidi/sysex.h"
00030 
00031 namespace jdkmidi
00032 {
00033 //
00034 // Hacked defines that really should just go away:
00035 //
00036   
00037 // Simple macros to make Setter and Getter methods easier
00038 // in an object.
00039 //
00040 // examples:
00041 //
00042 //  _ATTRIBUTE(long,Position)
00043 //  
00044 //  would generate a private 'long Position;'
00045 //  a 'const long GetPosition() const;' method
00046 //  and a 'void SetPosition( long a );' method
00047 //
00048 //  
00049 //
00050 //  _ATTRIBUTE_REF( long, Position )
00051 //
00052 //  would generate a private 'long Position;'
00053 //  a 'const long &GetPosition() const;' method
00054 //  and a 'void SetPosition( const long &a );' method
00055 //
00056 //
00057 //
00058 //  _ACCESS( double, DPosition, Position )
00059 //
00060 //  Is used to access an attribute with a different type.
00061 //  It would generate just the methods:
00062 //  'double GetDPosition() const { return Position; }
00063 //  'void SetDPosition( double a ) { Position=a; }
00064 //
00065 //
00066 //  _ACCESS_REF( double, DPosition, Position )
00067 //
00068 //  Is used to access an attribute with a different type.
00069 //  It would generate just the methods:
00070 //  'const double &GetDPosition() const { return Position; }
00071 //  'void SetDPosition( const double &a ) { Position=a; }
00072 //
00073   
00074 #define _ATTRIBUTE( TYPE, NAME )  \
00075 public:         \
00076   const TYPE Get##NAME() const  \
00077     { return NAME;  } \
00078   void Set##NAME( TYPE a )  \
00079     { NAME=a; } \
00080 private:        \
00081   TYPE NAME
00082   
00083   
00084   
00085 #define _ATTRIBUTE_REF( TYPE, NAME )  \
00086 public:         \
00087   const TYPE &Get##NAME() const \
00088     { return NAME;  } \
00089   void Set##NAME( const TYPE & a )\
00090     { NAME=a; } \
00091 private:        \
00092   TYPE NAME
00093   
00094   
00095 #define _ACCESS( TYPE, NAME1, NAME2 ) \
00096 public:         \
00097   const TYPE Get##NAME1() const \
00098     { return NAME2; } \
00099   void Set##NAME1( TYPE a ) \
00100     { NAME2=a; }  
00101   
00102   
00103 #define _ACCESS_REF( TYPE, NAME1, NAME2 )\
00104 public:         \
00105   const TYPE &Get##NAME1() const  \
00106     { return NAME2; } \
00107   void Set##NAME1( const TYPE &a )\
00108     { NAME2=a;  } 
00109   
00110   
00111   
00112 #define _PATTRIBUTE( TYPE, NAME ) \
00113 protected:        \
00114   const TYPE *Get##NAME() const \
00115     { return NAME;  } \
00116   void Set##NAME( TYPE *a ) \
00117     { NAME=a; } \
00118 private:        \
00119   TYPE NAME
00120   
00121   
00122 #define _PATTRIBUTE_REF( TYPE, NAME ) \
00123 protected:        \
00124   const TYPE &Get##NAME() const \
00125     { return NAME;  } \
00126   void Set##NAME( const TYPE & a )\
00127     { NAME=a; } \
00128 private:        \
00129   TYPE NAME
00130   
00131   
00132 #define _PACCESS( TYPE, NAME1, NAME2 )  \
00133 protected:        \
00134   const TYPE Get##NAME1() const \
00135     { return NAME2; } \
00136   void Set##NAME1( const TYPE a ) \
00137     { NAME2=a;    } 
00138   
00139   
00140 #define _PACCESS_REF( TYPE, NAME1, NAME2 )\
00141 protected:        \
00142   const TYPE &Get##NAME1() const  \
00143     { return NAME2; } \
00144   void Set##NAME1( const TYPE &a )\
00145     { NAME2=a;  } 
00146   
00147   
00148   
00149   class MIDICue
00150     {
00151     public:
00152       MIDICue( const MIDICue &c )     : v1( c.v1 ), v2( c.v2), v3( c.v3 ), num_values( c.num_values )   {}
00153       MIDICue()         : v1( 0 ), num_values(1)      {}
00154       MIDICue( ulong v1_ )        : v1( v1_ ),num_values(1)     {}
00155       MIDICue( ulong v1_,ulong v2_ )      : v1( v1_ ),v2( v2_ ),num_values(2)   {}
00156       MIDICue( ulong v1_,ulong v2_, ulong v3_ ) : v1( v1_ ),v2( v2_ ),v3( v3_ ),num_values(3) {}
00157       
00158       void  Clear()     { v1=0; num_values=1; }
00159       operator ulong () const   { return v1;  }
00160       
00161       const MIDICue &operator = ( const MIDICue &c )
00162         { v1=c.v1; v2=c.v2; v3=c.v3; num_values = c.num_values; return *this; }
00163       
00164       const MIDICue &operator = ( ulong v )
00165         { v1=v; num_values=1; return *this; }
00166       
00167       const bool    operator == ( ulong v )
00168         { return v1==v; }
00169       
00170       const MIDICue &operator == ( const MIDICue &c );
00171       const bool    operator != ( ulong v )
00172         { return v1!=v; }
00173       const MIDICue &operator != ( const MIDICue &c );
00174       
00175       
00176       bool operator <= ( ulong v )
00177         { return v1<=v; }
00178       
00179       bool operator >= ( ulong v )
00180         { return v1>=v; }
00181       
00182       bool operator < ( ulong v )
00183         { return v1<v; }
00184       
00185       bool operator > ( ulong v )
00186         { return v1>v; }
00187       
00188       friend MIDICue operator - ( const MIDICue &c, const MIDICue &d );
00189       friend MIDICue operator - ( const MIDICue &c, ulong v );
00190       friend MIDICue operator - ( ulong v, const MIDICue &c );
00191       
00192       friend MIDICue operator + ( const MIDICue &c, const MIDICue &d );
00193       friend MIDICue operator + ( const MIDICue &c, ulong v );
00194       friend MIDICue operator + ( ulong v, const MIDICue &c );
00195       
00196       
00197       ulong GetNumValues() const  { return num_values;   }
00198       ulong GetV1() const   { return v1;  }
00199       ulong GetV2() const   { return v2;  }
00200       ulong GetV3() const   { return v3;  }
00201       
00202       void  SetNumValues( int a ) { num_values=a; }
00203       void  SetV1( ulong a )  { v1=a;   }
00204       void  SetV2( ulong a )  { v2=a;   }
00205       void  SetV3( ulong a )  { v3=a;   }
00206     protected:
00207       ulong v1,v2,v3;
00208       int num_values;
00209     };
00210   
00211   inline MIDICue operator - ( const MIDICue &c, const MIDICue &d )
00212     {
00213       MIDICue result=c;
00214       
00215       result.v1 -= d.v1;
00216       result.v2 -= d.v2;
00217       result.v3 -= d.v3;
00218       
00219       return result;
00220     }
00221   
00222   inline MIDICue operator - ( const MIDICue &c, ulong v )
00223     {
00224       MIDICue result(c);
00225       
00226       result.v1 -= v;
00227       return result;
00228     }
00229   
00230   inline  MIDICue operator - ( ulong v, const MIDICue &c )
00231     {
00232       MIDICue result(v - c.v1 );
00233       
00234       return result;
00235     }
00236   
00237   inline  MIDICue operator + ( const MIDICue &c, const MIDICue &d )
00238     {
00239       MIDICue result=c;
00240       
00241       result.v1 += d.v1;
00242       result.v2 += d.v2;
00243       result.v3 += d.v3;
00244       
00245       return result;
00246       
00247     }
00248   
00249   inline  MIDICue operator + ( const MIDICue &c, ulong v )
00250     {
00251       MIDICue result(c);
00252       
00253       result.v1 += v;
00254       return result;
00255       
00256     }
00257   
00258   inline  MIDICue operator + ( ulong v, const MIDICue &c )
00259     {
00260       MIDICue result(v + c.v1 );
00261       
00262       return result;
00263     }
00264   
00265   
00266   
00267   
00268   enum MIDIShowCommand
00269     {
00270       MIDI_SC_GO    = 0x01,
00271       MIDI_SC_STOP    = 0x02,
00272       MIDI_SC_RESUME    = 0x03,
00273       MIDI_SC_TIMED_GO  = 0x04,
00274       MIDI_SC_LOAD    = 0x05,
00275       MIDI_SC_SET   = 0x06,
00276       MIDI_SC_FIRE    = 0x07,
00277       MIDI_SC_ALL_OFF   = 0x08,
00278       MIDI_SC_RESTORE   = 0x09,
00279       MIDI_SC_RESET   = 0x0a,
00280       MIDI_SC_GO_OFF    = 0x0b,
00281       MIDI_SC_GO_JAM    = 0x10,
00282       MIDI_SC_STANDBY_PLUS  = 0x11,
00283       MIDI_SC_STANDBY_MINUS = 0x12,
00284       MIDI_SC_SEQUENCE_PLUS = 0x13,
00285       MIDI_SC_SEQUENCE_MINUS  = 0x14,
00286       MIDI_SC_START_CLOCK = 0x15,
00287       MIDI_SC_STOP_CLOCK  = 0x16,
00288       MIDI_SC_ZERO_CLOCK  = 0x17,
00289       MIDI_SC_SET_CLOCK = 0x18,
00290       MIDI_SC_MTC_CHASE_ON  = 0x19,
00291       MIDI_SC_MTC_CHASE_OFF = 0x1a,
00292       MIDI_SC_OPEN_Q_LIST = 0x1b,
00293       MIDI_SC_CLOSE_Q_LIST  = 0x1c,
00294       MIDI_SC_OPEN_Q_PATH = 0x1d,
00295       MIDI_SC_CLOSE_Q_PATH  = 0x1e
00296     };
00297   
00298   
00299   class MIDIShowControlPacket
00300     {
00301     public:
00302       MIDIShowControlPacket();
00303       
00304       void Put_Go()
00305         { Put_Simple0( MIDI_SC_GO );    }
00306       
00307       void Put_Go( const MIDICue & q_number )
00308         { Put_Simple1( MIDI_SC_GO, q_number );  }
00309       
00310       void Put_Go( const MIDICue & q_number, const MIDICue & q_list )
00311         { Put_Simple2( MIDI_SC_GO, q_number, q_list );  }
00312       
00313       void Put_Go( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00314         { Put_Simple3( MIDI_SC_GO, q_number, q_list, q_path );  }
00315       
00316       void Put_Stop()
00317         { Put_Simple0( MIDI_SC_STOP );  }       
00318       
00319       void Put_Stop( const MIDICue & q_number )
00320         { Put_Simple1( MIDI_SC_STOP, q_number );  }       
00321       
00322       void Put_Stop( const MIDICue & q_number, const MIDICue & q_list )
00323         { Put_Simple2( MIDI_SC_STOP, q_number, q_list );  }               
00324       
00325       void Put_Stop( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00326         { Put_Simple3( MIDI_SC_STOP, q_number, q_list, q_path );  } 
00327       
00328       
00329       void Put_Resume()
00330         { Put_Simple0( MIDI_SC_RESUME );  }   
00331       
00332       void Put_Resume( const MIDICue & q_number )
00333         { Put_Simple1( MIDI_SC_RESUME, q_number );  }           
00334       
00335       void Put_Resume( const MIDICue & q_number, const MIDICue & q_list )
00336         { Put_Simple2( MIDI_SC_RESUME, q_number, q_list );  }   
00337       
00338       void Put_Resume( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00339         { Put_Simple3( MIDI_SC_RESUME, q_number, q_list, q_path );  }   
00340       
00341       
00342       void Put_TimedGo( 
00343         uchar hr, uchar mn, uchar sc, uchar fr, uchar ff
00344         )
00345         {
00346           Put_Simple0(  MIDI_SC_TIMED_GO );
00347           SetHours( hr );
00348           SetMinutes( mn );
00349           SetSeconds( sc );
00350           SetFrames( fr );
00351           SetFractFrames( ff );
00352           SetHasTime( true );
00353         }
00354       
00355       void Put_TimedGo( 
00356         uchar hr, uchar mn, uchar sc, uchar fr, uchar ff,
00357         const MIDICue & q_number
00358         )
00359         {
00360           Put_Simple1(  MIDI_SC_TIMED_GO, q_number );
00361           SetHours( hr );
00362           SetMinutes( mn );
00363           SetSeconds( sc );
00364           SetFrames( fr );
00365           SetFractFrames( ff );
00366           SetHasTime( true );
00367         }
00368       
00369       void Put_TimedGo( 
00370         uchar hr, uchar mn, uchar sc, uchar fr, uchar ff,
00371         const MIDICue & q_number, const MIDICue & q_list
00372         )
00373         {
00374           Put_Simple2(  MIDI_SC_TIMED_GO, q_number, q_list );
00375           SetHours( hr );
00376           SetMinutes( mn );
00377           SetSeconds( sc );
00378           SetFrames( fr );
00379           SetFractFrames( ff );
00380           SetHasTime( true );
00381         }
00382       
00383       void Put_TimedGo( 
00384         uchar hr, uchar mn, uchar sc, uchar fr, uchar ff,
00385         const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path 
00386         )
00387         {
00388           Put_Simple3(  MIDI_SC_TIMED_GO, q_number, q_list, q_path );
00389           SetHours( hr );
00390           SetMinutes( mn );
00391           SetSeconds( sc );
00392           SetFrames( fr );
00393           SetFractFrames( ff );
00394           SetHasTime( true );
00395         }
00396       
00397       
00398       void Put_Load( const MIDICue & q_number )
00399         { Put_Simple1( MIDI_SC_LOAD, q_number );  } 
00400       
00401       void Put_Load( const MIDICue & q_number, const MIDICue & q_list )
00402         { Put_Simple2( MIDI_SC_LOAD, q_number, q_list );  }   
00403       
00404       void Put_Load( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00405         { Put_Simple3( MIDI_SC_LOAD, q_number, q_list, q_path );  }   
00406       
00407       
00408       void Put_Set( ulong ctrl_num, ulong ctrl_val )
00409         { 
00410           Put_Simple0( MIDI_SC_SET ); 
00411           SetControlNum( ctrl_num );
00412           SetControlVal( ctrl_val );  
00413         }
00414       
00415       void Put_Set( 
00416         ulong ctrl_num, 
00417         ulong ctrl_val,
00418         uchar hr, uchar mn, uchar sc, uchar fr, uchar ff 
00419         )
00420         { 
00421           Put_Simple0( MIDI_SC_SET ); 
00422           SetControlNum( ctrl_num );
00423           SetControlVal( ctrl_val );
00424           SetHours( hr );
00425           SetMinutes( mn );
00426           SetSeconds( sc );
00427           SetFrames( fr );
00428           SetFractFrames( ff );
00429           SetHasTime( true );                 
00430         }
00431       
00432       
00433       void Put_Fire( uchar macro_num )
00434         { Put_Simple0( MIDI_SC_ALL_OFF );  SetMacroNum(macro_num);  }     
00435       
00436       void Put_AllOff()
00437         { Put_Simple0( MIDI_SC_ALL_OFF );   }     
00438       
00439       void Put_Restore()
00440         { Put_Simple0( MIDI_SC_RESTORE );   }     
00441       
00442       void Put_Reset()
00443         { Put_Simple0( MIDI_SC_RESET );   }     
00444       
00445       void Put_GoOff()
00446         { Put_Simple0( MIDI_SC_GO_OFF );  }           
00447       
00448       void Put_GoOff( const MIDICue & q_number )
00449         { Put_Simple1( MIDI_SC_GO_OFF,q_number );   }                   
00450       
00451       void Put_GoOff( const MIDICue & q_number, const MIDICue & q_list )
00452         { Put_Simple2( MIDI_SC_GO_OFF, q_number, q_list );  }         
00453       
00454       void Put_GoOff( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00455         { Put_Simple3( MIDI_SC_GO_OFF, q_number, q_list, q_path );  }                   
00456       
00457       void Put_GoJam()
00458         { Put_Simple0( MIDI_SC_GO_JAM );  }
00459       
00460       void Put_GoJam( const MIDICue & q_number )
00461         { Put_Simple1( MIDI_SC_GO_JAM, q_number );  }       
00462       
00463       void Put_GoJam( const MIDICue & q_number, const MIDICue & q_list )
00464         { Put_Simple2( MIDI_SC_GO_JAM, q_number, q_list );  }       
00465       
00466       void Put_GoJam( const MIDICue & q_number, const MIDICue & q_list, const MIDICue & q_path )
00467         { Put_Simple3( MIDI_SC_GO_JAM, q_number, q_list, q_path );  }       
00468       
00469       
00470       void Put_StandbyPlus()
00471         { Put_Simple0( MIDI_SC_STANDBY_PLUS );  }
00472       
00473       void Put_StandbyPlus( const MIDICue & q_list )
00474         { 
00475           Put_Simple0( MIDI_SC_STANDBY_PLUS );  
00476           SetQList(q_list);
00477           SetHasQList(true);
00478         }
00479       void Put_StandbyMinus()
00480         { Put_Simple0( MIDI_SC_STANDBY_MINUS );   } 
00481       
00482       void Put_StandbyMinus( const MIDICue & q_list )
00483         { 
00484           Put_Simple0( MIDI_SC_STANDBY_MINUS );   
00485           SetQList(q_list);
00486           SetHasQList(true);
00487         }
00488       
00489       void Put_SequencePlus()
00490         { Put_Simple0( MIDI_SC_SEQUENCE_PLUS );   } 
00491       
00492       void Put_SequencePlus( const MIDICue & q_list )
00493         { 
00494           Put_Simple0( MIDI_SC_SEQUENCE_PLUS );   
00495           SetQList(q_list);
00496           SetHasQList(true);
00497         }
00498       
00499       void Put_SequenceMinus()
00500         { Put_Simple0( MIDI_SC_SEQUENCE_MINUS );  } 
00501       
00502       void Put_SequenceMinus( const MIDICue & q_list )
00503         { 
00504           Put_Simple0( MIDI_SC_SEQUENCE_MINUS );  
00505           SetQList(q_list);
00506           SetHasQList(true);
00507         }
00508       
00509       void Put_StartClock()
00510         { Put_Simple0( MIDI_SC_START_CLOCK );   } 
00511       
00512       void Put_StartClock( const MIDICue & q_list )
00513         { 
00514           Put_Simple0( MIDI_SC_START_CLOCK );   
00515           SetQList(q_list);
00516           SetHasQList(true);
00517         }
00518       
00519       void Put_StopClock()
00520         { Put_Simple0( MIDI_SC_STOP_CLOCK );  } 
00521       
00522       void Put_StopClock( const MIDICue & q_list )
00523         { 
00524           Put_Simple0( MIDI_SC_STOP_CLOCK );  
00525           SetQList(q_list);
00526           SetHasQList(true);
00527         }
00528       
00529       void Put_ZeroClock()
00530         { Put_Simple0( MIDI_SC_ZERO_CLOCK );  } 
00531       
00532       void Put_ZeroClock( const MIDICue & q_list )
00533         { 
00534           Put_Simple0( MIDI_SC_ZERO_CLOCK );  
00535           SetQList(q_list);
00536           SetHasQList(true);
00537         }
00538       
00539       void Put_SetClock( 
00540         uchar hr, uchar mn, uchar sc, uchar fr, uchar ff
00541         )
00542         {
00543           Put_Simple0( MIDI_SC_SET_CLOCK );
00544           SetHours( hr );
00545           SetMinutes( mn );
00546           SetSeconds( sc );
00547           SetFrames( fr );
00548           SetFractFrames( ff );
00549           SetHasTime( true );
00550         }
00551       
00552       void Put_SetClock( 
00553         uchar hr, uchar mn, uchar sc, uchar fr, uchar ff,
00554         const MIDICue & q_list
00555         )
00556         {
00557           Put_Simple0( MIDI_SC_SET_CLOCK );
00558           SetHours( hr );
00559           SetMinutes( mn );
00560           SetSeconds( sc );
00561           SetFrames( fr );
00562           SetFractFrames( ff );
00563           SetHasTime( true );
00564           SetQList( q_list );
00565           SetHasQList(true);
00566         }
00567       
00568       
00569       void Put_MTCChaseOn()
00570         { Put_Simple0( MIDI_SC_MTC_CHASE_ON );  } 
00571       
00572       void Put_MTCChaseOn( const MIDICue & q_list )
00573         { 
00574           Put_Simple0( MIDI_SC_MTC_CHASE_ON );  
00575           SetQList(q_list);
00576           SetHasQList(true);
00577         }
00578       void Put_MTCChaseOff()
00579         { Put_Simple0( MIDI_SC_MTC_CHASE_OFF );   } 
00580       
00581       void Put_MTCChaseOff( const MIDICue & q_list )
00582         { 
00583           Put_Simple0( MIDI_SC_MTC_CHASE_OFF );   
00584           SetQList(q_list);
00585           SetHasQList(true);
00586         }
00587       
00588       void Put_OpenQList( const MIDICue & q_list )
00589         { 
00590           Put_Simple0( MIDI_SC_OPEN_Q_LIST );   
00591           SetQList(q_list);
00592           SetHasQList(true);
00593         }
00594       
00595       void Put_CloseQList( const MIDICue & q_list )
00596         { 
00597           Put_Simple0( MIDI_SC_CLOSE_Q_LIST );  
00598           SetQList(q_list);
00599           SetHasQList(true);
00600         }
00601       
00602       void Put_OpenQPath( const MIDICue & q_path )
00603         { 
00604           Put_Simple0( MIDI_SC_OPEN_Q_PATH );   
00605           SetQPath(q_path);
00606           SetHasQPath(true);
00607         }
00608       
00609       void Put_CloseQPath( const MIDICue & q_path )
00610         { 
00611           Put_Simple0( MIDI_SC_CLOSE_Q_PATH );  
00612           SetQPath(q_path);
00613           SetHasQPath(true);
00614         }
00615       
00616       bool  ParseEntireSysEx( const MIDISystemExclusive *e );
00617       bool  StoreToSysEx( MIDISystemExclusive *e ) const;
00618     protected:
00619       bool  StoreTime( MIDISystemExclusive *e ) const;
00620       bool  ParseTime( const MIDISystemExclusive *e, int *pos);
00621       bool  Store3Param( MIDISystemExclusive *e ) const;
00622       bool  Parse3Param( const MIDISystemExclusive *e, int *pos );
00623       bool  StoreSet( MIDISystemExclusive *e ) const; 
00624       bool  ParseSet( const MIDISystemExclusive *e,int *pos );
00625       bool  StoreFire( MIDISystemExclusive *e ) const;    
00626       bool  ParseFire( const MIDISystemExclusive *e, int *pos );
00627       bool  StoreQPath( MIDISystemExclusive *e ) const;     
00628       bool  ParseQPath( const MIDISystemExclusive *e, int *pos );
00629       bool  StoreQList( MIDISystemExclusive *e ) const; 
00630       bool  ParseQList( const MIDISystemExclusive *e, int *pos );
00631       bool  StoreAscii( MIDISystemExclusive *e, const char *str ) const;      
00632       
00633       bool  StoreAsciiNum( MIDISystemExclusive *e, const MIDICue & num ) const;
00634       bool  ParseAsciiNum( const MIDISystemExclusive *e, int *pos, MIDICue *num );
00635       bool  ParseAsciiNum( const MIDISystemExclusive *e, int *pos, ulong *num );
00636       
00637       void ClearVariableStuff();
00638       
00639       void Put_Simple0( MIDIShowCommand cmd ) 
00640         {
00641           ClearVariableStuff();
00642           SetCommand( cmd );
00643         }
00644       
00645       
00646       void Put_Simple1( 
00647         MIDIShowCommand cmd, 
00648         const MIDICue & q_number 
00649         )
00650         {
00651           ClearVariableStuff();
00652           SetCommand( cmd );
00653           SetQNumber( q_number );
00654           SetHasQNumber( true );
00655         }
00656       
00657       
00658       void Put_Simple2( 
00659         MIDIShowCommand cmd, 
00660         const MIDICue & q_number, 
00661         const MIDICue & q_list 
00662         )
00663         {
00664           ClearVariableStuff();
00665           SetCommand( cmd );
00666           SetQNumber( q_number );
00667           SetHasQNumber( true );
00668           SetQList( q_list );
00669           SetHasQList( true );
00670         }
00671       
00672       
00673       void Put_Simple3( 
00674         MIDIShowCommand cmd, 
00675         const MIDICue & q_number, 
00676         const MIDICue & q_list, 
00677         const MIDICue & q_path 
00678         )
00679         {
00680           ClearVariableStuff();
00681           SetCommand( cmd );
00682           SetQNumber( q_number );
00683           SetHasQNumber(true);
00684           SetQList( q_list );
00685           SetHasQList(true);  
00686           SetQPath( q_path );
00687           SetHasQPath(true);  
00688         }
00689       
00690       
00691       _ATTRIBUTE( uchar, DeviceId );
00692       _ATTRIBUTE( uchar, CommandFmt );
00693       _ATTRIBUTE( MIDIShowCommand, Command );
00694       _ATTRIBUTE( bool, HasTime );
00695       _ATTRIBUTE( bool, HasQNumber  );
00696       _ATTRIBUTE( bool, HasQList  );
00697       _ATTRIBUTE( bool, HasQPath  );
00698       _ATTRIBUTE( uchar, Hours      );
00699       _ATTRIBUTE( uchar, Minutes  );
00700       _ATTRIBUTE( uchar, Seconds  );
00701       _ATTRIBUTE( uchar, Frames   );
00702       _ATTRIBUTE( uchar, FractFrames  );
00703       
00704       _ATTRIBUTE_REF( MIDICue, QNumber  );
00705       _ATTRIBUTE_REF( MIDICue, QList  );
00706       _ATTRIBUTE_REF( MIDICue, QPath  );
00707       
00708       _ATTRIBUTE( ulong, Val1   );
00709       _ATTRIBUTE( ulong, Val2   );
00710       
00711       _ACCESS( ulong, MacroNum, Val1  );
00712       _ACCESS( ulong, ControlNum, Val1);
00713       _ACCESS( ulong, ControlVal, Val2);
00714     };
00715 
00716 // unlearn the brain damage
00717 #undef _ATTRIBUTE
00718 #undef _ATTRIBUTE_REF
00719 #undef _ACCESS
00720 #undef _ACCESS_REF
00721 #undef _PATTRIBUTE
00722 #undef _PATTRIBUTE_REF
00723 #undef _PACCESS
00724 #undef _PACCESS_REF
00725   
00726 }
00727     
00728 #endif