• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ REPORT_ERROR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中REPORT_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ REPORT_ERROR函数的具体用法?C++ REPORT_ERROR怎么用?C++ REPORT_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了REPORT_ERROR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: file

QMap<QString, QVariant> SimpleMessageStyle::styleInfo(const QString &AStylePath)
{
	QMap<QString, QVariant> info;

	QFile file(AStylePath+"/Info.plist");
	if (!AStylePath.isEmpty() && file.open(QFile::ReadOnly))
	{
		QString xmlError;
		QDomDocument doc;
		if (doc.setContent(&file,true,&xmlError))
		{
			QDomElement elem = doc.documentElement().firstChildElement("dict").firstChildElement("key");
			while (!elem.isNull())
			{
				QString key = elem.text();
				if (!key.isEmpty())
				{
					elem = elem.nextSiblingElement();
					if (elem.tagName() == "string")
						info.insert(key,elem.text());
					else if (elem.tagName() == "integer")
						info.insert(key,elem.text().toInt());
					else if (elem.tagName() == "true")
						info.insert(key,true);
					else if (elem.tagName() == "false")
						info.insert(key,false);
				}
				elem = elem.nextSiblingElement("key");
			}
		}
		else
		{
			LOG_ERROR(QString("Failed to load simple style info from file content: %1").arg(xmlError));
		}
	}
	else if (AStylePath.isEmpty())
	{
		REPORT_ERROR("Failed to get simple style info: Style path is empty");
	}
	else
	{
		LOG_ERROR(QString("Failed to load simple style info from file: %1").arg(file.errorString()));
	}
	return info;
}
开发者ID:Ardaq,项目名称:vacuum-im,代码行数:45,代码来源:simplemessagestyle.cpp


示例2: u

void GeostrophicRelation::run(const SingleLevelField &ghs,
                              const TimeLevelIndex &timeIdx,
                              const Field &gd, Field &u, Field &v) {
    const Mesh &mesh = static_cast<const Mesh&>(ghs.getMesh());
    const Domain &domain = static_cast<const Domain&>(mesh.getDomain());
    double Re = domain.getRadius();
    int js = 0, jn = mesh.getNumGrid(1, FULL)-1;
    // -------------------------------------------------------------------------
    if (u.getStaggerLocation() == CENTER &&
        v.getStaggerLocation() == CENTER) {
        double dlon = mesh.getGridInterval(0, FULL, 0);
        double dlat = mesh.getGridInterval(1, FULL, 1); // assume equidistant grids
        // normal grids
        for (int j = 1; j < mesh.getNumGrid(1, FULL)-1; ++j) {
            double cosLat = mesh.getCosLat(FULL, j);
            double f = 2*OMEGA*mesh.getSinLat(FULL, j);
            for (int i = 0; i < mesh.getNumGrid(0, FULL); ++i) {
                if (fabs(f) <= 1.0e-15) {
                    u(timeIdx, i, j) = 0;
                    v(timeIdx, i, j) = 0;
                } else {
                    double dgdLon = gd(timeIdx, i+1, j)-gd(timeIdx, i-1, j);
                    double dgdLat = gd(timeIdx, i, j+1)-gd(timeIdx, i, j-1);
                    double dghsLon = ghs(i+1, j)-ghs(i-1, j);
                    double dghsLat = ghs(i, j+1)-ghs(i, j-1);
                    u(timeIdx, i, j) = -(dgdLat+dghsLat)/(f*Re*2*dlat);
                    v(timeIdx, i, j) =  (dgdLon+dghsLon)/(f*Re*cosLat*2*dlon);
                }
            }
        }
        // pole grids
        for (int i = 0; i < mesh.getNumGrid(0, FULL); ++i) {
            u(timeIdx, i, js) = 0;
            u(timeIdx, i, jn) = 0;
            v(timeIdx, i, js) = 0;
            v(timeIdx, i, jn) = 0;
        }
    } else if (u.getStaggerLocation() == X_FACE &&
               v.getStaggerLocation() == Y_FACE) {
        REPORT_ERROR("Under construction!");
    }
    // -------------------------------------------------------------------------
    u.applyBndCond(timeIdx);
    v.applyBndCond(timeIdx);
}
开发者ID:huyong1109,项目名称:barotropic-model,代码行数:45,代码来源:GeostrophicRelation.cpp


