ON_Object& ON_Object::operator=(const ON_Object& src) { // DO NOT MODIFY this->m_mempool here if ( this !=&src ) { PurgeUserData(); CopyUserData(src); } return *this; }
HRESULT CAzRole::Copy(CAzRole &srcRole) { CAzLogging::Entering(_TEXT("CAzRole::Copy")); CComBSTR bstrData; HRESULT hr=m_native->Submit(0,CComVariant()); CAzLogging::Log(hr,_TEXT("Submitting for role"),COLE2T(getName())); if (FAILED(hr)) goto lError1; hr=srcRole.m_native->get_Description(&bstrData); CAzLogging::Log(hr,_TEXT("Getting Description for role"),COLE2T(getName())); if (SUCCEEDED(hr)) { hr=m_native->put_Description(bstrData); CAzLogging::Log(hr,_TEXT("Setting Description for role"),COLE2T(getName())); bstrData.Empty(); } hr=srcRole.m_native->get_ApplicationData(&bstrData); CAzLogging::Log(hr,_TEXT("Getting ApplicationData for role"),COLE2T(getName())); if (SUCCEEDED(hr)) { hr=m_native->put_ApplicationData(bstrData); CAzLogging::Log(hr,_TEXT("Setting ApplicationData for role"),COLE2T(getName())); } hr=CopyUserData(srcRole); CAzLogging::Log(hr,_TEXT("CopyUserData for role"),COLE2T(getName())); hr=m_native->Submit(0,CComVariant()); CAzLogging::Log(hr,_TEXT("Submitting for role"),COLE2T(getName())); lError1: CAzLogging::Exiting(_TEXT("CAzRole::Copy")); return hr; }
int ReadRevision4(FILE *pfConfig, USERDATAOPT *pUserdata, OUTBOUND *pOutbounds, PAREALIST pRetList, ULONG ulOptions) { int rc; memset(&Config, 0, sizeof(Config)); memset(Akas, 0, sizeof(Akas)); #ifdef DEBUG printf("Revision 4\n"); #endif /* zur�cksetzen */ fseek(pfConfig, 0, SEEK_SET); /* CONFIG einlesen */ if (1==fread(&Config, sizeof(Config), 1, pfConfig)) { #ifdef DEBUG printf("INF: Areas: %d\n", Config.AreaCnt); printf("INF: Akas: %d\n", Config.AkaCnt); printf("INF: Outb: %s\n", Config.OutBound); #endif if (rc = ReadExtensions(pfConfig)) return rc; else { if (ulOptions & READCFG_USERDATA) CopyUserData(pUserdata, Akas, &Config); if (ulOptions & READCFG_OUTBOUNDS) CopyOutbounds(pOutbounds, Akas); if ((ulOptions & READCFG_AREAS) && (rc = ReadAreas(pfConfig, pRetList))) return rc; else return CFGFILE_OK; } } else { #ifdef DEBUG printf("ERROR: Config unreadable (%d)\n", errno); #endif return CFGFILE_READ; } }
ON_Object::ON_Object(const ON_Object& src) : m_mempool(0), m_userdata_list(0) { CopyUserData(src); }