Canorus
0.7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
playable.h
Go to the documentation of this file.
1
8
#ifndef PLAYABLE_H_
9
#define PLAYABLE_H_
10
11
#include "
core/muselement.h
"
12
#include "
core/staff.h
"
13
#include "
core/playablelength.h
"
14
#include "
core/tuplet.h
"
15
16
class
CAVoice
;
17
18
class
CAPlayable
:
public
CAMusElement
{
19
public
:
20
CAPlayable
(
CAPlayableLength
length,
CAVoice
*
voice
,
int
timeStart
,
int
timeLength
=-1 );
21
virtual
~CAPlayable
();
22
23
inline
CAPlayableLength
&
playableLength
() {
return
_playableLength
; }
24
inline
void
setPlayableLength
(
CAPlayableLength
& l ) {
_playableLength
= l; }
25
virtual
CAPlayable
*
clone
(
CAContext
*
context
) {
CAPlayable
* pl =
clone
(); pl->
setContext
(context); }
26
virtual
CAPlayable
*
clone
(
CAVoice
* voice=0)=0;
27
28
CATuplet
*
tuplet
() {
return
_tuplet
; }
29
void
setTuplet
(
CATuplet
*t ) {
_tuplet
= t; }
30
31
inline
CAVoice
*
voice
() {
return
_voice
; }
32
void
setVoice
(
CAVoice
*v);
33
inline
CAStaff
*
staff
() {
return
static_cast<
CAStaff
*
>
(
_context
); }
34
35
inline
bool
isFirstInTuplet
() {
return
(
_tuplet
&&
_tuplet
->
firstNote
()==
this
); }
36
inline
bool
isLastInTuplet
() {
return
(
_tuplet
&&
_tuplet
->
lastNote
()==
this
); }
37
38
void
resetTime
();
39
void
calculateTimeLength
();
40
41
protected
:
42
CAPlayableLength
_playableLength
;
43
CAVoice
*
_voice
;
44
CATuplet
*
_tuplet
;
45
};
46
#endif
/* PLAYABLE_H_ */
Generated on Fri Jan 11 2013 14:40:12 for Canorus by
1.8.3