Verovio
Source code documentation
vrv::ObjectListInterface Class Reference

This class is an pseudo interface for elements maintaining a flat list of children LayerElement for processing. More...

#include <object.h>

Inheritance diagram for vrv::ObjectListInterface:
vrv::BeamDrawingInterface vrv::Chord vrv::KeySig vrv::Layer vrv::Ligature vrv::MeterSigGrp vrv::Neume vrv::ScoreDef vrv::StaffGrp vrv::Syllable vrv::TabGrp vrv::TextLayoutElement vrv::TextListInterface vrv::Tuplet

Public Member Functions

 ObjectListInterface (const ObjectListInterface &listInterface)
 
ObjectListInterface & operator= (const ObjectListInterface &listInterface)
 
int GetListIndex (const Object *listElement) const
 Look for the Object in the list and return its position (-1 if not found)
 
void ResetList () const
 Reset the list of children and call FilterList().
 
const Object * GetListFirst (const Object *startFrom, const ClassId classId=UNSPECIFIED) const
 Gets the first item of type elementType starting at startFrom.
 
Object * GetListFirst (const Object *startFrom, const ClassId classId=UNSPECIFIED)
 
const Object * GetListFirstBackward (const Object *startFrom, const ClassId classId=UNSPECIFIED) const
 
Object * GetListFirstBackward (const Object *startFrom, const ClassId classId=UNSPECIFIED)
 
const Object * GetListPrevious (const Object *listElement) const
 Returns the previous object in the list (NULL if not found)
 
Object * GetListPrevious (const Object *listElement)
 
const Object * GetListNext (const Object *listElement) const
 Returns the next object in the list (NULL if not found)
 
Object * GetListNext (const Object *listElement)
 
const ListOfConstObjects & GetList () const
 Return the list. More...
 
ListOfObjects GetList ()
 
bool HasEmptyList () const
 Convenience functions that check if the list is up-to-date If not, the list is updated before returning the result.
 
int GetListSize () const
 
const Object * GetListFront () const
 
Object * GetListFront ()
 
const Object * GetListBack () const
 
Object * GetListBack ()
 

Protected Member Functions

virtual void FilterList (ListOfConstObjects &) const
 Filter the list for a specific class. More...
 

Detailed Description

This class is an pseudo interface for elements maintaining a flat list of children LayerElement for processing.

The list is a flatten list of pointers to children elements. It is not an abstract class but should not be instanciated directly. It is expected to be used as a base class of element classes derived from Object.

Member Function Documentation

◆ FilterList()

virtual void vrv::ObjectListInterface::FilterList ( ListOfConstObjects &  ) const
inlineprotectedvirtual

Filter the list for a specific class.

For example, keep only notes in Beam

Reimplemented in vrv::Tuplet, vrv::TextLayoutElement, vrv::TabGrp, vrv::StaffGrp, vrv::ScoreDef, vrv::TextListInterface, vrv::MeterSigGrp, vrv::Ligature, vrv::KeySig, vrv::FTrem, vrv::Chord, and vrv::Beam.

◆ GetList()

const ListOfConstObjects& vrv::ObjectListInterface::GetList ( ) const

Return the list.

Before returning the list, it checks that the list is up-to-date with Object::IsModified If not, it updates the list and also calls FilterList.


The documentation for this class was generated from the following file: