Represents a relationship between two cards. More...
#include <card_relation.h>
Public Member Functions | |
| CardRelation (const QString &_name=QString(), CardRelationType _attachType=CardRelationType::DoesNotAttach, bool _isCreateAllExclusion=false, bool _isVariableCount=false, int _defaultCount=1, bool _isPersistent=false) | |
| Constructs a CardRelation with optional parameters. | |
| const QString & | getName () const |
| Returns the name of the related card. | |
| CardRelationType | getAttachType () const |
| Returns the type of attachment. | |
| bool | getDoesAttach () const |
| Returns true if the card is attached to another. | |
| bool | getDoesTransform () const |
| Returns true if this card transforms into another card. | |
| QString | getAttachTypeAsString () const |
| Returns a string description of the attachment type. | |
| bool | getCanCreateAnother () const |
| Determines whether another instance can be created. | |
| bool | getIsCreateAllExclusion () const |
| Returns whether this relation is excluded from "create all" operations. | |
| bool | getIsVariable () const |
| Returns whether the relation count is variable. | |
| int | getDefaultCount () const |
| Returns the default count of related cards. | |
| bool | getIsPersistent () const |
| Returns whether the relation is persistent. | |
Private Attributes | |
| QString | name |
| Name of the related card. | |
| CardRelationType | attachType |
| Type of attachment. | |
| bool | isCreateAllExclusion |
| True if this relation should exclude multiple creations in "create all" operations. | |
| bool | isVariableCount |
| True if the number of creations is variable. | |
| int | defaultCount |
| Default number of cards created or involved. | |
| bool | isPersistent |
| True if this relation persists (i.e. is not destroyed) on zone change. | |
Represents a relationship between two cards.
CardRelation objects define directional relationships, such as:
Relations may also define metadata such as whether multiple creations are possible, whether the relation is persistent, and default counts.
|
explicit |
Constructs a CardRelation with optional parameters.
| _name | Name of the related card. |
| _attachType | Type of attachment. |
| _isCreateAllExclusion | Whether this relation excludes mass creation. |
| _isVariableCount | Whether the count is variable. |
| _defaultCount | Default number for creations or transformations. |
| _isPersistent | Whether the relation persists across zone changes. |
|
inlinenodiscard |
Returns the type of attachment.
|
inlinenodiscard |
Returns a string description of the attachment type.
|
inlinenodiscard |
Determines whether another instance can be created.
|
inlinenodiscard |
Returns the default count of related cards.
|
inlinenodiscard |
Returns true if the card is attached to another.
|
inlinenodiscard |
Returns true if this card transforms into another card.
|
inlinenodiscard |
Returns whether this relation is excluded from "create all" operations.
|
inlinenodiscard |
Returns whether the relation is persistent.
Persistent relations are not destroyed on zone changes.
|
inlinenodiscard |
Returns whether the relation count is variable.
|
inlinenodiscard |
Returns the name of the related card.
|
private |
Type of attachment.
|
private |
Default number of cards created or involved.
|
private |
True if this relation should exclude multiple creations in "create all" operations.
|
private |
True if this relation persists (i.e. is not destroyed) on zone change.
|
private |
True if the number of creations is variable.
|
private |
Name of the related card.