您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CloneString函数代码示例

51自学网 2021-06-01 20:11:34
  C++
这篇教程C++ CloneString函数代码示例写得很实用,希望能帮到您。

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

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

示例1: CPipeResult

CPipeConnectSuccResult::CPipeConnectSuccResult(	int32 nPipeId, uint32 uSessionID, 	const CAddress& LocalAddr, 	const CAddress& RemoteAddr, CPipeThread* pThread)	: CPipeResult(nPipeId, uSessionID){	m_szLocalAddr = CloneString(LocalAddr.GetAddress(), pThread);	m_uLocalPort = LocalAddr.GetPort();	m_szRemoteAddr = CloneString(RemoteAddr.GetAddress(), pThread);	m_uRemotePort = RemoteAddr.GetPort();}
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:12,


示例2: CloneFieldDef

bool CloneFieldDef(const char* sLogName, CRdbFieldDef* &pDstFieldDefines, CRdbFieldDef* pSrcFieldDefines, uint32 nFieldCount){	uint32 i;	pDstFieldDefines = NULL;	if(nFieldCount)	{		pDstFieldDefines = new CRdbFieldDef[nFieldCount];		if(!pDstFieldDefines)		{			FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneFieldDef(%s): RDB_LACK_MEMORY"));			return false;		}		CBinary::MemorySet(pDstFieldDefines, 0, nFieldCount*sizeof(CRdbFieldDef));		for(i=0; i<nFieldCount; ++i)		{			pDstFieldDefines[i] = pSrcFieldDefines[i];			pDstFieldDefines[i].nJob = 1;			pDstFieldDefines[i].sFieldName = CloneString(sLogName, pSrcFieldDefines[i].sFieldName);			pDstFieldDefines[i].sDefault = NULL;			char * sDefault = pSrcFieldDefines[i].sDefault;			if(sDefault && sDefault[0])				pDstFieldDefines[i].sDefault = CloneString(sLogName, sDefault);			if(!pDstFieldDefines[i].sFieldName || 				(!pDstFieldDefines[i].sDefault && sDefault))			{				FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneFieldDef(%s): RDB_LACK_MEMORY", pSrcFieldDefines[i].sFieldName));				if(pDstFieldDefines[i].sFieldName)					delete[] pDstFieldDefines[i].sFieldName;				if(pDstFieldDefines[i].sDefault)					delete[] pDstFieldDefines[i].sDefault;				for(uint32 j=0; j<i; ++i)					FreeFieldDefine(pDstFieldDefines[j]);				delete[] pDstFieldDefines;				pDstFieldDefines = NULL;				return false;			}		}		for(i=0; i<nFieldCount; ++i)		{			if(CorrectFieldAttr(sLogName, pDstFieldDefines+i))			{				FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneFieldDef(%s) Failure", pDstFieldDefines[i].sFieldName));				for(i=0; i<nFieldCount; ++i)					FreeFieldDefine(pDstFieldDefines[i]);				delete[] pDstFieldDefines;				pDstFieldDefines = NULL;				return false;			}		}	}	return true;}
开发者ID:nightstyles,项目名称:focp,代码行数:52,


示例3: CloneString

CPipeAcceptedResult::CPipeAcceptedResult(int32 nPipeId,uint32 uSessionID, int32 newPipeId, uint32 threadId, 										 uint32 oldthreadid, IPipe* pPipe, const CAddress& LocalAddr, const CAddress& RemoteAddr, CPipeThread* pThread)										 :CPipeResult(nPipeId, uSessionID){	m_szLocalAddr = CloneString( LocalAddr.GetAddress(), pThread );	m_uLocalPort = LocalAddr.GetPort();	m_szRemoteAddr = CloneString( RemoteAddr.GetAddress(), pThread );	m_uRemotePort = RemoteAddr.GetPort();	m_pPipe = pPipe;	m_uOldThreadId = oldthreadid;	m_nNewPipeID = newPipeId;	m_uThreadId = threadId;}
开发者ID:LaoZhongGu,项目名称:RushGame,代码行数:15,


示例4: SplitStringByWhitespace

STRING_LIST*SplitStringByWhitespace (    IN CHAR8       *String)/*++Routine Description:  Creates and returns a 'split' STRING_LIST by splitting the string  on whitespace boundaries.Arguments:  String          The string to 'split'Returns:  EFI_STATUS--*/{    CHAR8       *Pos;    CHAR8       *EndOfSubString;    CHAR8       *EndOfString;    STRING_LIST *Output;    UINTN       Item;    String = CloneString (String);    if (String == NULL) {        return NULL;    }    EndOfString = String + strlen (String);    Output = NewStringList ();    for (Pos = String, Item = 0; Pos < EndOfString; Item++) {        while (isspace ((int)*Pos)) {            Pos++;        }        for (EndOfSubString=Pos;                (*EndOfSubString != '/0') && !isspace ((int)*EndOfSubString);                EndOfSubString++            ) {        }        if (EndOfSubString == Pos) {            break;        }        *EndOfSubString = '/0';        AppendCopyOfStringToList (&Output, Pos);        Pos = EndOfSubString + 1;    }    free (String);    return Output;}
开发者ID:jeppeter,项目名称:vbox,代码行数:60,


示例5: RelinquishMagickMemory

void Magick::Options::density(const Point &density_){  if (!density_.isValid())    _imageInfo->density=(char *) RelinquishMagickMemory(_imageInfo->density);  else   CloneString(&_imageInfo->density,density_);}
开发者ID:riingo,项目名称:ImageMagick,代码行数:7,


示例6: main

int main ( int argc, char **argv ){  Image *canvas = (Image *)NULL;  char outfile[MaxTextExtent];  int rows, columns = 0;  char size[MaxTextExtent];  ImageInfo *image_info;  ExceptionInfo exception;  if ( argc != 2 )    {      (void) printf ( "Usage: %s filename/n", argv[0] );      exit( 1 );    }  outfile[MaxTextExtent-1]='/0';  (void) strncpy( outfile, argv[1], MaxTextExtent-1 );  if (LocaleNCompare("drawtest",argv[0],7) == 0)    InitializeMagick((char *) NULL);  else    InitializeMagick(*argv);  /*   * Create canvas image   */  columns=596;  rows=842;  image_info=CloneImageInfo((ImageInfo*)NULL);  GetExceptionInfo( &exception );  FormatString(size, "%dx%d", columns, rows);  (void) CloneString(&image_info->size, size);  (void) strcpy( image_info->filename, "xc:white");  canvas = ReadImage ( image_info, &exception );  if (exception.severity != UndefinedException)    CatchException(&exception);  if ( canvas == (Image *)NULL )    {      (void) printf ( "Failed to read canvas image %s/n", image_info->filename );      exit(1);    }  /*   * Scribble on image   */  ScribbleImage( canvas );  /*   * Save image to file   */  canvas->filename[MaxTextExtent-1]='/0';  (void) strncpy( canvas->filename, outfile, MaxTextExtent-1);  (void) WriteImage ( image_info, canvas );  DestroyExceptionInfo( &exception );  DestroyImage( canvas );  DestroyImageInfo( image_info );  DestroyMagick();  return 0;}
开发者ID:CliffsDover,项目名称:graphicsmagick,代码行数:60,


示例7: MagickQueryMultilineFontMetrics

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                                                                             %%                                                                             %%                                                                             %%   M a g i c k Q u e r y M u l t i l i n e F o n t M e t r i c s             %%                                                                             %%                                                                             %%                                                                             %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  MagickQueryMultilineFontMetrics() returns a 13 element array representing the%  following font metrics:%%    Element Description%    -------------------------------------------------%          0 character width%          1 character height%          2 ascender%          3 descender%          4 text width%          5 text height%          6 maximum horizontal advance%          7 bounding box: x1%          8 bounding box: y1%          9 bounding box: x2%         10 bounding box: y2%         11 origin: x%         12 origin: y%%  This method is like MagickQueryFontMetrics() but it returns the maximum text%  width and height for multiple lines of text.%%  The format of the MagickQueryFontMetrics method is:%%      double *MagickQueryMultilineFontMetrics(MagickWand *wand,%        const DrawingWand *drawing_wand,const char *text)%%  A description of each parameter follows:%%    o wand: the Magick wand.%%    o drawing_wand: the drawing wand.%%    o text: the text.%*/WandExport double *MagickQueryMultilineFontMetrics(MagickWand *wand,  const DrawingWand *drawing_wand,const char *text){  double    *font_metrics;  DrawInfo    *draw_info;  MagickBooleanType    status;  TypeMetric    metrics;  assert(wand != (MagickWand *) NULL);  assert(wand->signature == WandSignature);  if (wand->debug != MagickFalse)    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);  assert(drawing_wand != (const DrawingWand *) NULL);  if (wand->images == (Image *) NULL)    {      (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,        "ContainsNoImages","`%s'",wand->name);      return((double *) NULL);    }  font_metrics=(double *) AcquireQuantumMemory(13UL,sizeof(*font_metrics));  if (font_metrics == (double *) NULL)    return((double *) NULL);  draw_info=PeekDrawingWand(drawing_wand);  if (draw_info == (DrawInfo *) NULL)    {      font_metrics=(double *) RelinquishMagickMemory(font_metrics);      return((double *) NULL);    }  (void) CloneString(&draw_info->text,text);  (void) ResetMagickMemory(&metrics,0,sizeof(metrics));  status=GetMultilineTypeMetrics(wand->images,draw_info,&metrics,    wand->exception);  draw_info=DestroyDrawInfo(draw_info);  if (status == MagickFalse)    {      font_metrics=(double *) RelinquishMagickMemory(font_metrics);      return((double *) NULL);    }  font_metrics[0]=metrics.pixels_per_em.x;  font_metrics[1]=metrics.pixels_per_em.y;  font_metrics[2]=metrics.ascent;  font_metrics[3]=metrics.descent;  font_metrics[4]=metrics.width;  font_metrics[5]=metrics.height;  font_metrics[6]=metrics.max_advance;  font_metrics[7]=metrics.bounds.x1;//.........这里部分代码省略.........
开发者ID:saitoha,项目名称:ImageMagick-V7-SIXEL,代码行数:101,


示例8: CloneString

char * RString::GetBuffer(void){	if(RefCount() > 0)	{		CloneString();		return myString;	}	return myString; //are we sure this is safe?}
开发者ID:rezalas,项目名称:riftshadow,代码行数:9,


示例9: CloneString

LinuxEcatHardware::LinuxEcatHardware( const char *name ){   if( !name ) name = "eth0";   fd = -1;   ifname = CloneString( name );   SetRefName( "LinuxEcatHw" );}
开发者ID:DJGCrusader,项目名称:ParallelScissorManipulator,代码行数:9,


示例10: CloneIndexDef

bool CloneIndexDef(const char* sLogName, CRdbIndexDef & oDstIndexDef, CRdbIndexDef & oSrcIndexDef){	oDstIndexDef = oSrcIndexDef;	oDstIndexDef.sIndexName = CloneString(sLogName, oSrcIndexDef.sIndexName);	if(!oDstIndexDef.sIndexName)	{		FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneIndexDef: RDB_LACK_MEMORY"));		return false;	}	oDstIndexDef.sTableName = CloneString(sLogName, oSrcIndexDef.sTableName);	if(!oDstIndexDef.sTableName)	{		FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneIndexDef: RDB_LACK_MEMORY"));		delete[] oDstIndexDef.sIndexName;		return false;	}	if(oSrcIndexDef.sPrimaryIndex)	{		oDstIndexDef.sPrimaryIndex = CloneString(sLogName, oSrcIndexDef.sPrimaryIndex);		if(!oDstIndexDef.sPrimaryIndex)		{			FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneIndexDef: RDB_LACK_MEMORY"));			delete[] oDstIndexDef.sIndexName;			delete[] oDstIndexDef.sTableName;			return false;		}	}	if(oSrcIndexDef.pFieldList)	{		oDstIndexDef.pFieldList = CloneString(sLogName, oSrcIndexDef.pFieldList);		if(!oDstIndexDef.pFieldList)		{			FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneIndexDef: RDB_LACK_MEMORY"));			delete[] oDstIndexDef.sIndexName;			delete[] oDstIndexDef.sTableName;			if(oDstIndexDef.sPrimaryIndex)				delete[] oDstIndexDef.sPrimaryIndex;			return false;		}	}	oDstIndexDef.nIndexNo = oSrcIndexDef.nIndexNo;	oDstIndexDef.nStorageAddr = 0;	return true;}
开发者ID:nightstyles,项目名称:focp,代码行数:44,


