当前位置: 首页>>代码示例>>C++>>正文


C++ SetDescription函数代码示例

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


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

示例1: poFeatureDefn

OGRHTFMetadataLayer::OGRHTFMetadataLayer(std::vector<CPLString> aosMDIn) :
    poFeatureDefn(new OGRFeatureDefn( "metadata" )),
    aosMD(aosMDIn),
    nNextFID(0)
{
    SetDescription( poFeatureDefn->GetName() );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone  );

    std::vector<CPLString>::const_iterator oIter = aosMD.begin();
    std::vector<CPLString>::const_iterator oEndIter = aosMD.end();
    while(oIter != oEndIter)
    {
        const CPLString& osStr = *oIter;
        char* pszStr = CPLStrdup(osStr.c_str());
        char* pszSep = strstr(pszStr, ": ");
        if (pszSep)
        {
            *pszSep = 0;
            int i = 0, j = 0;
            for(;pszStr[i];i++)
            {
                if (pszStr[i] == ' ' || pszStr[i] == '-' || pszStr[i] == '&')
                {
                    if (j > 0 && pszStr[j-1]  == '_')
                        continue;
                    pszStr[j++] = '_';
                }
                else if (pszStr[i] == '(' || pszStr[i] == ')')
                    ;
                else
                    pszStr[j++] = pszStr[i];
            }
            pszStr[j] = 0;
            OGRFieldDefn    oField( pszStr, OFTString);
            poFeatureDefn->AddFieldDefn( &oField );
        }
        CPLFree(pszStr);
        ++oIter;
    }

    poFeature = new OGRFeature(poFeatureDefn);
    oIter = aosMD.begin();
    oEndIter = aosMD.end();
    int nField = 0;
    while(oIter != oEndIter)
    {
        const CPLString& osStr = *oIter;
        const char* pszStr = osStr.c_str();
        const char* pszSep = strstr(pszStr, ": ");
        if (pszSep)
        {
            if (pszSep[2] != '*')
                poFeature->SetField( nField, pszSep + 2 );

            nField ++;
        }
        ++oIter;
    }
}
开发者ID:bbradbury,项目名称:lib_gdal,代码行数:60,代码来源:ogrhtflayer.cpp

示例2: SetPriority

/************************************************************************************************
 * CRMObjective::CRMObjective
 *	Constructs a random mission objective and fills in the default properties
 *
 * inputs:
 *  none
 *
 * return:
 *	none
 *
 ************************************************************************************************/
CRMObjective::CRMObjective ( CGPGroup* group )
{	
	SetPriority(atoi(group->FindPairValue("priority", "0")));
	SetMessage( group->FindPairValue("message",va("Objective %i Completed", GetPriority()) ) );
	SetDescription(group->FindPairValue("description",va("Objective %i", GetPriority()) ) );
	SetInfo(group->FindPairValue("info",va("Info %i", GetPriority()) ) );
	SetTrigger(group->FindPairValue("trigger",""));
	SetName(group->GetName());
	
/*	const char * soundPath = group->FindPairValue("completed_sound", "" ); 
	if (soundPath)
		mCompleteSoundID = G_SoundIndex(soundPath); 
*/

	mCompleted  = false;
	mOrderIndex = -1;

	// If no priority was specified for this objective then its active by default.
	if ( GetPriority ( ) )
	{
		mActive	= false;
	}
	else
	{
		mActive = true;
	}
}
开发者ID:Hasimir,项目名称:jedi-academy-1,代码行数:38,代码来源:RM_Objective.cpp

示例3: SetMetadata

CPLErr VRTRasterBand::CopyCommonInfoFrom( GDALRasterBand * poSrcBand )

