Schim
Public Member Functions | Protected Attributes | List of all members
Entity Class Reference

Base class for entities. More...

#include <entity.h>

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

Public Member Functions

 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...
 

Protected Attributes

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

Base class for entities.

An entity is any class that has some metadata associated with it. Metadata can be a name, annotative properties and variables. Currently, the only entities in Schim are Project, Sheet, CompositeObject and any of their subclasses.

The currently defined common metadata for all entities are:

Note
Entities are not the only items that can have parents. Other items like primitive objects also have parents, but they need not keep a reference to their parent (to reduce memory usage). In some circumstances primitive objects may keep a reference to their parent, but this is treated on a case-by-case basis.
Children of the entity are not handled in the base class. Derived classes should implement this on their own if needed.
See also
Variable

Member Function Documentation

◆ getVariables()

VariableSet Entity::getVariables ( ) const

Return the variables defined for this entity.

Returns
The variables defined for this entity, including local variables and those inherited from the parent entity.

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