當前位置: 首頁>>代碼示例>>C++>>正文


C++ DOC函數代碼示例

本文整理匯總了C++中DOC函數的典型用法代碼示例。如果您正苦於以下問題:C++ DOC函數的具體用法?C++ DOC怎麽用?C++ DOC使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DOC函數的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: ReleaseCapture

//---------------------------------------------------------------------------------------
void z_ed3View::OnLButtonUp(UINT nFlags, CPoint point) 
{
	_mm._ldown = 0;

	if(_mm._rdown==0)
	{
		if(GetCapture() == this)
			ReleaseCapture();
		if(_scrPoint.x!=0)
			SetCursorPos(_scrPoint.x, _scrPoint.y);
		ShowTheCursor();
	}

    if(!_rotating )
    {
        _EL_SEL sel = DOC()->_selmode;
        if(SEL_NONE!=sel && DOC()->_blocksel==FALSE)
        {
            DOC()->DoSelection3D(point, this, sel);
        }
    }
	DOC()->Invalidate();
    if(!_blockMouseCall)
	    CView::OnLButtonUp(nFlags, point);
}
開發者ID:comarius,項目名稱:getic3d,代碼行數:26,代碼來源:z_ed3View.cpp

示例2: MakeCurrent

//---------------------------------------------------------------------------------------
void  z_ed3View::Project3D(int iWidth, int iHeight)
{
	MakeCurrent(_hdc, m_hRC); 

    if(iHeight == 0)
        iHeight = 1;

    if(DOC()->b_whitebk)
    {
        glClearColor(.8f, .8f, .8f, 0.0f);
    }
    else
    {
        if(DOC()->_bShowCsg)
            glClearColor(0.11f, 0.11f, 0.11f, 0.0f);
        else
            glClearColor(.02f, .02f, .04f, 0.0f);
    }
    REAL farCam = _ffar;
/*
    if(SCENE()._si.fogFar)
        farCam = SCENE()._si.fogFar*_ffar;
*/
    
    glViewport(0, 0, iWidth, iHeight);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(_fov,(GLfloat)iWidth/(GLfloat)iHeight, _fnear, farCam);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();

//	MakeCurrent(_hdc, 0); 
}
開發者ID:comarius,項目名稱:getic3d,代碼行數:34,代碼來源:z_ed3View.cpp

示例3: invariant

    Value DocumentSourceGroup::serialize(bool explain) const {
        MutableDocument insides;

        // add the _id
        if (_idFieldNames.empty()) {
            invariant(_idExpressions.size() == 1);
            insides["_id"] = _idExpressions[0]->serialize(explain);
        }
        else {
            // decomposed document case
            invariant(_idExpressions.size() == _idFieldNames.size());
            MutableDocument md;
            for (size_t i = 0; i < _idExpressions.size(); i++) {
                md[_idFieldNames[i]] = _idExpressions[i]->serialize(explain);
            }
            insides["_id"] = md.freezeToValue();
        }

        // add the remaining fields
        const size_t n = vFieldName.size();
        for(size_t i = 0; i < n; ++i) {
            intrusive_ptr<Accumulator> accum = vpAccumulatorFactory[i]();
            insides[vFieldName[i]] =
                Value(DOC(accum->getOpName() << vpExpression[i]->serialize(explain)));
        }

        if (_doingMerge) {
            // This makes the output unparsable (with error) on pre 2.6 shards, but it will never
            // be sent to old shards when this flag is true since they can't do a merge anyway.

            insides["$doingMerge"] = Value(true);
        }

        return Value(DOC(getSourceName() << insides.freeze()));
    }
開發者ID:7segments,項目名稱:mongo-1,代碼行數:35,代碼來源:document_source_group.cpp

