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


C++ Assign函數代碼示例

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


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

示例1: Assign

// Assign (const char *)
//------------------------------------------------------------------------------
void AString::Assign( const char * string )
{
	Assign( string, string + StrLen( string ) );
}
開發者ID:JeremieA,項目名稱:fastbuild,代碼行數:6,代碼來源:AString.cpp

示例2: Assign

TCopyParamType & TCopyParamType::operator =(const TCopyParamType & rhp)
{
  Assign(&rhp);
  return *this;
}
開發者ID:gvsurenderreddy,項目名稱:Far-NetBox,代碼行數:5,代碼來源:CopyParam.cpp

示例3: Assign

	/** assignment operator from another smart ptr */
	inline CCountedPtr& operator=(const CCountedPtr &src)
	{
		Assign(src.m_pT);
		return *this;
	}
開發者ID:IchiroWang,項目名稱:OpenTTD,代碼行數:6,代碼來源:countedptr.hpp

示例4: Assign

 /** \brief Assignment operator.
   
     Implemented in Terms of Assign(const ParserByteCode &a_ByteCode)
 */
 ParserByteCode& ParserByteCode::operator=(const ParserByteCode &a_ByteCode)
 {
   Assign(a_ByteCode);
   return *this;
 }
開發者ID:akhabou,項目名稱:3rdpartysources,代碼行數:9,代碼來源:muParserBytecode.cpp

示例5: ProcessImplementation

FluxCalibrationInstance::FluxCalibrationInstance( const FluxCalibrationInstance& x ) :
ProcessImplementation( x )
{
   Assign( x );
}
開發者ID:SunGong1993,項目名稱:PCL,代碼行數:5,代碼來源:FluxCalibrationInstance.cpp

示例6: Assign

//============================================================
// <T>構造字符串緩衝。</T>
//
// @param pValue 字符串
// @param length 長度
//============================================================
TStringBuffer8::TStringBuffer8(TChar8C* pValue, TInt length){
   Assign(pValue, length);
}
開發者ID:favedit,項目名稱:MoCross3d,代碼行數:9,代碼來源:TStringBuffer8.cpp

示例7: ProcessImplementation

BinarizeInstance::BinarizeInstance( const BinarizeInstance& x ) :
ProcessImplementation( x )
{
   Assign( x );
}
開發者ID:GeorgViehoever,項目名稱:PCL,代碼行數:5,代碼來源:BinarizeInstance.cpp

示例8: ResolveReferences