示例3: acpi_ds_scope_stack_push

acpi_status
acpi_ds_scope_stack_push (
	acpi_namespace_node     *node,
	acpi_object_type8       type,
	acpi_walk_state         *walk_state)
{
	acpi_generic_state      *scope_info;


	FUNCTION_TRACE ("Ds_scope_stack_push");


	if (!node) {
		/* Invalid scope   */

		REPORT_ERROR (("Ds_scope_stack_push: null scope passed\n"));
		return_ACPI_STATUS (AE_BAD_PARAMETER);
	}

	/* Make sure object type is valid */

	if (!acpi_ex_validate_object_type (type)) {
		REPORT_WARNING (("Ds_scope_stack_push: type code out of range\n"));
	}


	/* Allocate a new scope object */

	scope_info = acpi_ut_create_generic_state ();
	if (!scope_info) {
		return_ACPI_STATUS (AE_NO_MEMORY);
	}

	/* Init new scope object */

	scope_info->common.data_type = ACPI_DESC_TYPE_STATE_WSCOPE;
	scope_info->scope.node      = node;
	scope_info->common.value    = (u16) type;

	/* Push new scope object onto stack */

	acpi_ut_push_generic_state (&walk_state->scope_info, scope_info);

	return_ACPI_STATUS (AE_OK);
}
开发者ID:TitaniumBoy,项目名称:lin,代码行数:45,代码来源:dswscope.c


示例4: ImgRegionRscSize

extern "C" void gxpport_loadimmutable_from_platformbuffer
(unsigned char* srcBuffer, int length, jboolean isStatic,
 int* ret_imgWidth, int* ret_imgHeight,
 gxpport_image_native_handle *newImmutableImagePtr,
 gxutl_native_image_error_codes* creationErrorPtr) {

    int rscSize;
    gxutl_image_buffer_raw* dataBuffer = (gxutl_image_buffer_raw*)srcBuffer;

    /* Check resource limit */
    rscSize = ImgRegionRscSize(NULL, dataBuffer->width, dataBuffer->height);
    if (midpCheckResourceLimit(RSC_TYPE_IMAGE_IMMUT, rscSize) == 0) {
        /* Exceed Resource limit */
        *creationErrorPtr = GXUTL_NATIVE_IMAGE_RESOURCE_LIMIT;
        return;
    }

    _Platform_ImmutableImage* immutableImage =
        (_Platform_ImmutableImage*)midpMalloc(sizeof(_Platform_ImmutableImage));
    if (immutableImage == NULL) {
        *creationErrorPtr = GXUTL_NATIVE_IMAGE_OUT_OF_MEMORY_ERROR;
        return;
    }

    if (!load_raw(&immutableImage->qimage,
                dataBuffer,
                length, isStatic,
                ret_imgWidth, ret_imgHeight)) {
	midpFree(immutableImage);
        *creationErrorPtr = GXUTL_NATIVE_IMAGE_DECODING_ERROR;
        return;
    }

    /* Image creation succeeds */
    if (midpIncResourceCount(RSC_TYPE_IMAGE_IMMUT, rscSize) == 0) {
        REPORT_ERROR(LC_LOWUI, "Error in updating resource limit"
                     " for Immutable image");
    }
            
    immutableImage->marker = 7;
    immutableImage->qpixmap = NULL;

    *newImmutableImagePtr = immutableImage;
    *creationErrorPtr = GXUTL_NATIVE_IMAGE_NO_ERROR;
}
开发者ID:jiangxilong,项目名称:yari,代码行数:45,代码来源:gxpportqt_immutableimage.cpp