示例11: Filesets_Restore_OnEndTask_LookupFileset

void Filesets_Restore_OnEndTask_LookupFileset (HWND hDlg, LPTASKPACKET ptp, LPSET_RESTORE_PARAMS psrp){   if (ptp)      {      psrp->lpi = (ptp->rc) ? TASKDATA(ptp)->lpi : NULL;      }   if (!psrp->lpi)      {      psrp->lpi = (LPIDENT)FL_GetSelectedData (GetDlgItem (hDlg, IDC_AGG_LIST));      }   BOOL fCreate = (psrp->lpi && psrp->lpi->fIsFileset()) ? FALSE : TRUE;   TCHAR szFileset[ cchNAME ];   GetDlgItemText (hDlg, IDC_RESTORE_SETNAME, szFileset, cchNAME);   LPTSTR pszText;   if (szFileset[0] == TEXT('/0'))      {      pszText = CloneString (TEXT(""));      }   else if (fCreate)      {      pszText = FormatString (IDS_RESTORE_CREATESET, TEXT("%s"), szFileset);      }   else      {      TCHAR szServer[ cchNAME ];      TCHAR szAggregate[ cchNAME ];      psrp->lpi->GetServerName (szServer);      psrp->lpi->GetAggregateName (szAggregate);      pszText = FormatString (IDS_RESTORE_OVERWRITESET, TEXT("%s%s%s"), szServer, szAggregate, szFileset);      }   SetDlgItemText (hDlg, IDC_RESTORE_CREATE, pszText);   FreeString (pszText);   EnableWindow (GetDlgItem (hDlg, IDC_RESTORE_SERVER), fCreate);   EnableWindow (GetDlgItem (hDlg, IDC_AGG_LIST), fCreate);   if (psrp->lpi)      {      LPIDENT lpiServer = (LPIDENT)CB_GetSelectedData (GetDlgItem (hDlg, IDC_RESTORE_SERVER));      if (psrp->lpi->GetServer() != lpiServer)         {         CB_SetSelectedByData (GetDlgItem (hDlg, IDC_RESTORE_SERVER), (LPARAM)psrp->lpi->GetServer());         Filesets_Restore_OnSelectServer (hDlg, psrp);         }      else if (!psrp->lpi->fIsServer())         {         FL_SetSelectedByData (GetDlgItem (hDlg, IDC_AGG_LIST), (LPARAM)psrp->lpi->GetAggregate());         }      }   Filesets_Restore_EnableOK (hDlg, psrp);}
开发者ID:chanke,项目名称:openafs-osd,代码行数:56,


示例12: CloneString

/**   Create an EtherCAT hardware interface which uses UDP formatted messages.  This is the only type of EtherCAT interface that can   be used under Windows without installing special drivers.   The low level EtherCAT protocol normally does not use an IP address, however since this driver transmits EtherCAT packets over    UDP/IP, the Ethernet interface used with this driver must have a valid IP address assigned.  In addition, the network mask    associated with the Ethernet interface should be defined in such a way that no other network interface on the same PC is a member   of the same network.  That is, if multiple interfaces are installed then they should be allocated to seperate networks.   i.e. ( IP1 & mask1 ) != (IP2 & mask2)       where IP1 and mask1 are the IP address and net mask of the first interface, and IP2 and mask2 are for the second interface.   For example, the following two interfaces are on different networks:      IP: 192.168.1.1   mask: 255.255.255.0      IP: 192.168.2.1   mask: 255.255.255.0   but the following two interfaces are on the same network:      IP: 192.168.1.1   mask: 255.255.255.0      IP: 192.168.1.2   mask: 255.255.255.0   This is important because this drive has no direct control of which interface the packets are being sent out.  This is entirely   controlled by the upper layer routing algorithms in the windows network stack.   The name parameter passed to this function can be used to identify which interface this object should bind to.  It can take    any of the following forms:   - If not specified, then the first valid interface found will be used.  This is useful if there's only one interface on the PC.   - If of the form; eth0, eth1, eth2, etc, then the nth valid interface will be used.   - For more control, the IP address of the desired interface can be passed.  This should be sent as a string in dotted decimal     notation.  For example: "192.168.1.1"   @param name Used to identify the Ethernet interface as described above.*/WinUdpEcatHardware::WinUdpEcatHardware( const char *name ){   hndl = 0;   recv = 0;   if( !name )      ifname = 0;   else      ifname = CloneString( name );   SetRefName( "UdpEcatHw" );}
开发者ID:DJGCrusader,项目名称:ParallelScissorManipulator,代码行数:45,


示例13: CloneString

// This function allows for a sub task to be started. This does not create// a new task or redirect messages, only changes possible UI for a sub// task that is being performed as part of a larger task. When you switch// to a task, that task also becomes the active subtaskbool CBackEndDialog::ActivateSubTask(const char* pszSubTaskName){	//copy the string (it could be lost on this thread by the time it gets to the other	//thread)	char* pszSubTask = CloneString(pszSubTaskName);	PostMessage(USER_COMMAND_ACTIVATE_SUBTASK, (WPARAM)pszSubTask);	return true;}
开发者ID:Joincheng,项目名称:lithtech,代码行数:15,


示例14: CloneString

//--------------------------------------------------------------------------------------------------------------CHintMessage::CHintMessage( const char * hintString, CUtlVector< const char * > * args, float duration ){	m_hintString = hintString;	m_duration = duration;	if ( args )	{		for ( int i=0; i<args->Count(); ++i )		{			m_args.AddToTail( CloneString( (*args)[i] ) );		}	}}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:14,


示例15: CloneString

//--------------------------------------------------------------------------------------------------------------void DownloadManager::MarkMapAsDownloadedFromServer( const char *serverMapName ){	if ( !serverMapName )		return;	if ( HasMapBeenDownloadedFromServer( serverMapName ) )		return;	m_downloadedMaps.AddToTail( CloneString( serverMapName ) );	return;}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:14,


示例16: sprintf

plKey::~plKey(){#if TRACK_REFS  // FOR DEBUGGING ONLY    if( IsTracked(fKeyData) )    {        char msg[ 512 ];        sprintf( msg, "D: Key %s %s is being destructed", keyNameToLookFor, CloneString(fKeyData) );        //hsAssert( false, msg );        hsStatusMessageF(msg);    }#endif    IDecRef();}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:13,


示例17: FindVoiceBankIndex

// return index of the (custom) bot phrase db, inserting it if neededint BotProfileManager::FindVoiceBankIndex(const char *filename){	int index = 0;	for (auto phrase : m_voiceBanks)	{		if (!Q_stricmp(filename, phrase))			return index;		index++;	}	m_voiceBanks.push_back(CloneString(filename));	return index;}
开发者ID:s1lentq,项目名称:ReGameDLL_CS,代码行数:15,


示例18: return

void RString::Clone(RString& clone_to){	/* makes shared copy */	clone_to.SafeDealloc();	if(!myString)		return (void)(clone_to.myString = NULL);		if(RefCount() > 250)		CloneString();	SetRefCount(RefCount() == 0 ? 2 : RefCount() + 1);	clone_to.myString = myString;	return;}
开发者ID:rezalas,项目名称:riftshadow,代码行数:14,


示例19: EnumeratePrincipalsRemotely

void EnumeratePrincipalsRemotely (LPBROWSEDIALOGPARAMS pbdp, UINT_PTR idClient){   ULONG status;   // Open the relevant cell   //   ASID idCell;   if (asc_CellOpen (idClient, (PVOID)pbdp->hCreds, pbdp->szThreadCell, AFSADMSVR_SCOPE_USERS, &idCell, &status))   {      // Obtain a list of ASIDs from the admin server, each representing      // a principal which we want to show.      //      LPASIDLIST pAsidList;      if (asc_ObjectFindMultiple (idClient, idCell, TYPE_USER, NULL, NULL, &pAsidList, &status))      {         if (pAsidList)         {            // Obtain rudimentary properties (e.g., their names) for these ASIDs            //            LPASOBJPROPLIST pPropList;            if (asc_ObjectPropertiesGetMultiple (idClient, GET_RUDIMENTARY_DATA, idCell, pAsidList, &pPropList, &status))            {               if (pPropList)               {                  // Use the information in {pPropList} to populate the display                  //                  for (size_t iEntry = 0; iEntry < pPropList->cEntries; ++iEntry)                  {                     LPTSTR pszName;                     if ((pszName = CloneString (pPropList->aEntries[ iEntry ].ObjectProperties.szName)) != NULL)                     {                        PostMessage (pbdp->hDlg, WM_FOUNDNAME, 0, (LPARAM)pszName);                        // pszName freed by DlgProc_Browse when it receives the message                     }                  }                  asc_ObjPropListFree (&pPropList);               }            }            asc_AsidListFree (&pAsidList);         }      }      asc_CellClose (idClient, idCell, &status);   }}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:47,


示例20: AppendCopyOfStringToList

EFI_STATUSAppendCopyOfStringToList (    IN OUT STRING_LIST **StringList,    IN CHAR8       *String)/*++Routine Description:  Adds String to StringList.  A new copy of String is made before it is  added to StringList.Returns:  EFI_STATUS--*/{    STRING_LIST *OldList;    STRING_LIST *NewList;    CHAR8       *NewString;    OldList = *StringList;    NewList = AllocateStringListStruct (OldList->Count + 1);    if (NewList == NULL) {        return EFI_OUT_OF_RESOURCES;    }    NewString = CloneString (String);    if (NewString == NULL) {        free (NewList);        return EFI_OUT_OF_RESOURCES;    }    memcpy (        NewList->Strings,        OldList->Strings,        sizeof (OldList->Strings[0]) * OldList->Count    );    NewList->Count = OldList->Count + 1;    NewList->Strings[OldList->Count] = NewString;    *StringList = NewList;    free (OldList);    return EFI_SUCCESS;}
开发者ID:jeppeter,项目名称:vbox,代码行数:47,


示例21:

CHintMessage::CHintMessage(const char *hintString, bool isHint, CUtlVector< const char* > *args, float duration){	// m_args.m_Memory.m_pMemory = 0;	// m_args.m_Memory.m_NumAllocated = 0;	// m_args.m_Memory.m_GrowSize = 0;	m_hintString = hintString;	m_duration = duration;	if (args)	{		for (int i = 0; i < args->Count(); ++i)		{			m_args.AddToTail(CloneString((*args)[i]));		}	}}
开发者ID:Chuvi-w,项目名称:CSSDK,代码行数:17,


示例22: hintmessagetime_t

//-----------------------------------------------------------------------------// Purpose: Register a new timer that the system should should keep track of.// Input  : iHintID - The ID of the hint message//			timer_duration - the total time the timer should run for until it fires the hint message//			message_duration - the duration passed into the hint message system when the hint fires//			args - the arguments passed into the hint message system when the hint fires//-----------------------------------------------------------------------------void CHintMessageTimers::AddTimer( int iHintID, float timer_duration, float message_duration, CUtlVector< const char * > * args ){	if ( GetTimerIndex(iHintID) != m_Timers.InvalidIndex() )		return;	// 'message' is not copied, so the pointer must remain valid forever	hintmessagetime_t *newTimer = new hintmessagetime_t( timer_duration );	newTimer->iHintID = iHintID;	newTimer->flMessageDuration = message_duration;	if ( args )	{		for ( int i=0; i<args->Count(); ++i )		{			newTimer->args.AddToTail( CloneString( (*args)[i] ) );		}	}	m_Timers.AddToTail( newTimer );	//Warning("TIMER ADDED: %s/n", m_pszHintMessages[iHintID] );}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:27,


示例23: Browse_UpdateDialog

void Browse_UpdateDialog (HWND hDlg){   LPBROWSE_PARAMS lpp;   if ((lpp = (LPBROWSE_PARAMS)GetWindowLongPtr (hDlg, DWLP_USER)) != NULL)      {      lpp->fQuerying ++;      // First we'll need to empty the list, and add some non-selectable thing      // that says "querying"      //      HWND hList = GetDlgItem (hDlg, IDC_BROWSE_LIST);      FastList_Begin (hList);      FastList_RemoveAll (hList);      TCHAR szText[ cchRESOURCE ];      GetString (szText, IDS_QUERYING_LONG);      FASTLISTADDITEM flai;      memset (&flai, 0x00, sizeof(flai));      flai.iFirstImage = IMAGE_NOIMAGE;      flai.iSecondImage = IMAGE_NOIMAGE;      flai.pszText = szText;      flai.dwFlags = FLIF_DISALLOW_SELECT;      FastList_AddItem (hList, &flai);      FastList_End (hList);      // Then start a background task to obtain the appropriate list      // of stuff to show. When that task completes, we'll populate the      // list.      //      TCHAR szPattern[ cchNAME ];      GetDlgItemText (hDlg, IDC_BROWSE_PATTERN, szPattern, cchNAME);      LPTSTR pszPattern = NULL;      if (szPattern[0] != TEXT('/0'))         pszPattern = CloneString (szPattern);      StartTask ((Browse_GetSelectedType (hDlg) == TYPE_USER) ? taskUSER_ENUM : taskGROUP_ENUM, hDlg, pszPattern);      }}
开发者ID:bagdxk,项目名称:openafs,代码行数:41,


示例24: CloneTableDef

bool CloneTableDef(const char* sLogName, CRdbTableDef & oDstTableDef, CRdbTableDef & oSrcTableDef){	oDstTableDef.sTableName = CloneString(sLogName, oSrcTableDef.sTableName);	if(!oDstTableDef.sTableName)	{		FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneTableDef(%s): RDB_LACK_MEMORY", oSrcTableDef.sTableName));		return false;	}	if(!CloneFieldDef(sLogName, oDstTableDef.pFieldDefines, oSrcTableDef.pFieldDefines, oSrcTableDef.nFieldCount))	{		FocpLogEx(sLogName, FOCP_LOG_ERROR, ("CloneTableDef(%s): RDB_LACK_MEMORY", oSrcTableDef.sTableName));		delete[] oDstTableDef.sTableName;		return false;	}	oDstTableDef.nFieldCount = oSrcTableDef.nFieldCount;	oDstTableDef.nStorage = oSrcTableDef.nStorage;//default cache none.	oDstTableDef.nMaxJob = 1;	oDstTableDef.nTableNo = oSrcTableDef.nTableNo;	oDstTableDef.nStorageAddr = 0;	return true;}
开发者ID:nightstyles,项目名称:focp,代码行数:21,


示例25: LookupGuidedSectionToolPath

CHAR8*LookupGuidedSectionToolPath (  IN EFI_HANDLE ParsedGuidedSectionToolsHandle,  IN EFI_GUID   *SectionGuid  )/*++Routine Description:  This function looks up the appropriate tool to use for extracting  a GUID defined FV section.Arguments:  ParsedGuidedSectionToolsHandle    A parsed GUID section tools handle.  SectionGuid                       The GUID for the section.Returns:  NULL     - if no tool is found or there is another error  Non-NULL - The tool to use to access the section contents.  (The caller             must free the memory associated with this string.)--*/{  GUID_SEC_TOOL_ENTRY *GuidTool;  GuidTool = (GUID_SEC_TOOL_ENTRY*)ParsedGuidedSectionToolsHandle;  if (GuidTool == NULL) {    return NULL;  }  for ( ; GuidTool != NULL; GuidTool = GuidTool->Next) {    if (CompareGuid (&(GuidTool->Guid), SectionGuid) == 0) {      return CloneString (GuidTool->Path);    }  }  return NULL;}
开发者ID:MattDevo,项目名称:edk2,代码行数:40,


示例26: CloneString

void Magick::Options::textEncoding(const std::string &encoding_){  CloneString(&_drawInfo->encoding,encoding_.c_str());  (void) SetImageOption(imageInfo(),"encoding",encoding_.c_str());}
开发者ID:riingo,项目名称:ImageMagick,代码行数:5,


示例27: CloneString

// Annotation text encoding (e.g. "UTF-16")void Magick::Options::textEncoding ( const std::string &encoding_ ){  CloneString(&_drawInfo->encoding, encoding_.c_str());}
开发者ID:0xPr0xy,项目名称:ImageMagick,代码行数:5,


示例28: ReadTEXTImage

//.........这里部分代码省略.........  page.width=612;  page.height=792;  page.x=43;  page.y=43;  if (image_info->page != (char *) NULL)    (void) ParseAbsoluteGeometry(image_info->page,&page);  /*    Initialize Image structure.  */  image->columns=(size_t) floor((((double) page.width*image->x_resolution)/    delta.x)+0.5);  image->rows=(size_t) floor((((double) page.height*image->y_resolution)/    delta.y)+0.5);  image->page.x=0;  image->page.y=0;  texture=(Image *) NULL;  if (image_info->texture != (char *) NULL)    {      ImageInfo        *read_info;      read_info=CloneImageInfo(image_info);      SetImageInfoBlob(read_info,(void *) NULL,0);      (void) CopyMagickString(read_info->filename,image_info->texture,        MaxTextExtent);      texture=ReadImage(read_info,exception);      read_info=DestroyImageInfo(read_info);    }  /*    Annotate the text image.  */  (void) SetImageBackgroundColor(image);  draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);  (void) CloneString(&draw_info->text,image_info->filename);  (void) FormatLocaleString(geometry,MaxTextExtent,"0x0%+ld%+ld",(long) page.x,    (long) page.y);  (void) CloneString(&draw_info->geometry,geometry);  status=GetTypeMetrics(image,draw_info,&metrics);  if (status == MagickFalse)    ThrowReaderException(TypeError,"UnableToGetTypeMetrics");  page.y=(ssize_t) ceil((double) page.y+metrics.ascent-0.5);  (void) FormatLocaleString(geometry,MaxTextExtent,"0x0%+ld%+ld",(long) page.x,    (long) page.y);  (void) CloneString(&draw_info->geometry,geometry);  (void) CopyMagickString(filename,image_info->filename,MaxTextExtent);  if (*draw_info->text != '/0')    *draw_info->text='/0';  p=text;  for (offset=2*page.y; p != (char *) NULL; )  {    /*      Annotate image with text.    */    (void) ConcatenateString(&draw_info->text,text);    (void) ConcatenateString(&draw_info->text,"/n");    offset+=(ssize_t) (metrics.ascent-metrics.descent);    if (image->previous == (Image *) NULL)      {        status=SetImageProgress(image,LoadImageTag,offset,image->rows);        if (status == MagickFalse)          break;      }    p=ReadBlobString(image,text);    if ((offset < (ssize_t) image->rows) && (p != (char *) NULL))      continue;    if (texture != (Image *) NULL)
开发者ID:GalliumOS,项目名称:imagemagick,代码行数:67,



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


C++ Close函数代码示例
C++ CloneImageInfo函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。