short ResolveReferences(void)
{
   Stack Ref;
   Instruction I,j;
   int Labelref;

   Ref = AllocateStack (200);

   for (I = 1; I <= SizeOf (Labels); I++) 
   {
      if (LabelOf(I) != UndefinedString)
         if (Element(Ref,LabelOf(I)) == UndefinedString)
            Assign(Ref,LabelOf(I),I);
         else 
         {
            fprintf(output,"<<< MACHINE ERROR >>>: ");
            fprintf(output,"DUPLICATE INSTRUCTION WITH LABEL ");
    	    fprintf(output," %d **",LabelOf(I));
    	    WriteString(output,LabelOf(I));
            fprintf(output,"**: LINE %1d \n",I);
            return(false);
         }
   }

   for (I = 1; I <= SizeOf(Labels); I++) 
   {
      if (OpCodeOf(I) == GOTOOP || OpCodeOf(I) == CONDOP ||
                                   OpCodeOf(I) == CODEOP) 
      {
         Labelref = Element(Ref,Operand1Of(I));
         if (Labelref == 0) 
         {
            fprintf(output,"<<< MACHINE ERROR >>>: ");
            fprintf(output,"NO INSTRUCTION WITH LABEL ");
    	    fprintf(TraceFile," %d ",Operand1Of(I));
            fprintf(output,"': LINE %1d \n",I);
            return(false);
         }
         
         Assign ( Ref, Operand1Of(I), 1000000+Labelref );
         Assign ( Operand1, I, Labelref % 1000000);
      }

      if (OpCodeOf(I) == CONDOP) 
      {
         Labelref = Element(Ref,Operand2Of(I));
         if (Labelref == 0) 
         {
            fprintf(output,"<<< MACHINE ERROR >>>: ");
            fprintf(output,"NO INSTRUCTION WITH LABEL ");
    	    fprintf(output," %d ",Operand2Of(I));
            fprintf(output,"': LINE %1d \n",I);
            return(false);
         }
         Assign (Ref, Operand2Of(I), 1000000+Labelref );
         Assign (Operand2, I, Labelref % 1000000);
      }

      if (OpCodeOf(I) == LITOP || OpCodeOf(I) ==  LLVOP
            || OpCodeOf(I) ==  LGVOP  || OpCodeOf(I) == SLVOP
            || OpCodeOf(I) ==  SGVOP  || OpCodeOf(I) == LLIVOP
            || OpCodeOf(I) ==  LGIVOP || OpCodeOf(I) == SLIVOP
            || OpCodeOf(I) ==  SGIVOP || OpCodeOf(I) == LLAOP
            || OpCodeOf(I) ==  LGAOP  || OpCodeOf(I) == LUVOP
            || OpCodeOf(I) ==  SUVOP  || OpCodeOf(I) == POPOP
            || OpCodeOf(I) ==  CALLOP || OpCodeOf(I) == RTNOP)
          Assign (Operand1,I,StringToInteger(Operand1Of(I)));

       if (OpCodeOf(I) == LUVOP || OpCodeOf(I) == SUVOP )
          Assign(Operand2,I,StringToInteger(Operand2Of(I)));
   }

   for (I =1; I <= TextSize(); I++ ) 
   {
      if (Element(Ref,I) != 0)
         if (Element(Ref,I) < 1000000) 
         {
            fprintf(output,"<<< MACHINE ERROR >>>: ");
            fprintf(output,"NO REFERENCE TO INSTRUCTION WITH LABEL ");
	    fprintf(output,"%d ", I);
            fprintf(output,": LINE %1d \n",I);
            fprintf(output,"Element(Ref)= %d\n",Element(Ref,I));
            PrintAllStrings(stdout);
            return(false);
	 }
   }

   return(true);
}
開發者ID:MARFMS,項目名稱:chiquitico,代碼行數:89,代碼來源:Interpreter.c

示例9: Assign

	const CDuiString& CDuiString::operator=(const CDuiString& src)
	{      
		Assign(src);
		return *this;
	}
開發者ID:boyisgood86,項目名稱:Redrain-,代碼行數:5,代碼來源:Utils.cpp

示例10: tmp

CFI& CFI::Assign(const string &str)
{
    CFI tmp(str);
    return Assign(std::move(tmp));
}
開發者ID:Hasimir,項目名稱:readium-sdk,代碼行數:5,代碼來源:cfi.cpp

示例11: m_pstr

	CDuiString::CDuiString(const CDuiString& src) : m_pstr(m_szBuffer)
	{
		m_szBuffer[0] = '\0';
		Assign(src.m_pstr);
	}
開發者ID:boyisgood86,項目名稱:Redrain-,代碼行數:5,代碼來源:Utils.cpp

示例12: Assign

 /*!
  * Reconstruct the buffer to be a copy of another buffer.
  *
  *  @param[in] other    The contents of this buffer are copied.
  *
  * @return  Reference to the new data buffer.
  */
 DATA &operator =(const DATA &other)
 {
     Assign(other);
     return *this;
 }
開發者ID:andrewjinyounglee,項目名稱:PerVERT,代碼行數:12,代碼來源:data.hpp

示例13: Assign

DataBuffer::DataBuffer( char const *bytes, u32 len )
{
  Assign( bytes, len );
}
開發者ID:GGBOY92,項目名稱:cs260assignment3,代碼行數:4,代碼來源:shared.cpp

示例14: main