示例5: SetUp

    //init metadatas
    virtual void SetUp()
    {

        try
        {
            //get example images/staks
            if (chdir(((String)(getXmippPath() + (String)"/resources/test")).c_str())==-1)
            	REPORT_ERROR(ERR_UNCLASSIFIED,"Could not change directory");
            // testBaseName = xmippPath + "/resources/test";
            imageName = "image/singleImage.spi";

        }
        catch (XmippError &xe)
        {
            std::cerr << xe;
            exit(-1);
        }
    }
开发者ID:I2PC,项目名称:scipion,代码行数:19,代码来源:test_ctf_main.cpp


示例6: FM_PCD_SetPrsStatistics

void FM_PCD_SetPrsStatistics(t_Handle h_FmPcd, bool enable)
{
    t_FmPcd             *p_FmPcd = (t_FmPcd*)h_FmPcd;

    SANITY_CHECK_RETURN(p_FmPcd, E_INVALID_HANDLE);
    SANITY_CHECK_RETURN(p_FmPcd->p_FmPcdPrs, E_INVALID_HANDLE);

    if(p_FmPcd->guestId != NCSW_MASTER_ID)
    {
        REPORT_ERROR(MAJOR, E_NOT_SUPPORTED, ("FM_PCD_SetPrsStatistics - guest mode!"));
        return;
    }
    if(enable)
        WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->ppsc, FM_PCD_PRS_PPSC_ALL_PORTS);
    else
        WRITE_UINT32(p_FmPcd->p_FmPcdPrs->p_FmPcdPrsRegs->ppsc, 0);

}
开发者ID:2asoft,项目名称:freebsd,代码行数:18,代码来源:fm_prs.c


示例7: rfind

// Get number from file ....................................................
size_t FileName::getPrefixNumber(size_t pos) const
{
    size_t first = rfind(AT);
    size_t result = ALL_IMAGES;
    if (first != npos)
    {
        std::vector<String> prefixes;
        size_t nPref = splitString(substr(0, first),",",prefixes, false);

        if (pos > nPref-1)
            REPORT_ERROR(ERR_ARG_INCORRECT, formatString("getPrefixNumber: Selected %lu position greater than %lu positions \n"
                         " detected in %s filename.",pos+1, nPref, this->c_str()));

        if (isdigit(prefixes[pos].at(0)))
            result = textToSizeT(prefixes[pos].c_str());
    }
    return result;
}
开发者ID:I2PC,项目名称:scipion,代码行数:19,代码来源:xmipp_filename.cpp


示例8: REPORT_ERROR

void EditProfilesDialog::onRenameProfileClicked()
{
	QListWidgetItem *listItem = ui.lstProfiles->selectedItems().value(0);
	if (listItem)
	{
		bool ok;
		QString profile = listItem->text();
		QString newname = QInputDialog::getText(this,tr("Rename Profile"),tr("Enter new name for profile:"),QLineEdit::Normal,QString::null,&ok);
		if (ok && !newname.isEmpty())
		{
			if (!FOptionsManager->renameProfile(profile, newname))
			{
				REPORT_ERROR("Failed to rename profile");
				QMessageBox::warning(this,tr("Error"),tr("Failed to rename profile"));
			}
		}
	}
}
开发者ID:RoadWorksSoftware,项目名称:eyecu-qt,代码行数:18,代码来源:editprofilesdialog.cpp


示例9: SetFilePointer

void FileLock::unlock()
{
    if (islocked)
    {
#ifdef __MINGW32__
        HANDLE hFile = (HANDLE)_get_osfhandle(filenum);
        DWORD dwLastPos = SetFilePointer(hFile, 0, NULL, FILE_END);
        if (UnlockFile(hFile, 0, 0, dwLastPos, 0) != NULL)
            REPORT_ERROR(ERR_IO_LOCKED,"File cannot be unlocked.");
#else

        fl.l_type = F_UNLCK;
        fcntl(filenum, F_SETLK, &fl);
#endif

        islocked = false;
    }
}
开发者ID:I2PC,项目名称:scipion,代码行数:18,代码来源:xmipp_filename.cpp


示例10: read

	void read(int argc, char **argv)
	{

		parser.setCommandLine(argc, argv);

		int general_section = parser.addSection("General options");
	    fn_star = parser.getOption("--i", "Input STAR file with the images (as rlnImageName) to be saved in a stack");
	    fn_root = parser.getOption("--o", "Output rootname","output");
	    do_spider  = parser.checkOption("--spider_format", "Write out in SPIDER stack format (by default MRC stack format)");
	    do_split_per_micrograph = parser.checkOption("--split_per_micrograph", "Write out separate stacks for each micrograph (needs rlnMicrographName in STAR file)");
	    do_apply_trans = parser.checkOption("--apply_transformation", "Apply the inplane-transformations (needs _rlnOriginX/Y and _rlnAnglePsi in STAR file)");

	    fn_ext = (do_spider) ? ".spi" : ".mrcs";

      	// Check for errors in the command-line option
    	if (parser.checkForErrors())
    		REPORT_ERROR("Errors encountered on the command line, exiting...");
	}
开发者ID:dtegunov,项目名称:vlion,代码行数:18,代码来源:stack_create.cpp


示例11: acpi_ut_resolve_package_references

acpi_status
acpi_ut_resolve_package_references (
	acpi_operand_object     *obj_desc)
{
	u32                     count;
	acpi_operand_object     *sub_object;


	FUNCTION_TRACE ("Ut_resolve_package_references");


	if (obj_desc->common.type != ACPI_TYPE_PACKAGE) {
		/* The object must be a package */

		REPORT_ERROR (("Must resolve Package Refs on a Package\n"));
		return_ACPI_STATUS(AE_ERROR);
	}

	/*
	 * TBD: what about nested packages? */

	for (count = 0; count < obj_desc->package.count; count++) {
		sub_object = obj_desc->package.elements[count];

		if (sub_object->common.type == INTERNAL_TYPE_REFERENCE) {
			if (sub_object->reference.opcode == AML_ZERO_OP) {
				sub_object->common.type = ACPI_TYPE_INTEGER;
				sub_object->integer.value = 0;
			}

			else if (sub_object->reference.opcode == AML_ONE_OP) {
				sub_object->common.type = ACPI_TYPE_INTEGER;
				sub_object->integer.value = 1;
			}

			else if (sub_object->reference.opcode == AML_ONES_OP) {
				sub_object->common.type = ACPI_TYPE_INTEGER;
				sub_object->integer.value = ACPI_INTEGER_MAX;
			}
		}
	}

	return_ACPI_STATUS(AE_OK);
}
开发者ID:TKr,项目名称:Wive-ng-rt8186,代码行数:44,代码来源:utmisc.c


示例12: javanotify_install_midlet_wparams

/**
 * A notification function for telling Java to perform installation of
 * a MIDlet with parameters
 *
 * If the given url is of the form http://www.sun.com/a/b/c/d.jad then
 * java will start a graphical installer will download the MIDlet
 * fom the internet.
 * If the given url is a file url (see below, file:///a/b/c/d.jar or
 * file:///a/b/c/d/jad) installation will be performed
 * in the backgroudn without launching the graphic installer application
 *
 *
 * @param url of MIDlet to install, can be either one of the following
 *   1. A full path to the jar file, of the following form file:///a/b/c/d.jar
 *   2. A full path to the JAD file, of the following form file:///a/b/c/d.jad
 *   3. An http url of jad file, of the following form,
 *      http://www.sun.com/a/b/c/d.jad
 * @param silentInstall install the MIDlet without user interaction
 * @param forceUpdate install the MIDlet even if it already exist regardless
 *                    of version
 */
