[frogs] chord_name_engraver - help with c++ ... |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
This frog is back ... I said I'd wait until 2.14 which has finally
arrived :-) But I've revamped my code a bit and am having problems...
SCM capopitch = get_property ( "capoPitch" );
bool capo = false;
Pitch *c_p = unsmob_pitch (capopitch);
if ( c_p != NULL )
{
if ( &c_p::get_notename != 0 || &c_p::get_alteration != NATURAL )
{
capo = true;
}
}
I assume the simplest test to tell if capoPitch has been set is to
unsmob it? Presumably if the property hasn't been set, the pointer will
be returned as NULL?
Then, a pure c++ problem, when I'm testing for notename and alteration,
I'm getting compile errors:
chord-name-engraver.cc: In member function ‘void
Chord_name_engraver::process_music()’:
chord-name-engraver.cc:108: error: ‘c_p’ is not a class or namespace
chord-name-engraver.cc:108: error: ‘c_p’ is not a class or namespace
Given that Pitch is declared as a class in pitch.hh, and when I tried
"c_p->get_notename" it blew up with a different error, this implies my
c++-fu is wanting :-( Can you help me with the correct syntax?
Cheers,
Wol
---
----
Join the Frogs!