Schim
Public Member Functions | List of all members
CompositeObject Class Reference

An object that consists of other child objects. More...

#include <compositeobject.h>

Inheritance diagram for CompositeObject:
[legend]
Collaboration diagram for CompositeObject:
[legend]

Public Member Functions

 CompositeObject (const CompositeObject &obj)
 Copy constructor.
 
QPointF getPos () const override
 Return the position of the object in the sheet.
 
void setPos (const QPointF &pos) override
 Set the position of the object in the sheet.
 
virtual void remove (Object *obj)
 Remove obj from the object. More...
 
- Public Member Functions inherited from Object
virtual ~Object ()=default
 This destructor does nothing. More...
 
- Public Member Functions inherited from Entity
 Entity (Entity *parent=nullptr)
 Construct an empty entity with an optional parent.
 
virtual ~Entity ()=default
 Default destructor that makes this class virtual.
 
VariableSet getVariables () const
 Return the variables defined for this entity. More...
 

Additional Inherited Members

- Protected Attributes inherited from Entity
QString name
 The name of the entity.
 
QString fileName
 The name of the source file where the entity is defined.
 
VariableSet variables
 The variables associated with this entity.
 
Entityparent {}
 The parent of this entity.
 

Detailed Description

An object that consists of other child objects.

This is the most general representation of an object. Destruction of its child objects should always be performed in the destructor. This class inherits QList<Object*> so we don't have to reimplement the convenience functions that QList already provides.

Member Function Documentation

◆ remove()

virtual void CompositeObject::remove ( Object obj)
virtual

Remove obj from the object.

If this is an instance of CompositeObject, then obj is removed from its list of constituents. The behavior can vary in subclasses.

See also
For an example behavior in subclasses, see Component::remove.

Reimplemented in Component.


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