void javanotify_install_midlet_wparams(const char* httpUrl,
                                       int silentInstall, int forceUpdate) {
    int argc = 0;
    char *argv[MIDP_RUNMIDLET_MAXIMUM_ARGS];
    javacall_result res;
    int length;

    REPORT_INFO2(LC_CORE,"javanotify_install_midlet_wparams() >> "
                         "httpUrl = %s, silentInstall = %d\n",
                 httpUrl, silentInstall);

    JVM_Initialize();

    if (initialize_memory_slavemode() != JAVACALL_OK) {
        return;
    }

    argv[argc++] = "runMidlet";
    argv[argc++] = "-1";
    argv[argc++] = "com.sun.midp.installer.GraphicalInstaller";

    if (silentInstall == 1) {
        if (forceUpdate == 1) {
            argv[argc++] = "FU";
        } else {
            argv[argc++] = "FI";
        }
    } else {
        argv[argc++] = "I";
    }

    length = strlen(httpUrl);
    if (length >= BINARY_BUFFER_MAX_LEN) {
        REPORT_ERROR(LC_AMS, "javanotify_install_midlet_wparams(): httpUrl is too long");
        return;
    }

    memset(urlAddress, 0, BINARY_BUFFER_MAX_LEN);
    memcpy(urlAddress, httpUrl, length);
    argv[argc++] = urlAddress;

    javacall_lifecycle_state_changed(JAVACALL_LIFECYCLE_MIDLET_STARTED, JAVACALL_OK);
    res = runMidlet(argc, argv);
}
开发者ID:Sektor,项目名称:phoneme-qtopia,代码行数:65,代码来源:javanotify_lifecycle.c


示例13: kaiser_proj

/* Value of line integral through Kaiser-Bessel radial function
   (n >=2 dimensions) at distance s from center of function.
   Parameter m = 0, 1, or 2. */
double kaiser_proj(double s, double a, double alpha, int m)
{
    double sda, sdas, w, arg, p;

    sda = s / a;
    sdas = sda * sda;
    w = 1.0 - sdas;
    if (w > 1.0e-10)
    {
        arg = alpha * sqrt(w);
        if (m == 0)
        {
            if (alpha == 0.0)
                p = 2.0 * a * sqrt(w);
            else
                p = (2.0 * a / alpha) * sinh(arg) / bessi0(alpha);

        }
        else if (m == 1)
        {
            if (alpha == 0.0)
                p = 2.0 * a * w * sqrt(w) * (2.0 / 3.0);
            else
                p = (2.0 * a / alpha) * sqrt(w) * (cosh(arg) - sinh(arg) / arg)
                    / bessi1(alpha);

        }
        else if (m == 2)
        {
            if (alpha == 0.0)
                p = 2.0 * a * w * w * sqrt(w) * (8.0 / 15.0);
            else
                p = (2.0 * a / alpha) * w *
                    ((3.0 / (arg * arg) + 1.0) * sinh(arg) - (3.0 / arg) * cosh(arg)) / bessi2(alpha);
        }
        else
            REPORT_ERROR(ERR_VALUE_INCORRECT, "m out of range in kaiser_proj()");

    }
    else
        p = 0.0;

    return p;
}
开发者ID:josegutab,项目名称:scipion,代码行数:47,代码来源:blobs.cpp


示例14: while

// Produce side info =====================================================
void ProgClassifyCL2DCore::produceSideInfo()
{
    // Get maximum CL2D level
    maxLevel=0;
    FileName fnLevel;
    do
        fnLevel=formatString("%s/level_%02d/%s_classes.xmd",fnODir.c_str(),maxLevel++,fnRoot.c_str());
    while (fnLevel.exists());
    maxLevel-=2;
    if (maxLevel==-1)
        REPORT_ERROR(ERR_ARG_MISSING,"Cannot find any CL2D analysis in the directory given");

    // Read all the blocks available in all MetaData
    StringVector blocksAux;
    CL2DBlock block;
    for (int level=0; level<=maxLevel; level++)
    {
        fnLevel=formatString("%s/level_%02d/%s_classes.xmd",fnODir.c_str(),level,fnRoot.c_str());
        getBlocksInMetaDataFile(fnLevel,blocksAux);
        block.level=level;
        block.fnLevel=fnLevel;
        block.fnLevelCore=fnLevel.insertBeforeExtension("_core");
        for (size_t i=0; i<blocksAux.size(); i++)
        {
            if (blocksAux[i].find("class")!=std::string::npos && 
                blocksAux[i].find("images")!=std::string::npos)
            {
                block.block=blocksAux[i];
                blocks.push_back(block);
            }
        }
    }

    // Create a task file distributor for all blocks
    size_t Nblocks=blocks.size();
    taskDistributor=new MpiTaskDistributor(Nblocks,1,node);

    // Get image dimensions
    if (Nblocks>0)
    {
        size_t Zdim, Ndim;
        getImageSizeFromFilename(blocks[0].block+"@"+blocks[0].fnLevel,Xdim,Ydim,Zdim,Ndim);
    }
}
开发者ID:I2PC,项目名称:scipion,代码行数:45,代码来源:mpi_classify_CL2D_core_analysis.cpp


