Lomse library. API documentation  0.30.0
IChildren Class Reference
Inheritance diagram for IChildren:
AObject ADynamic ALink AList AParagraph

Detailed Description

Some API clases present a virtual structure similar to a tree. For instance, AParagraph class can be seen as a container for text with different styles. Thus, the following LDP source code:

(para (txt (style bold) "Hello") (txt " world! ")(txt "It is a nice day!"))

will produce the following structure of API classes:

                                    AParagraph
                                        |
                   +--------------------+--------------------+
                   |                    |                    |
               ATextItem (bold)     ATextItem (normal)   ATextItem (normal)
               "Hello"              " world! "           "It is a nice day!"

For objects, such as AParagraph, that organizes its content in a tree, class IChildren provides the methods for child content traversal. IChildren is just an interface class and thus, you will never directly manage IChildren objects but objects derived from this class.

Public Member Functions

Document content traversal
int num_children () const
 
AObject child_at (int iItem) const
 
AObject first_child () const
 
AObject last_child () const
 
- Public Member Functions inherited from AObject
 AObject ()
 
bool is_valid () const
 
ImoObj * internal_object () const
 
ImoId object_id () const
 
const std::string & object_name () const
 
ADocument owner_document () const
 
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
 
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