本文整理汇总了C++中StringVec::push方法的典型用法代码示例。如果您正苦于以下问题:C++ StringVec::push方法的具体用法?C++ StringVec::push怎么用?C++ StringVec::push使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringVec
的用法示例。
在下文中一共展示了StringVec::push方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: configure
MojErr MojDbKind::configure(const MojObject& obj, const KindMap& map, const MojString& locale, MojDbReq& req)
{
MojLogTrace(s_log);
// get owner before checking permissions
MojString owner;
MojErr err = obj.getRequired(OwnerKey, owner);
MojErrCheck(err);
// only admin can change owner
if (!m_owner.empty() && m_owner != owner && !req.admin()) {
err = deny(req);
MojErrCheck(err);
}
m_owner = owner;
err = checkPermission(OpKindUpdate, req);
MojErrCheck(err);
// schema
MojObject schema;
if (obj.get(SchemaKey,schema)) {
err = m_schema.fromObject(schema);
MojErrCheck(err);
}
// supers
StringVec superIds;
MojObject supers;
if (obj.get(ExtendsKey, supers)) {
MojObject::ConstArrayIterator end = supers.arrayEnd();
for (MojObject::ConstArrayIterator i = supers.arrayBegin(); i != end; ++i) {
MojString str;
err = i->stringValue(str);
MojErrCheck(err);
err = superIds.push(str);
MojErrCheck(err);
}
}
// backup
bool backup = false;
if (obj.get(SyncKey, backup))
m_backup = backup;
bool updating = !m_obj.undefined();
// load state
m_state.reset(new MojDbKindState(m_id, m_kindEngine));
MojAllocCheck(m_state.get());
err = m_state->init(m_schema.strings(), req);
MojErrCheck(err);
// indexes
err = configureIndexes(obj, locale, req);
MojErrCheck(err);
// supers
err = updateSupers(map, superIds, updating, req);
MojErrCheck(err);
// revision sets
err = configureRevSets(obj);
MojErrCheck(err);
// keep a copy of obj
m_obj = obj;
return MojErrNone;
}