示例15: DbgSetRopFlag

STATUS
DbgSetRopFlag(
	VOID
	)
{
    ERRORINFO err;

	/* set the ROP flag */
	bRopDetected = TRUE;

	/* init log path */
	if ( InitLogPath( MCEDP_REGCONFIG.LOG_PATH, MAX_PATH ) != MCEDP_STATUS_SUCCESS )
	{
		REPORT_ERROR("InitLogPath()", &err);
		return MCEDP_STATUS_GENERAL_FAIL;
	}

	return MCEDP_STATUS_SHELLCODE_FLAG_SET;
}
开发者ID:ltfish,项目名称:Pwnypot,代码行数:19,代码来源:RopDetection.cpp


示例16: sprintf

/**
 * Refreshs screen with offscreen buffer content and
 * returns new offscreen buffer for painting
 */
char *directfbapp_refresh(int x1, int y1, int x2, int y2) {
    int pitch;
    char *dst;
    int width;
    DFBRegion reg;

    /* DEBUG: to be deleted after debugging */
    if (x1 < 0 || x2 < 0 || y1 < 0 || y2 < 0 ||
            x1 > screen_width || x2 > screen_width ||
            y1 > screen_height || y2 > screen_height) {
        char b[50];
        sprintf(b, "%d %d %d %d", x1, x2, y1, y2);
        REPORT_ERROR1(LC_LOWUI, "Invalid rectangle for refresh: %s", b);
        // TODO: Should be fixed to return the current back buffer 
        return NULL;
    }

    if (x1 >= x2) {
        width = sizeof(gxj_pixel_type);
        x2 = x1 + 1;
    } else {
        width = (x2 - x1) * sizeof(gxj_pixel_type);
    }
    if (y1 >= y2) {
        y2 = y1 + 1;
    }
    reg.x1 = x1;
    reg.y1 = y1;
    reg.x2 = x2;
    reg.y2 = y2;

    DFBCHECK(screen->Unlock(screen));
    DFBCHECK(screen->Flip(screen, &reg, DSFLIP_BLIT));
    DFBCHECK(screen->Lock(screen, DSLF_WRITE, (void **)(void *)&dst, &pitch));
    if (pitch != (int)sizeof(gxj_pixel_type) * screen_width) {
        REPORT_ERROR(LC_LOWUI,
            "Invalid pixel format: Supports only 16-bit, 5:6:5 display");
        goto dfb_err;
    }
    return dst;
dfb_err:
    return NULL;
}
开发者ID:jiangxilong,项目名称:yari,代码行数:47,代码来源:directfbapp_export.c


示例17: sizeof

size_t FileName::getFileSize() const
{
    Stat info;
    if (stat(c_str(), &info))
    {
        char cCurrentPath[FILENAME_MAX];
        char *success=getcwd(cCurrentPath, sizeof(cCurrentPath));
        if (success==NULL)
        	cCurrentPath[0]='\0';
        REPORT_ERROR(ERR_UNCLASSIFIED,formatString("FileName::getFileSize: Cannot get size of file %s/%s",cCurrentPath,this->c_str()));
    }
    return info.st_size;

//    int fd = open(c_str(), O_RDONLY);
//    size_t size = lseek(fd, 0, SEEK_END); // seek to end of file
//    close(fd);
//
//    return size;

}
开发者ID:I2PC,项目名称:scipion,代码行数:20,代码来源:xmipp_filename.cpp


