|
|
The class Element is the most essentail class. All objects related to a song in any way (tracks, parts, notes, events, etc) are Elements. Each Element is of a certain Type, which is returned by the isA() method. E.g. to treat an event ev properly, one may type:
if (ev->isA()==NOTE) { ... } else if (ev->isA()==MASTEREVENT) { ... } |
The Types used by the API are:
Events: AUDIOEVENT, MASTEREVENT, MIDIEVENT, NOTE, SYMBOL,
Compounds: SONG, TRACK, PART, TABLE, VECTOR
Operations: ADDELEMENT, REMOVEELEMENT, CONVERTTRACK, MOVEPART, COPYPART, COPYGHOSTPART, MOVEEVENT, COPYEVENT, CHANGENOTE, GLUENOTE, SPLITNOTE, ADDORNAMENT, REMOVEORNAMENT, ADDSYMBOL, ADDTOSELECTION, REMOVEFROMSELECTION, NEWSELECTION, SELECTLEFT, SELECTRIGHT, UNSELECT, SPLITPART, GLUEPARTS, COPYSELECTION, CUTSELECTION, PASTESELECTION, DELETESELECTION
Furthermore the Element is the base class for a composite pattern: An Element can either be a compound (which is - more or less - a list!) containing further elements, or an Atom. Examples for Atoms are Strings, Operations, Positions and Events (like Notes). Examples for Compounds are Songs, Tracks, Parts, Tables and Vectors.
Thus Elements may have a successor and a predecessor when they are arranged within a compound. All this may become totally clear by taking a look at the API class hierarchy.
Element ()
| Element |
Element is an abstract class. Do not initiate elements youself!
Element (const Element & el)
| Element |
Copy constructor
~Element ()
| ~Element |
[virtual]
The destructor contains code only in debugging mode
Type _type | _type |
[protected]
char * spc (int)
| spc |
[protected const]
For internal use only!
Element * next (Element *)
| next |
[protected static]
For internal use only!
Element * prev (Element *)
| prev |
[protected static]
For internal use only!
void splitBefore (Element *)
| splitBefore |
[protected static]
For internal use only!
Element * first (Element *)
| first |
[protected static]
For internal use only!
Element * last (Element *)
| last |
[protected static]
For internal use only!
Element * get (int,Element*)
| get |
[protected static]
For internal use only!
void append (Element *, Element *)
| append |
[protected static]
For internal use only!
Element * preput (Element *, Element *)
| preput |
[protected static]
For internal use only!
Element * insertBefore (Element *, Element *)
| insertBefore |
[protected static]
For internal use only!
void insertAfter (Element *, Element *)
| insertAfter |
[protected static]
For internal use only!
Element * remove (Element *)
| remove |
[protected static]
For internal use only!
void exchange (Element * e1, Element * e2)
| exchange |
[protected static]
For internal use only!
bool member (Compound * c)
| member |
Checks whether an element is member of a compound c
int ord (Compound*)
| ord |
If member of a compound, this method returns the element position within the compound, and -1 otherwise
const char * ctype ()
| ctype |
[const virtual]
Returns the type of an element as char*. This has to be reimplemented when new Track types are declared as addons
Type isA ()
| isA |
[const]
Returns the type of an element as a Type (integer)
bool isEvent ()
| isEvent |
[const pure virtual]
Returns true if the element is an event (Note, etc.)
bool isTrack ()
| isTrack |
[const pure virtual]
Returns true if the element is a track
void show ()
| show |
[virtual]
Overload this, if this element has a presentation, and delegate to it
void hide ()
| hide |
[virtual]
Overload this, if this element has a presentation, and delegate to it
ostream & print (int,ostream&)
|
[const pure virtual]
Implement this to define output for each element
void flush (const char*)
| flush |
[const pure virtual]
Implement this to define short output for each element
Element * copy ()
| copy |
[const pure virtual]
Implement this to define the copy process for each element
void loadContent (Compound * list, const char * term, const char * name, Element*(*loadme)(char*,ifstream*&,Element*), ifstream * inPtr, PrProgress * progress=0, int num=0)
| loadContent |
[static]
For internal use only!
void loadContent (Compound * list, const char * term, int num, const char * name[], Element*(*loadme[])(char*,ifstream*&,Element*), ifstream * inPtr, PrProgress * progress=0, int num=0)
| loadContent |
[static]
For internal use only!
Generated by: wuerthne on al on Sun Jan 6 22:32:42 2002, using kdoc 2.0a53. |