Archicad 28 C++ API
|
The ReferenceSetBase represents a named table, and it contains referenceIds which are used as keys in the PreferenceTables. By default, Archicad will provide you the DN referenceSet, but you can choose your own by renaming it and populate it with your desired values. More...
#include <MEPReferenceSetBase.hpp>
Public Member Functions | |
bool | Exists () const |
Result< void > | IsEditable () const |
Checks whether the table is editable. | |
GS::UniString | GetName () const |
uint32_t | GetSize () const |
Result< uint32_t > | GetReferenceId (uint32_t index) const |
Result< bool > | IsReferenceIdDefined (uint32_t index) const |
Checks whether an entry from the referenceSet is defined. A referenceId is defined if at least one preferenceTable has values associated to it. | |
template<typename ModifierFunc > | |
Result< void > | Modify (const ModifierFunc &modifierFunc, const GS::UniString &undoString) |
Executes the passed modifier scope in an Undoable command. | |
void | SetName (const GS::UniString &referenceSetName) |
Sets the name of the referenceSet. | |
Result< uint32_t > | Add (uint32_t id) |
Adds a new referenceId into the referenceSet. If the id is a duplicate, it will not be inserted twice. | |
Result< void > | Delete (uint32_t id) |
Deletes an entry from the referenceSet. Only undefined referenceIds can be deleted. A referenceId is defined if at least one preferenceTable has values associated to it. | |
![]() | |
Object (std::shared_ptr< Impl::ObjectImpl > impl) | |
Constructs a new object. | |
const API_Token & | GetToken () const |
Get the token for this object. | |
Protected Member Functions | |
ReferenceSetBase (std::shared_ptr< Impl::IReferenceSetBaseImpl > impl) | |
Constructs a ReferenceSetBase with the given base implementation. | |
Modifier (ReferenceSetBase &parent) | |
Constructs a Modifier with the given referenceSetBase. | |
![]() | |
~Object () | |
Default destructor. | |
Additional Inherited Members | |
![]() | |
std::shared_ptr< Impl::ObjectImpl > | mImpl |
Impl object given by constructor. | |
The ReferenceSetBase represents a named table, and it contains referenceIds which are used as keys in the PreferenceTables. By default, Archicad will provide you the DN referenceSet, but you can choose your own by renaming it and populate it with your desired values.
The entries of the set have to be unique and are always in ascending order. Entries that are defined in PreferenceTables cannot be deleted.
|
protected |
Constructs a ReferenceSetBase with the given base implementation.
impl | The given base implementation. |
Result< uint32_t > ACAPI::MEP::v1::ReferenceSetBase::Add | ( | uint32_t | id | ) |
Adds a new referenceId into the referenceSet. If the id is a duplicate, it will not be inserted twice.
id | The id to be added. |
Result< void > ACAPI::MEP::v1::ReferenceSetBase::Delete | ( | uint32_t | id | ) |
Deletes an entry from the referenceSet. Only undefined referenceIds can be deleted. A referenceId is defined if at least one preferenceTable has values associated to it.
id | The id to be deleted. |
bool ACAPI::MEP::v1::ReferenceSetBase::Exists | ( | ) | const |
GS::UniString ACAPI::MEP::v1::ReferenceSetBase::GetName | ( | ) | const |
Result< uint32_t > ACAPI::MEP::v1::ReferenceSetBase::GetReferenceId | ( | uint32_t | index | ) | const |
index | The index of the row. Index starts from 0. |
uint32_t ACAPI::MEP::v1::ReferenceSetBase::GetSize | ( | ) | const |
Result< void > ACAPI::MEP::v1::ReferenceSetBase::IsEditable | ( | ) | const |
Checks whether the table is editable.
Result< bool > ACAPI::MEP::v1::ReferenceSetBase::IsReferenceIdDefined | ( | uint32_t | index | ) | const |
Checks whether an entry from the referenceSet is defined. A referenceId is defined if at least one preferenceTable has values associated to it.
index | The index of the row. Index starts from 0. |
|
protected |
Constructs a Modifier with the given referenceSetBase.
parent | The given parent ReferenceSetBase. |
Result< void > ACAPI::MEP::v1::ReferenceSetBase::Modify | ( | const ModifierFunc & | modifierFunc, |
const GS::UniString & | undoString | ||
) |
Executes the passed modifier scope in an Undoable command.
modifierFunc | The modifier scope (lambda, std::function or function pointer) the caller wants to execute. |
undoString | The text which appears in the undo queue of Archicad after executing the command. |
void ACAPI::MEP::v1::ReferenceSetBase::SetName | ( | const GS::UniString & | referenceSetName | ) |
Sets the name of the referenceSet.
referenceSetName | The name to be set. |