当前位置: 首页>>代码示例>>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;未经允许,请勿转载。