示例4: Value

    Value DocumentSourceCursor::serialize(bool explain) const {
        // we never parse a documentSourceCursor, so we only serialize for explain
        if (!explain)
            return Value();

        Lock::DBRead lk(_ns);
        Client::Context ctx(_ns, storageGlobalParams.dbpath, /*doVersion=*/false);

        ClientCursorPin pin(_cursorId);
        ClientCursor* cursor = pin.c();

        uassert(17135, "Cursor deleted. Was the collection or database dropped?",
                cursor);

        Runner* runner = cursor->getRunner();
        runner->restoreState();

        return Value(DOC(getSourceName() <<
            DOC("query" << Value(_query)
             << "sort" << (!_sort.isEmpty() ? Value(_sort) : Value())
             << "limit" << (_limit ? Value(_limit->getLimit()) : Value())
             << "fields" << (!_projection.isEmpty() ? Value(_projection) : Value())
             // << "indexOnly" << canUseCoveredIndex(cursor)
             // << "cursorType" << cursor->c()->toString()
        ))); // TODO get more plan information
    }
開發者ID:Krolcom,項目名稱:mongo,代碼行數:26,代碼來源:document_source_cursor.cpp

示例5: DOC

void CMainFrame::OnGlobals() 
{
    CDlgGs	d;
    d.DoModal();
	DOC()->SetFaceMode();
	DOC()->SetLightMode();
    DOC()->Invalidate(1);

}
開發者ID:comarius,項目名稱:getic3d,代碼行數:9,代碼來源:MainFrm.cpp

示例6: DOC

 void DocumentSourceSort::serializeToArray(vector<Value>& array, bool explain) const {
     if (explain) { // always one Value for combined $sort + $limit
         array.push_back(Value(
                 DOC(getSourceName() << DOC("sortKey" << serializeSortKey()
                                         << "limit" << (limitSrc ? Value(limitSrc->getLimit())
                                                                 : Value())))));
     }
     else { // one Value for $sort and maybe a Value for $limit
         array.push_back(Value(DOC(getSourceName() << serializeSortKey())));
         if (limitSrc) {
             limitSrc->serializeToArray(array);
         }
     }
 }
開發者ID:Cassie90,項目名稱:mongo,代碼行數:14,代碼來源:document_source_sort.cpp

示例7: DOC

object_t *lambda_f (object_t * lst)
{
  DOC ("Create an anonymous function.");
  if (!is_func_form (lst))
    THROW (c_sym ("bad-function-form"), UPREF (lst));
  return c_cons (lambda, UPREF (lst));
}
開發者ID:qyqx,項目名稱:wisp,代碼行數:7,代碼來源:lisp.c

示例8: DOC

namespace standard {

const char* TCToTotal::name = "TCToTotal";
const char* TCToTotal::category = "Envelope/SFX";
const char* TCToTotal::description = DOC("This algorithm calculates the ratio of the temporal centroid to the total length of a signal envelope. This ratio shows how the sound is 'balanced'. Its value is close to 0 if most of the energy lies at the beginning of the sound (e.g. decrescendo or impulsive sounds), close to 0.5 if the sound is symetric (e.g. 'delta unvarying' sounds), and close to 1 if most of the energy lies at the end of the sound (e.g. crescendo sounds).\n"
"\n"
"Please note that the TCToTotal ratio is not defined for a zero signal (a signal consisting of only zeros), nor it is defined for a signal of less than 2 elements."
"An exception is thrown if the given envelope's size is not larger than 1. And also if the integral of the input envelope is 0 (i.e. envelope is only zeros or if its sum is 0).\n\n"
"This algorithm is intended to be plugged after the Envelope algorithm");

void TCToTotal::compute() {

  const vector<Real>& envelope = _envelope.get();
  Real& TCToTotal = _TCToTotal.get();

  if (envelope.size() < 2) {
    throw EssentiaException("TCToTotal: the given envelope's size is not larger than 1");
  }

  double num = 0.0;
  double den = 0.0;
  for (int i=0; i<int(envelope.size()); i++) {
    num += envelope[i] * i;
    den += envelope[i];
  }

  if (den == 0) {
    throw EssentiaException("TCToTotal: the given envelope consists only of zeros, or the integral of the signal is zero (i.e. given data is not a signal envelope)");
  }

  double centroid = num / den;
  TCToTotal = centroid / double(envelope.size()-1);
}

} // namespace standard
開發者ID:MTG,項目名稱:essentia,代碼行數:35,代碼來源:tctototal.cpp