int main()
{
  StartClock();
  unsigned int *no_init_ptr;
  unsigned int *ptr;
  struct UnsignedInt_Type1 ptr_str;
  ((ptr_str.Void_Type0::ptr = ptr , ptr_str.addr = (reinterpret_cast < unsigned long long  >  ((&ptr)))) , ((Assign(&ptr_str,UnsignedInt_Type1_Cast_Void_Type0(malloc_overload(400UL))) , ptr = ptr_str.Void_Type0::ptr)));
  unsigned int *ptr2;
  struct UnsignedInt_Type1 ptr2_str;
  ((ptr2_str.Void_Type0::ptr = ptr2 , ptr2_str.addr = (reinterpret_cast < unsigned long long  >  ((&ptr2)))) , ((Assign(&ptr2_str,UnsignedInt_Type1_Cast_Void_Type0(malloc_overload(40UL))) , ptr2 = ptr2_str.Void_Type0::ptr)));
  unsigned int *ptr_index;
  unsigned int counter = 0U;
  struct UnsignedInt_Type1 UnsignedInt_Type1_ovl_2;
  struct UnsignedInt_Type1 UnsignedInt_Type1_ovl_3;
  for ((((UnsignedInt_Type1_ovl_2 = create_struct(ptr_index,(reinterpret_cast < unsigned long long  >  ((&ptr_index)))) , UnsignedInt_Type1_Assign_UnsignedInt_Type1_UnsignedInt_Type1((reinterpret_cast < unsigned long long  >  ((&UnsignedInt_Type1_ovl_2))),ptr_str)) , ((unsigned int *)( *(reinterpret_cast < void ** >  (UnsignedInt_Type1_ovl_2.addr)))) = UnsignedInt_Type1_ovl_2.Void_Type0::ptr) , UnsignedInt_Type1_ovl_2); b_LessThan_UnsignedInt_Type1_UnsignedInt_Type1(create_struct(ptr_index,(reinterpret_cast < unsigned long long  >  ((&ptr_index)))),UnsignedInt_Type1_Add_UnsignedInt_Type1_i(ptr_str,100)); (((UnsignedInt_Type1_ovl_3 = create_struct(ptr_index,(reinterpret_cast < unsigned long long  >  ((&ptr_index)))) , UnsignedInt_Type1_Increment_UnsignedInt_Type1((reinterpret_cast < unsigned long long  >  ((&UnsignedInt_Type1_ovl_3))))) , ((unsigned int *)( *(reinterpret_cast < void ** >  (UnsignedInt_Type1_ovl_3.addr)))) = UnsignedInt_Type1_ovl_3.Void_Type0::ptr) , UnsignedInt_Type1_ovl_3)) {
     *Deref(create_struct(ptr_index,(reinterpret_cast < unsigned long long  >  ((&ptr_index))))) = counter++;
  }
  struct UnsignedInt_Type1 UnsignedInt_Type1_ovl_4;
  struct UnsignedInt_Type1 UnsignedInt_Type1_ovl_5;
  for ((((UnsignedInt_Type1_ovl_4 = create_struct(ptr_index,(reinterpret_cast < unsigned long long  >  ((&ptr_index)))) , UnsignedInt_Type1_Assign_UnsignedInt_Type1_UnsignedInt_Type1((reinterpret_cast < unsigned long long  >  ((&UnsignedInt_Type1_ovl_4))),UnsignedInt_Type1_Sub_UnsignedInt_Type1_i(UnsignedInt_Type1_Add_UnsignedInt_Type1_i(ptr_str,100),1))) , ((unsigned int *)( *(reinterpret_cast < void ** >  (UnsignedInt_Type1_ovl_4.addr)))) = UnsignedInt_Type1_ovl_4.Void_Type0::ptr) , UnsignedInt_Type1_ovl_4); b_GreaterOrEqual_UnsignedInt_Type1_UnsignedInt_Type1(create_struct(ptr_index,(reinterpret_cast < unsigned long long  >  ((&ptr_index)))),ptr_str); (((UnsignedInt_Type1_ovl_5 = create_struct(ptr_index,(reinterpret_cast < unsigned long long  >  ((&ptr_index)))) , UnsignedInt_Type1_Decrement_UnsignedInt_Type1((reinterpret_cast < unsigned long long  >  ((&UnsignedInt_Type1_ovl_5))))) , ((unsigned int *)( *(reinterpret_cast < void ** >  (UnsignedInt_Type1_ovl_5.addr)))) = UnsignedInt_Type1_ovl_5.Void_Type0::ptr) , UnsignedInt_Type1_ovl_5)) {
    printf("%u\n", *Deref(create_struct(ptr_index,(reinterpret_cast < unsigned long long  >  ((&ptr_index))))));
  }
  EndClock();
  return 1;
}
開發者ID:matzke1,項目名稱:rose-develop,代碼行數:25,代碼來源:pointer_example14_simplified_out.cpp

示例15: return

clNode& clNode::operator=(const clNode &source)
{
  return(Assign(source));
}
開發者ID:hklaufus,項目名稱:GridLab,代碼行數:4,代碼來源:node.cpp


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