Lomse library. API documentation
0.30.0
|
Abstract base class for all objects composing the document
Public Member Functions | |
AObject () | |
bool | is_valid () const |
ImoObj * | internal_object () const |
Object properties | |
ImoId | object_id () const |
const std::string & | object_name () const |
ADocument | owner_document () const |
Downcast objects | |
All API classes derive from base class AObject. These downcasting methods convert the AObject to the derived class referenced by it. | |
ADynamic | downcast_to_dynamic () const |
AInstrument | downcast_to_instrument () const |
AInstrGroup | downcast_to_instr_group () const |
ALink | downcast_to_link () const |
AList | downcast_to_list () const |
AParagraph | downcast_to_paragraph () const |
AScore | downcast_to_score () const |
ATextItem | downcast_to_text_item () const |
Check referenced object type | |
All API classes derive from base class AObject. These testing methods allow to check the type of derived object referenced by this AObject. | |
bool | is_anonymous_block () const |
bool | is_button () const |
bool | is_content () const |
bool | is_control () const |
bool | is_dynamic () const |
bool | is_heading () const |
bool | is_image () const |
bool | is_inline_wrapper () const |
bool | is_instrument () const |
bool | is_instr_group () const |
bool | is_link () const |
bool | is_list () const |
bool | is_list_item () const |
bool | is_midi_info () const |
bool | is_multicolumn () const |
bool | is_music_data () const |
bool | is_paragraph () const |
bool | is_score () const |
bool | is_sound_info () const |
bool | is_table () const |
bool | is_table_cell () const |
bool | is_table_body () const |
bool | is_table_head () const |
bool | is_table_row () const |
bool | is_text_item () const |
AObject | ( | ) |
Default constructor. Creates an empty (invalid) AObject. Useful for methods that returns an AObject when a valid object cannot be returned.
ADynamic downcast_to_dynamic | ( | ) | const |
AInstrGroup downcast_to_instr_group | ( | ) | const |
Downcasts this AObject to an AInstrument. That is, if this AObject references an AInstrument object, this method returns the referenced AInstrument object. Otherwise, it returns an invalid (nullptr) AInstrument.
AInstrument downcast_to_instrument | ( | ) | const |
Downcasts this AObject to an AInstrument. That is, if this AObject references an AInstrument object, this method returns the referenced AInstrument object. Otherwise, it returns an invalid (nullptr) AInstrument.
ALink downcast_to_link | ( | ) | const |
AList downcast_to_list | ( | ) | const |
AParagraph downcast_to_paragraph | ( | ) | const |
Downcasts this AObject to an AParagraph. That is, if this AObject references an AParagraph object, this method returns the referenced AParagraph object. Otherwise, it returns an invalid (nullptr) AParagraph.
AScore downcast_to_score | ( | ) | const |
ATextItem downcast_to_text_item | ( | ) | const |
ImoObj * internal_object | ( | ) | const |
Transitional, to facilitate migration to the new public API. Notice that this method will be removed in future so, please, if you need to use this method open an issue at https://github.com/lenmus/lomse/issues explaining the need, so that the public API could be fixed and your app. would not be affected in future when this method is removed.
bool is_anonymous_block | ( | ) | const |
Returns true if the object referenced by this AObject is an anonymous block (AAnonymousBlock class)
bool is_button | ( | ) | const |
Returns true if the object referenced by this AObject is an button control (AButton class)
bool is_content | ( | ) | const |
Returns true if the object referenced by this AObject is an content block (a <div> block), represented by the AContent class.
bool is_control | ( | ) | const |
Returns true if the object referenced by this AObject is an control object (AControl class)
bool is_dynamic | ( | ) | const |
Returns true if the object referenced by this AObject is a dynamically generated content block (ADynamic class)
bool is_heading | ( | ) | const |
Returns true if the object referenced by this AObject is a heading (AHeading class)
bool is_image | ( | ) | const |
Returns true if the object referenced by this AObject is an image (AImage class)
bool is_inline_wrapper | ( | ) | const |
Returns true if the object referenced by this AObject is an generic inline-box container (similar to the <spam> html element) represented by the AInlineWrapper class.
bool is_instr_group | ( | ) | const |
Returns true if the object referenced by this AObject is an score instruments group (AInstrGroup class)
bool is_instrument | ( | ) | const |
Returns true if the object referenced by this AObject is an score instrument (AInstrument class)
bool is_link | ( | ) | const |
Returns true if the object referenced by this AObject is an hyperlink (ALink class)
bool is_list | ( | ) | const |
Returns true if the object referenced by this AObject is a list (AList class)
bool is_list_item | ( | ) | const |
Returns true if the object referenced by this AObject is a list item (AListItem class)
bool is_midi_info | ( | ) | const |
Returns true if the object referenced by this AObject is a MIDI properties object (AMidiInfo class)
bool is_multicolumn | ( | ) | const |
Returns true if the object referenced by this AObject is a multi-column container object (IMultiColumn class)
bool is_music_data | ( | ) | const |
Returns true if the object referenced by this AObject is a container describing the musical content for an instrument (IMusicData class)
bool is_paragraph | ( | ) | const |
Returns true if the object referenced by this AObject is a paragraph (AParagraph class)
bool is_score | ( | ) | const |
Returns true if the object referenced by this AObject is a music score (AScore class)
bool is_sound_info | ( | ) | const |
Returns true if the object referenced by this AObject is a sound properties object (ASoundInfo class)
bool is_table | ( | ) | const |
Returns true if the object referenced by this AObject is a table (ATable class)
bool is_table_body | ( | ) | const |
Returns true if the object referenced by this AObject is the body for a table (ATableBody class)
bool is_table_cell | ( | ) | const |
Returns true if the object referenced by this AObject is a cell for a table (ATableCell class)
bool is_table_head | ( | ) | const |
Returns true if the object referenced by this AObject is the head for a table (ATableHead class)
bool is_table_row | ( | ) | const |
Returns true if the object referenced by this AObject is a row for a table (ATableRow class)
bool is_text_item | ( | ) | const |
Returns true if the object referenced by this AObject is a chunk of text (ATextItem class)
bool is_valid | ( | ) | const |
Returns false when the object is not in a usable state. It is the equivalent to checking if a pointer contains value nullptr.
What happens if you tries to use it? The same than if you tries to use a nullptr pointer: a crash!
ImoId object_id | ( | ) | const |
Returns the internal unique identifier (ID) for this object. It could be required by some methods in the libray.
const std::string & object_name | ( | ) | const |
Returns the name of this object class. It is an string.