示例9: DOC

namespace standard {

const char* Trimmer::name = "Trimmer";
const char* Trimmer::description = DOC("Given an audio signal, this algorithm it extracts a slice of the signal between startTime and endTime.\n"
"Giving \"startTime\" greater than \"endTime\" will raise an exception.");

void Trimmer::configure() {
  Real sampleRate = parameter("sampleRate").toReal();
  _startIndex = (long long)(parameter("startTime").toReal() * sampleRate);
  _endIndex = (long long)(parameter("endTime").toReal() * sampleRate);
  if (_startIndex > _endIndex) {
    throw EssentiaException("Trimmer: startTime cannot be larger than endTime.");
  }
}

void Trimmer::compute() {
  const vector<Real>& input = _input.get();
  vector<Real>& output = _output.get();
  int size = input.size();

  if (_startIndex < 0) _startIndex = 0;
  if (_startIndex > size) {
    //throw EssentiaException("Trimmer: cannot trim beyond the size of the input signal");
    _startIndex = size;
  }
  if (_endIndex > size) _endIndex = size;

  size = _endIndex-_startIndex;
  output.resize(size);
  memcpy(&output[0], &input[0]+_startIndex, size*sizeof(Real));
}

} // namespace essentia
開發者ID:Aldor007,項目名稱:essentia,代碼行數:33,代碼來源:trimmer.cpp

示例10: findNode

/*
 * Class:     org_xmlsoft_Node
 * Method:    previousImpl
 * Signature: ()Lrath/libxml/Node;
 */
JNIEXPORT jobject JNICALL Java_org_xmlsoft_Node_previousImpl
  (JNIEnv *env, jobject obj) {
    xmlNode *node = findNode(env, obj);
    if (node->prev==NULL )
        return NULL;
    return buildNode(env, node->prev, DOC(obj));
}
開發者ID:rath,項目名稱:libxml2-java,代碼行數:12,代碼來源:node.c

示例11: Value

    Value DocumentSourceGeoNear::serialize(bool explain) const {
        MutableDocument result;

        if (coordsIsArray) {
            result.setField("near", Value(BSONArray(coords)));
        }
        else {
            result.setField("near", Value(coords));
        }

        // not in buildGeoNearCmd
        result.setField("distanceField", Value(distanceField->getPath(false)));

        result.setField("limit", Value(limit));

        if (maxDistance > 0)
            result.setField("maxDistance", Value(maxDistance));

        result.setField("query", Value(query));
        result.setField("spherical", Value(spherical));
        result.setField("distanceMultiplier", Value(distanceMultiplier));

        if (includeLocs)
            result.setField("includeLocs", Value(includeLocs->getPath(false)));

        result.setField("uniqueDocs", Value(uniqueDocs));

        return Value(DOC(getSourceName() << result.freeze()));
    }
開發者ID:Axv2,項目名稱:mongo,代碼行數:29,代碼來源:document_source_geo_near.cpp

示例12:

//---------------------------------------------------------------------------------------
void z_ed3View::OnDestroy() 
{
    Ta.Disable();
	CView::OnDestroy();
    --DOC()->_viewCount;
    
}
開發者ID:comarius,項目名稱:getic3d,代碼行數:8,代碼來源:z_ed3View.cpp

示例13: DOC

//---------------------------------------------------------------------------------------
void  CBigTerrain::Clear(BOOL delB)
{
    if(delB && p_dummyBrush)
        DOC()->DeleteBrush(p_dummyBrush,0);
    p_dummyBrush = 0;
    v_vxes.Destroy();
    n_xtiles=0;
    n_ztiles=0;
}
開發者ID:comarius,項目名稱:getic3d,代碼行數:10,代碼來源:BigTerrain.cpp


注:本文中的DOC函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。