{
    SetMetadata( poSrcBand->GetMetadata() );
    const char* pszNBits = poSrcBand->GetMetadataItem("NBITS", "IMAGE_STRUCTURE");
    SetMetadataItem( "NBITS", pszNBits, "IMAGE_STRUCTURE" );
    const char* pszPixelType = poSrcBand->GetMetadataItem("PIXELTYPE", "IMAGE_STRUCTURE");
    SetMetadataItem( "PIXELTYPE", pszPixelType, "IMAGE_STRUCTURE" );
    SetColorTable( poSrcBand->GetColorTable() );
    SetColorInterpretation(poSrcBand->GetColorInterpretation());
    if( strlen(poSrcBand->GetDescription()) > 0 )
        SetDescription( poSrcBand->GetDescription() );

    int bSuccess;
    double dfNoData;
    dfNoData = poSrcBand->GetNoDataValue( &bSuccess );
    if( bSuccess )
        SetNoDataValue( dfNoData );

    SetOffset( poSrcBand->GetOffset() );
    SetScale( poSrcBand->GetScale() );
    SetCategoryNames( poSrcBand->GetCategoryNames() );
    if( !EQUAL(poSrcBand->GetUnitType(),"") )
        SetUnitType( poSrcBand->GetUnitType() );

    return CE_None;
}
开发者ID:Mavrx-inc,项目名称:gdal,代码行数:27,代码来源:vrtrasterband.cpp

示例4: OGRSpatialReference

OGRSUALayer::OGRSUALayer( VSILFILE* fp )

{
    fpSUA = fp;
    nNextFID = 0;
    bEOF = FALSE;
    bHasLastLine = FALSE;

    poSRS = new OGRSpatialReference(SRS_WKT_WGS84);

    poFeatureDefn = new OGRFeatureDefn( "layer" );
    SetDescription( poFeatureDefn->GetName() );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbPolygon );
    poFeatureDefn->GetGeomFieldDefn(0)->SetSpatialRef(poSRS);

    OGRFieldDefn    oField1( "TYPE", OFTString);
    poFeatureDefn->AddFieldDefn( &oField1 );
    OGRFieldDefn    oField2( "CLASS", OFTString);
    poFeatureDefn->AddFieldDefn( &oField2 );
    OGRFieldDefn    oField3( "TITLE", OFTString);
    poFeatureDefn->AddFieldDefn( &oField3 );
    OGRFieldDefn    oField4( "TOPS", OFTString);
    poFeatureDefn->AddFieldDefn( &oField4 );
    OGRFieldDefn    oField5( "BASE", OFTString);
    poFeatureDefn->AddFieldDefn( &oField5 );
}
开发者ID:Wedjaa,项目名称:node-gdal,代码行数:27,代码来源:ogrsualayer.cpp

示例5: SetDescription

cAction::cAction(const char *Id, cDevice *Device, const char *DevId)
{
  device=Device; devId=DevId;
  id=bprintf("%s %s",Id,DevId);
  unique=0; pri=-1;
  SetDescription("%s filter",id);
}
开发者ID:Saner2oo2,项目名称:descrambler,代码行数:7,代码来源:filter.c

示例6: SetName

/**
 * constructor, prepare parameters
 */
TMOMM16::TMOMM16()
{
	SetName(L"MM16");
	SetDescription(L"Co jsem si napsal");

	red.SetName(L"red");
	red.SetDescription(L"RED");
	red.SetDefault(0.299);
	red=0.299;
	red.SetRange(0.0,1.0);
	this->Register(red);

	green.SetName(L"green");
	green.SetDescription(L"GREEN");
	green.SetDefault(0.587);
	green=0.587;
	green.SetRange(0.0,1.0);
	this->Register(green);

	blue.SetName(L"blue");
	blue.SetDescription(L"BLUE");
	blue.SetDefault(0.114);
	blue=0.114;
	blue.SetRange(0.0,1.0);
	this->Register(blue);
	
	negative.SetName(L"neg");
	negative.SetDescription(L"Negative");
	negative.SetDefault(false);
	negative=false;	
	this->Register(negative);
}
开发者ID:cadik,项目名称:TMS,代码行数:35,代码来源:TMOMM16.cpp

示例7: OGRFeatureDefn

OGRNTFFeatureClassLayer::OGRNTFFeatureClassLayer( OGRNTFDataSource *poDSIn )

{
    poFilterGeom = NULL;

    poDS = poDSIn;

    iCurrentFC = 0;

/* -------------------------------------------------------------------- */
/*      Establish the schema.                                           */
/* -------------------------------------------------------------------- */
    poFeatureDefn = new OGRFeatureDefn( "FEATURE_CLASSES" );
    SetDescription( poFeatureDefn->GetName() );
    poFeatureDefn->SetGeomType( wkbNone );
    poFeatureDefn->Reference();

    OGRFieldDefn      oFCNum( "FEAT_CODE", OFTString );

    oFCNum.SetWidth( 4 );
    poFeatureDefn->AddFieldDefn( &oFCNum );
    
    OGRFieldDefn      oFCName( "FC_NAME", OFTString );

    oFCNum.SetWidth( 80 );
    poFeatureDefn->AddFieldDefn( &oFCName );
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:27,代码来源:ogrntffeatureclasslayer.cpp

示例8: SetDescription

//------------------------------------------------------------------------------
EStatus &  EStatus::operator=  (const EStatus &  statIn)
  {
  eStatusCode = statIn.eStatusCode;

  SetDescription  (statIn.pstrDescription == NULL ? NULL : statIn.pstrDescription->AsChar ());

  return *this;
  };
开发者ID:mduffor,项目名称:tedit,代码行数:9,代码来源:Types.cpp

示例9: isyslog

cDBusOsdProvider::cDBusOsdProvider(cDBusObject *Object)
{
  _provider = this;
  _object = Object;
  isyslog("dbus2vdr: new DBus-OSD-provider");
  SetDescription("dbus2vdr: osd-provider signal");
  Start();
}
开发者ID:netbja,项目名称:vdr-plugin-dbus2vdr,代码行数:8,代码来源:osd.c

示例10: OGRCARTODBLayer

OGRCARTODBResultLayer::OGRCARTODBResultLayer( OGRCARTODBDataSource* poDS,
                                              const char * pszRawQueryIn ) :
                                              OGRCARTODBLayer(poDS)
{
    osBaseSQL = pszRawQueryIn;
    SetDescription( "result" );
    poFirstFeature = NULL;
}
开发者ID:AbdelghaniDr,项目名称:mirror,代码行数:8,代码来源:ogrcartodbresultlayer.cpp

示例11: OGRAmigoCloudLayer

OGRAmigoCloudResultLayer::OGRAmigoCloudResultLayer(
    OGRAmigoCloudDataSource* poDSIn,
    const char * pszRawQueryIn ) :
    OGRAmigoCloudLayer(poDSIn)
{
    osBaseSQL = pszRawQueryIn;
    SetDescription( "result" );
    poFirstFeature = nullptr;
}
开发者ID:OSGeo,项目名称:gdal,代码行数:9,代码来源:ogramigocloudresultlayer.cpp

示例12: SetDescription

CPL_C_END

/* ******************************************************************** */
/*                     GDALProxyPoolDataset                             */
/* ******************************************************************** */

GDALProxyPoolDataset::GDALProxyPoolDataset(const char* pszSourceDatasetDescription,
                                   int nRasterXSize, int nRasterYSize,
                                   GDALAccess eAccess, int bShared,
                                   const char * pszProjectionRef,
                                   double * padfGeoTransform)
{
    GDALDatasetPool::Ref();

    SetDescription(pszSourceDatasetDescription);

    this->nRasterXSize = nRasterXSize;
    this->nRasterYSize = nRasterYSize;
    this->eAccess = eAccess;

    this->bShared = bShared;

    this->responsiblePID = GDALGetResponsiblePIDForCurrentThread();

    if (pszProjectionRef)
    {
        this->pszProjectionRef = NULL;
        bHasSrcProjection = FALSE;
    }
    else
    {
        this->pszProjectionRef = CPLStrdup(pszProjectionRef);
        bHasSrcProjection = TRUE;
    }
    if (padfGeoTransform)
    {
        memcpy(adfGeoTransform, padfGeoTransform,6 * sizeof(double));
        bHasSrcGeoTransform = TRUE;
    }
    else
    {
        adfGeoTransform[0] = 0;
        adfGeoTransform[1] = 1;
        adfGeoTransform[2] = 0;
        adfGeoTransform[3] = 0;
        adfGeoTransform[4] = 0;
        adfGeoTransform[5] = 1;
        bHasSrcGeoTransform = FALSE;
    }

    pszGCPProjection = NULL;
    nGCPCount = 0;
    pasGCPList = NULL;
    metadataSet = NULL;
    metadataItemSet = NULL;
    cacheEntry = NULL;
}
开发者ID:Chaduke,项目名称:bah.mod,代码行数:57,代码来源:gdalproxypool.cpp

示例13: temp

void CTaskModel::SetAttributes(unsigned __int64 parentID, const TCHAR *pTitle, const TCHAR *pDesc, int priority, 
		unsigned __int64 start, unsigned __int64 due, const TCHAR *pOwner, TASK_STATE state, 
		unsigned __int64 estimate, const TCHAR *pAssignee, unsigned __int64 assigned, unsigned __int64 modified, 
		const TCHAR *pGroup)
{
	if(!m_pNode)DebugBreak();
	StringBuffer temp(32);
	SetAttribute(PARENTID, ModelUtils::toHexString(parentID, temp));
	temp.flush();
	if(pTitle)
	{
		SetTitle(pTitle);
	}
	if(pDesc)
	{
		SetDescription(pDesc, false);
	}
	if(pOwner)
	{
		//TODO: review setting of pOwner, is there a reason not to set this value?
		SetOwner(pOwner);
	}
	temp.appendInt(priority);
	SetAttribute(PRIORITY, temp);
	temp.flush();
	temp.appendInt(static_cast<int>(state));
	SetAttribute(STATE, temp);
	temp.flush();
	SetAttribute(ESTIMATE, ModelUtils::toHexString(estimate, temp));
	temp.flush();
	SetAttribute(DUE, ModelUtils::toHexString(due, temp));
	temp.flush();
	SetAttribute(START, ModelUtils::toHexString(start, temp));
	temp.flush();
	SetAttribute(ASSIGNED, ModelUtils::toHexString(assigned, temp));
	temp.flush();
	//TODO: figure out what this is doing...
	TaskEvent::ChangeType ct = TaskEvent::AllAttributesNoNetwork;
	if(modified)
	{
		SetAttribute(MODIFIED, modified);
	}
	else
	{
		ct = TaskEvent::AllAttributes;
		SetAttribute(MODIFIED, ModelUtils::CurrentUTC());
	}
	SetAttribute(GROUP, pGroup? pGroup: XMLHelper::EMPTY_STR);
	if(pAssignee)
	{
		SetAttribute(ASSIGNEE, pAssignee);
	}

//TODO: what is the no network value for??
	TaskEvent te(TaskEvent::AllAttributes, m_id);
	notifyTaskListeners(&te);
}
开发者ID:jaylauffer,项目名称:loadngo,代码行数:57,代码来源:TaskModel.cpp

示例14: SetDescription

cThread::cThread(const char *Description)
{
  active = running = false;
  childTid = 0;
  childThreadId = 0;
  description = NULL;
  if (Description)
     SetDescription("%s", Description);
}
开发者ID:suborb,项目名称:reelvdr,代码行数:9,代码来源:thread.c

示例15: PassiveLogSource

ProcessReader::ProcessReader(Timer& timer, ILineBuffer& linebuffer, const std::wstring& pathName, const std::wstring& args) :
	PassiveLogSource(timer, SourceType::Pipe, linebuffer, 40),
	m_process(pathName, args),
	m_stdout(timer, linebuffer, m_process.GetStdOut(), m_process.GetProcessId(), Str(m_process.GetName()).str() + ":stdout", 0),
	m_stderr(timer, linebuffer, m_process.GetStdErr(), m_process.GetProcessId(), Str(m_process.GetName()).str() + ":stderr", 0)
{
	SetDescription(m_process.GetName() + L" stdout/stderr");
	StartThread();
}
开发者ID:rkrijnen,项目名称:DebugViewPP,代码行数:9,代码来源:ProcessReader.cpp


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