本文整理汇总了C++中Identifier::isValid方法的典型用法代码示例。如果您正苦于以下问题:C++ Identifier::isValid方法的具体用法?C++ Identifier::isValid怎么用?C++ Identifier::isValid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Identifier
的用法示例。
在下文中一共展示了Identifier::isValid方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: varToState
void LoadSave::varToState(mopo::HelmEngine* synth,
const CriticalSection& critical_section,
var state) {
if (!state.isObject())
return;
mopo::control_map controls = synth->getControls();
DynamicObject* object_state = state.getDynamicObject();
ScopedLock lock(critical_section);
NamedValueSet properties = object_state->getProperties();
int size = properties.size();
for (int i = 0; i < size; ++i) {
Identifier id = properties.getName(i);
if (id.isValid()) {
std::string name = id.toString().toStdString();
if (controls.count(name)) {
mopo::mopo_float value = properties.getValueAt(i);
controls[name]->set(value);
}
}
}
synth->clearModulations();
Array<var>* modulations = object_state->getProperty("modulations").getArray();
var* modulation = modulations->begin();
for (; modulation != modulations->end(); ++modulation) {
DynamicObject* mod = modulation->getDynamicObject();
std::string source = mod->getProperty("source").toString().toStdString();
std::string destination = mod->getProperty("destination").toString().toStdString();
mopo::ModulationConnection* connection = new mopo::ModulationConnection(source, destination);
connection->amount.set(mod->getProperty("amount"));
synth->connectModulation(connection);
}
}
示例2: setId
void DomainObject::setId(const Identifier& _id)
{
if (!_id.isValid()
|| m_id != _id) {
m_id = _id;
}
}
示例3: SetConfig
void AvCaster::SetConfig(Identifier a_key , var a_value)
{
ValueTree storage_node = Store->getKeyNode(a_key) ;
DEBUG_TRACE_SET_CONFIG
if (a_key.isValid()) storage_node.setProperty(a_key , a_value , nullptr) ;
}
示例4:
DomainObject::DomainObject(Identifier _id) :
m_id(_id),
m_isChangesStored(_id.isValid() ? true : false)
{
}