示例18: read

	void read(int argc, char **argv)
	{

		parser.setCommandLine(argc, argv);

		int general_section = parser.addSection("General options");
	    fn1 = parser.getOption("--i1", "1st input STAR file ");
	    fn2 = parser.getOption("--i2", "2nd input STAR file ");
	    fn_both = parser.getOption("--both", "Output STAR file with entries from both input STAR files ", "");
	    fn_only1 = parser.getOption("--only1", "Output STAR file with entries that only occur in the 1st input STAR files ", "");
	    fn_only2 = parser.getOption("--only2", "Output STAR file with entries that only occur in the 2nd input STAR files ", "");
	    fn_label1 = parser.getOption("--label1", "1st metadata label for the comparison (may be string, int or DOUBLE)", "");
	    fn_label2 = parser.getOption("--label2", "2nd metadata label for the comparison (DOUBLE only) for 2D/3D-distance)", "");
	    fn_label3 = parser.getOption("--label3", "3rd metadata label for the comparison (DOUBLE only) for 3D-distance)", "");
	    eps = textToFloat(parser.getOption("--max_dist", "Maximum distance to consider a match (for int and DOUBLE only)", "0."));

      	// Check for errors in the command-line option
    	if (parser.checkForErrors())
    		REPORT_ERROR("Errors encountered on the command line, exiting...");
	}
开发者ID:dtegunov,项目名称:vlion,代码行数:20,代码来源:star_compare.cpp


示例19: if

bool SocksStreams::appendLocalConnection(const QString &AKey)
{
	if (!AKey.isEmpty() && !FLocalKeys.contains(AKey))
	{
		if (FServer.isListening() || FServer.listen(QHostAddress::Any, listeningPort()))
		{
			FLocalKeys.append(AKey);
			return true;
		}
		else if (!FServer.isListening())
		{
			LOG_ERROR(QString("Failed to append local socks connection, port=%1: %2").arg(listeningPort()).arg(FServer.errorString()));
		}
	}
	else if (AKey.isEmpty())
	{
		REPORT_ERROR("Failed to append local socks connection: Key is empty");
	}
	return false;
}
开发者ID:sanchay160887,项目名称:vacuum-im,代码行数:20,代码来源:socksstreams.cpp


示例20: REPORT_ERROR

void MetaDataTable::setObject(MetaDataContainer * data, long int objectID)
{

	long int idx = (objectID == -1) ? current_objectID : objectID;

#ifdef DEBUG_CHECKSIZES
	if (idx >= objects.size())
		REPORT_ERROR("MetaDataTable::setObject: idx >= objects.size()");
#endif

        // First delete old container if it exists
        if (this->objects[idx])
        {
        	this->objects[idx]->clear();
        	delete this->objects[idx];
        }
	this->objects[idx] = new MetaDataContainer(*data);

	// Set all the labels from the data MDC as active
	std::vector<EMDLabel>::iterator location;
	std::vector<EMDLabel> newlabels;
	newlabels = data->getLabels();
	for (int i = 0; i < newlabels.size(); i++)
	{
		EMDLabel label = newlabels[i];
		location = std::find(activeLabels.begin(), activeLabels.end(), label);
		if (location == activeLabels.end())
		{
			activeLabels.push_back(label);

            // Add this label with default values to the rest of the objects in this class
            for (long int idx2 = 0; idx2 < objects.size(); idx2++ )
            {
               if (idx2 != idx)
              	objects[idx2]->addDefaultValue(label);
            }
		}
	}


}
开发者ID:dtegunov,项目名称:vlion,代码行数:41,代码来源:metadata_table.cpp



注:本文中的REPORT_ERROR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ REPORT_INFO1函数代码示例发布时间:2022-05-30
下一篇:
C++ REPLACE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap