本文整理汇总了C++中Namespace::toString方法的典型用法代码示例。如果您正苦于以下问题:C++ Namespace::toString方法的具体用法?C++ Namespace::toString怎么用?C++ Namespace::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Namespace
的用法示例。
在下文中一共展示了Namespace::toString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: namespaceGetNamespacesCallback
static void namespaceGetNamespacesCallback( const Namespace& k , NamespaceDetails& v , list<string>* l ) {
if ( ! k.hasDollarSign() || k == "local.oplog.$main" ) {
// we call out local.oplog.$main specifically as its the only "normal"
// collection that has a $, so we make sure it gets added
l->push_back( k.toString() );
}
}
示例2: add_ns
void NamespaceIndex::add_ns( const Namespace& ns, const NamespaceDetails* details ) {
string nsString = ns.toString();
Lock::assertWriteLocked( nsString );
massert( 17315, "no . in ns", nsString.find( '.' ) != string::npos );
init();
uassert( 10081, "too many namespaces/collections", _ht->put(ns, *details));
}
示例3: add_ns
void NamespaceIndex::add_ns( OperationContext* txn,
const Namespace& ns, const NamespaceDetails* details ) {
string nsString = ns.toString();
txn->lockState()->assertWriteLocked( nsString );
massert( 17315, "no . in ns", nsString.find( '.' ) != string::npos );
init( txn );
uassert( 10081, "too many namespaces/collections", _ht->put(txn, ns, *details));
}
示例4: add_ns
void NamespaceIndex::add_ns(OperationContext* txn,
const Namespace& ns,
const NamespaceDetails* details) {
const NamespaceString nss(ns.toString());
invariant(txn->lockState()->isDbLockedForMode(nss.db(), MODE_X));
massert(17315, "no . in ns", nsIsFull(nss.toString()));
uassert(10081, "too many namespaces/collections", _ht->put(txn, ns, *details));
}
示例5: add_ns
void NamespaceIndex::add_ns( const Namespace& ns, const NamespaceDetails* details ) {
Lock::assertWriteLocked(ns.toString());
init();
uassert( 10081 , "too many namespaces/collections", _ht->put(ns, *details));
}