Пример #1
0
int main()
{
    CMapStringToString map;

    if( !map.IsEmpty() ) _fail;
    if( map.GetCount() != 0 ) _fail;
    if( map.GetSize() != 0 ) _fail;

    map.SetAt( _T("0"), _T(" ") );
    map.SetAt( _T("1"), _T("A") );
    map.SetAt( _T("2"), _T("B") );

    CString value;
    if( !map.Lookup( _T("0"), value ) ) _fail;
    if( value != _T(" ") ) _fail;
    if( !map.Lookup( _T("1"), value ) ) _fail;
    if( value != _T("A") ) _fail;
    if( !map.Lookup( _T("2"), value ) ) _fail;
    if( value != _T("B") ) _fail;
    if( map.Lookup( _T("3"), value ) ) _fail;

    POSITION    position = map.GetStartPosition();
    CString     key;
    BOOL        bFound0 = FALSE;
    BOOL        bFound1 = FALSE;
    BOOL        bFound2 = FALSE;
    while( position != NULL ) {
        map.GetNextAssoc( position, key, value );
        if( key == _T("0") ) {
            if( bFound0 ) _fail;
            if( value != _T(" ") ) _fail;
            bFound0 = TRUE;
        } else if( key == _T("1") ) {
            if( bFound1 ) _fail;
            if( value != _T("A") ) _fail;
            bFound1 = TRUE;
        } else if( key == _T("2") ) {
            if( bFound2 ) _fail;
            if( value != _T("B") ) _fail;
            bFound2 = TRUE;
        } else {
            _fail;
        }
    }
    if( !bFound0 ) _fail;
    if( !bFound1 ) _fail;
    if( !bFound2 ) _fail;

    map.RemoveKey( _T("0") );
    if( map.Lookup( _T("0"), value ) ) _fail;

    CMapStringToString smap1;
    CMapStringToString smap2;
    smap1[_T("0")] = _T(" ");
    smap1[_T("1")] = _T("A");
    smap1[_T("2")] = _T("B");
    
    CMemFile file;
    CArchive ar( &file, CArchive::store );
    smap1.Serialize( ar );
    ar.Close();

    file.Seek( 0, CFile::begin );
    CArchive ar2( &file, CArchive::load );
    smap2.Serialize( ar2 );
    ar2.Close();

    if( smap2[_T("0")] != _T(" ") ) _fail;
    if( smap2[_T("1")] != _T("A") ) _fail;
    if( smap2[_T("2")] != _T("B") ) _fail;

    _PASS;
}
Пример #2
0
BOOL CCapDownload::retrievePackages()
{
	CString					csCertFile,
		csId,
		csValue;
	COptDownloadPackage		*pOptDownloadPackage;
	CMapStringToStringArray	*pMapArray = NULL;
	CMapStringToString		*pMap = NULL;
	INT_PTR					nPack = 0;

	/***
	*
	* Environnement checking
	*
	***/

	// Working directory
	if (directoryCreate(getDownloadFolder()) == FALSE)
	{
		m_pLogger->log(LOG_PRIORITY_ERROR, _T("DOWNLOAD => Cannot create working directory (%s)"), LookupError(GetLastError()));
		return FALSE;
	}
	// Open package history file, create it if needed
	CFilePackageHistory cFileHistory;
	if (!cFileHistory.Open(getPackageHistoryFilename(), FALSE, TRUE))
	{
		m_pLogger->log(LOG_PRIORITY_ERROR, _T("DOWNLOAD => Cannot create history file <%>"), getPackageHistoryFilename());
		return FALSE;
	}
	if (!m_pPrologResp->isDownloadRequired())
	{
		m_pLogger->log(LOG_PRIORITY_DEBUG, _T("DOWNLOAD => No package available for download"));
		return FALSE;
	}
	// Trying to create suspend Download tool
	if (!suspendDownload())
	{
		m_pLogger->log(LOG_PRIORITY_ERROR, _T("DOWNLOAD => Cannot suspend Download and Setup Tool using <%s> file"), OCS_DOWNLOAD_SUSPEND);
		return FALSE;
	}
	// Trying to get exclusive access to download
	if (!lockDownload())
	{
		m_pLogger->log(LOG_PRIORITY_ERROR, _T("DOWNLOAD => Cannot lock directory <%s>"), getDownloadFolder());
		resumeDownload();
		return FALSE;
	}
	// Get generic download parameters and write them for using with download tool
	pMapArray = m_pPrologResp->getDownloadParameters();
	if ((pMapArray == NULL) || pMapArray->IsEmpty())
	{
		m_pLogger->log(LOG_PRIORITY_DEBUG, _T("DOWNLOAD => No download parameter available"));
		unlockDownload();
		resumeDownload();
		return FALSE;
	}
	// There is only one record for download parameters
	pMap = pMapArray->GetAt(0);
	pMap->Lookup(_T("FRAG_LATENCY"), m_csDownloadFragLatency);
	pMap->Lookup(_T("CYCLE_LATENCY"), m_csDownloadCycleLatency);
	pMap->Lookup(_T("PERIOD_LATENCY"), m_csDownloadPeriodLatency);
	pMap->Lookup(_T("PERIOD_LENGTH"), m_csDownloadPeriodLength);
	pMap->Lookup(_T("TIMEOUT"), m_csDownloadTimeout);
	pMap->Lookup(_T("EXECUTION_TIMEOUT"), m_csCommandTimeout);
	if (m_csCommandTimeout.IsEmpty())
		m_csCommandTimeout = COMMAND_TIMEOUT_DEFAULT;
	pMap->Lookup(_T("ON"), m_csDownloadOn);
	writeConfig();
	delete pMapArray;
	pMapArray = NULL;

	// Now get each package information
	pMapArray = m_pPrologResp->getDownloadPackages();
	for (nPack = 0; (pMapArray != NULL) && (nPack<pMapArray->GetCount()); nPack++)
	{
		if (((pMap = pMapArray->GetAt(nPack)) == NULL) || pMap->IsEmpty())
			continue;
		csId.Empty();
		pMap->Lookup(_T("ID"), csId);
		// Try to find if package was not previously downloaded, parsing package history file
		CString csHistBuf;
		BOOL	bAlreadySetup = FALSE;
		cFileHistory.SeekToBegin();
		while (cFileHistory.ReadPackage(csHistBuf))
		{
			if (csHistBuf.Find(csId) != -1)
			{
				// Package ID found in history
				bAlreadySetup = TRUE;
				break;
			}
		}
		pOptDownloadPackage = new COptDownloadPackage(this);
		pOptDownloadPackage->setId(csId);
		// If CERT_PATH or CERT_FILE option is provided
		csValue.Empty();
		pMap->Lookup(_T("CERT_PATH"), csValue);
		pOptDownloadPackage->setCertPath(csValue);
		csValue.Empty();
		pMap->Lookup(_T("CERT_FILE"), csValue);
		pOptDownloadPackage->setCertFile(csValue);
		// Set URL where to download INFO metadata
		csValue.Empty();
		pMap->Lookup(_T("INFO_LOC"), csValue);
		pOptDownloadPackage->setInfoLocation(csValue);
		// Set URL where to download fragment
		csValue.Empty();
		pMap->Lookup(_T("PACK_LOC"), csValue);
		pOptDownloadPackage->setPackLocation(csValue);
		// Set if we have to force package setup, even if already installed
		csValue.Empty();
		pMap->Lookup(_T("FORCE"), csValue);
		pOptDownloadPackage->setForce(csValue);
		// Set if we have to schedule package setup at specified date
		csValue.Empty();
		pMap->Lookup(_T("SCHEDULE"), csValue);
		pOptDownloadPackage->setSchedule(csValue);
		// Set post execution command if package action succeeded
		csValue.Empty();
		pMap->Lookup(_T("POSTCMD"), csValue);
		pOptDownloadPackage->setPostCmd(csValue);
		if (bAlreadySetup && !pOptDownloadPackage->isForced())
		{
			// Package ID found in history, do not download
			m_pLogger->log(LOG_PRIORITY_NOTICE, _T("DOWNLOAD => Will not download package <%s>, already in the package history"), csId);
			sendMessage(csId, SUCCESS_ALREADY_SETUP);
			// Delete already download directory if needed 
			pOptDownloadPackage->clean();
			delete pOptDownloadPackage;
		}
		else
		{
			// Package not already downloaded, or setup forced, put it in the download queue
			if (pOptDownloadPackage->isForced())
				m_pLogger->log(LOG_PRIORITY_DEBUG, _T("DOWNLOAD => Package <%s> forced, ignoring package history check"), csId);
			m_tPackages.Add(pOptDownloadPackage);
		}
	}
	cFileHistory.Close();
	delete pMapArray;
	// Cleaning file history for duplicates
	switch (CFilePackageHistory::CleanDuplicates(getPackageHistoryFilename()))
	{
	case 1:
		m_pLogger->log(LOG_PRIORITY_DEBUG, _T("DOWNLOAD => Package history file successfully cleaned for duplicate IDs"));
		break;
	case 2:
		m_pLogger->log(LOG_PRIORITY_DEBUG, _T("DOWNLOAD => Package history file cleaning not required"));
		break;
	default:
		m_pLogger->log(LOG_PRIORITY_DEBUG, _T("DOWNLOAD => Failed to clean Package history file for duplicate IDs"));
		break;
	}

	// Now, prepare directories and download instructions for download tool
	for (nPack = 0; nPack<m_tPackages.GetSize(); nPack++)
	{
		pOptDownloadPackage = (COptDownloadPackage*)(m_tPackages[nPack]);
		// Check if package is not expired
		if (pOptDownloadPackage->isExpired(m_csDownloadTimeout))
		{
			ULONG ulNow = time(NULL);
			m_pLogger->log(LOG_PRIORITY_ERROR, _T("DOWNLOAD => Package <%s> timed out (now:%lu, since:%lu, Timeout:%s)"), pOptDownloadPackage->getId(), ulNow, (ULONG)pOptDownloadPackage->getTimeStamp(), m_csDownloadTimeout);
			if (sendMessage(pOptDownloadPackage->getId(), ERR_TIMEOUT))
				// Server successfully notified => remove package
				if (!pOptDownloadPackage->clean())
					m_pLogger->log(LOG_PRIORITY_ERROR, _T("DOWNLOAD => Failed to remove timed out package <%s>"), pOptDownloadPackage->getId());
		}
		else
		{
			// Check if package not already added to download queue
			if (pOptDownloadPackage->makeDirectory() && !fileExists(pOptDownloadPackage->getLocalMetadataFilename()))
			{
				// Download metadata from deployment server
				if (pOptDownloadPackage->downloadInfoFile())
					m_pLogger->log(LOG_PRIORITY_NOTICE, _T("DOWNLOAD => Package <%s> added to download queue"), pOptDownloadPackage->getId());
				else
					// Error dowloading metadata => remove package directory to avoid error message into download tool
					pOptDownloadPackage->clean();
			}
			else
				m_pLogger->log(LOG_PRIORITY_DEBUG, _T("DOWNLOAD => Package <%s> already in download queue, keeping on package"), pOptDownloadPackage->getId());
		}
	}
	// Now, allow Download tool
	unlockDownload();
	resumeDownload();
	return TRUE;
}
Пример #3
0
void CObjektPool :: BesondInfo( const short j, const short k, CAtkisSatz* pSatz )
{
	CCfg	*pConfiguration= &((CEDBSExtension*)g_pTE)->Configuration;
	CRule_Layer *pRule_Layer;
	CGeoObj		*pGOBI = NULL;
	CPunktFolge* pBIpoints1 = NULL;
	CPunktFolge* pBIpoints2 = NULL;
	CxString	strTemp;
	CxString	strText, txt;

	CRule_Info	*pRule_Info = NULL;

	CxString strRegeln("ALK-Regeln");
	CxString strRule;

	CxString strObjNum;
	CxString strAktualitaet;
	CxString strObjNumBI;
	CxString strInfoArt;
	CxString strArtBI;
	CxString strFolie, strObjArt, strObjArtBI;
	int iArtGeo;
	bool tText_erzeugt;
	
	try {

		strObjNum = pSatz->OF_Objektnummer( j );
		strAktualitaet = pSatz->OF_Aktuali( j );
	//	strObjNum.TrimAll();
		strFolie = pSatz -> OF_Folie(j);
		strFolie.TrimAll();
		
		pRule_Layer = g_pMetaData->GetRule_Layer( strFolie );
		if( NULL == pRule_Layer )
			return;

		if( 0 == pRule_Layer->ImportMode() ) 
			return;

		strObjArt = pSatz -> OF_Objektart( j );
		strObjArt.TrimAll();
		strObjArtBI = pSatz -> OF_BI_Objektart( j, k );
		strObjArtBI.TrimAll();
		strArtBI = pSatz -> OF_BI_Art( j, k );	
		strArtBI.TrimAll();
		strInfoArt = strArtBI;
		strInfoArt += "/";									//#FJE980805
		strInfoArt += strObjArtBI;
		
	/*
		if ( strArtBI == "44" ) {	// UNIX-Umlaute ausbauen
			strInfoArt = strText.Left( 2 );
			strText = strText.Mid( 2 );
			strText.Transform(2);
		}
	*/
	//	pGO = g_pObjektPool->GetGeoObj( strObjNum + "H" );
	//	pGO->Folie() = strFolie;
	//	pGO->Objektart() = strObjArt;
	//	pGO->Aktualitaet() = m_Aktuali;


//=== Regeln für besondere Informationen suchen ========================================

		strRule = strFolie + strObjArt + strObjArtBI + strArtBI;
		pRule_Info = g_pMetaData->GetRule_Info( strRule );
		if( NULL == pRule_Info )
			return;

		strText = pSatz -> OF_BI_Text( j, k );
		strText.TrimAll();
		if( pConfiguration->m_sCodePage )
			strText.Transform(pConfiguration->m_sCodePage);

		if( pRule_Info->ObjektartBI_bestimmt_Objektklasse_Hauptgeometrie() ) {
			CGeoObj	*pGO;

			pGO = g_pObjektPool->GetGeoObj( strObjNum + "H" );
			if( pConfiguration->m_tCreateAttributeRegeln )
				pGO->AddAttribute( strRegeln, strRule );
			pGO->Folie() = strFolie;
			pGO->Objektart() = strObjArtBI;
			g_pMetaData->ObjectClassesTRiAS().Lookup( pRule_Info->ObjectClassTRiAS_Hauptgeometrie(), (CObject*&)pGO->ObjectClassTRiAS() );
		}

	//=== Regeln für Texte ============================================================
		tText_erzeugt = false;
		if( pConfiguration->m_tCreateBItext) {
			if( 0 != pRule_Info->Importmodus_Attr() ) {
				CxString strTextToCreate;

				strTemp = pRule_Info->Konvertierung_Text().Left(1);
				if( strTemp == "\"" ) {
					strTextToCreate = pRule_Info->Konvertierung_Text().Mid( 1, pRule_Info->Konvertierung_Text().GetLength() - 2 );
				}
				else if( !strText.IsEmpty() ) { 
					if( strTemp == "§" ) {
	//--- Konvertierung für Hausnummern ------------------------------------------------
						if( "§Hausnummer" == pRule_Info->Konvertierung_Text() ) {
							if( strText.Left(2) == "HA" ) {
								CxString strHANR, strHANRZ, strArt, strObjArt;
								int ix1, ix2;
								strHANR = strText;
								strHANR = strHANR.Mid(23,3);
								if( strHANR == "P01" || strHANR == " 01" || strHANR == "001") {
									strHANR = strText;
									strHANR = strHANR.Mid(15,8);
									strHANRZ = strHANR;
									while( isdigit((int)*strHANRZ.Left(1)) )
										strHANRZ = strHANRZ.Mid(1);
									strHANRZ.TrimAll();
									strHANR.Format("%ld", strHANR.Long());
									if( !strHANRZ.IsEmpty() )
										strHANR += strHANRZ;
									for( ix1 = 0,ix2 = pSatz -> OF_AnzahlBesInfo( j );
										ix1 < ix2;
										ix1++ ) {
										strArt = pSatz -> OF_BI_Art( j, ix1 );
										strObjArt = pSatz -> OF_BI_Objektart( j, ix1 );
										if(  strArt == "21" ) {
											if( strObjArt == "  1031" ) {
												strHANR.Empty();
												break;
											}
										}
										else
											continue;
									}	
									strTextToCreate = strHANR;
								}
							}
							else
								strTextToCreate = strText;
						}
	//--- Konvertierung für Flurstückskennzeichen -------------------------------------
						else if( "§Flurstückskennzeichen" == pRule_Info->Konvertierung_Text() ) {
							if( strText.Left(2) == "FS" ) {
								long z, n;
								z = ((CxString)strText.Mid(11,5)).Long();
								n = ((CxString)strText.Mid(16,3)).Long();
								if( 0 == n )							
									strTextToCreate.printf( "%lu", z );
								else							
									strTextToCreate.printf( "%lu/%lu", z, n );
							}
							else
								strTextToCreate = strText;
						}
	//--- Konvertierung für Flurkennzeichen -------------------------------------
						else if( "§Flurkennzeichen" == pRule_Info->Konvertierung_Text() ) {
							if( strText.Left(2) == "FL" ) {
								long f;
								f = ((CxString)strText.Mid(8,3)).Long();
								strTextToCreate.printf( "Fl. %lu", f );
							}
							else
								strTextToCreate = strText;
						}
					}
					else {
						strTextToCreate = strText;
					}
				}

				if( strTextToCreate.IsEmpty() )
					tText_erzeugt = false;
				else {
					tText_erzeugt = true;
					strObjNumBI = strObjNum + "T";
					strObjNumBI += "_";
					txt.Format("%03d", j);
					strObjNumBI += txt;
					strObjNumBI += "_";
					txt.Format("%03d", k);
					strObjNumBI += txt;
	/*
					strObjNumBI = strObjNum;
					strObjNumBI += "_";
			//		txt.Format("%06ld", pSatz->m_lEDBSSatzNummer);
					txt.Format("%08ld", pSatz->m_lNumParserCalls);
					strObjNumBI += txt;
					strObjNumBI += "_";
					txt.Format("%03d", k);
					strObjNumBI += txt;
					strObjNumBI += "_";
					strObjNumBI += key;
					strObjNumBI += "T";
					strObjNumBI += pSatz->OF_BI_ArtGeo(j,k);
					strObjNumBI += "T";
	*/

					pBIpoints1 = pSatz -> OF_BI_Points( j, k );
					if( pBIpoints1 ) {
						pGOBI = g_pObjektPool->GetGeoObj( strObjNumBI );
						if( pConfiguration->m_tCreateAttributeRegeln )
							pGOBI->AddAttribute( strRegeln, strRule );
						pGOBI->tBI = true;
						pGOBI->Folie() = strFolie;
						pGOBI->Objektart() = strObjArtBI;
			//			pGOBI->Aktualitaet() = m_Aktuali;
						g_pMetaData->ObjectClassesTRiAS().Lookup( pRule_Info->Objektklasse_Text(), (CObject*&)pGOBI->ObjectClassTRiAS() );
						if( pBIpoints1->GetSize() > 1 ) {
							pBIpoints2 = new CPunktFolge( 1 );
							if(	pBIpoints1->GetPoint(1).Hoch() == pSatz -> GrundPunktHoch()
								&& pBIpoints1->GetPoint(1).Rechts() == pSatz -> GrundPunktRechts() ) {
								(*pBIpoints2)[0] = new CPunkt( pBIpoints1->GetPoint(0).Hoch(), pBIpoints1->GetPoint(1).Rechts(), pBIpoints1->GetPoint(1).Dreh() );
							}
							else {
								(*pBIpoints2)[0] = new CPunkt( pBIpoints1->GetPoint(0).Hoch(), pBIpoints1->GetPoint(0).Rechts(), pBIpoints1->GetPoint(0).Dreh() );
							}
							AddLineBI( strObjNumBI, pBIpoints2, pGOBI,
								"BI", strFolie, strObjArtBI );
							delete pBIpoints2;
							pBIpoints2 = NULL;
						}
						else
							AddLineBI( strObjNumBI, pBIpoints1, pGOBI,
								"BI", strFolie, strObjArtBI );

						pGOBI->ObjTyp() = 'T';
						pGOBI->ObjLabel() = strTextToCreate;
					}
				}
			}
		}

	//=== Regeln für Attribute ========================================================
		if( pConfiguration->m_tCreateBIattr && !strText.IsEmpty() ) {
			CMapStringToString	mapAttrToCreate;
			CxString	strAttrToCreate;

			if( 0 != pRule_Info->Importmodus_Attr() ) {
				strTemp = pRule_Info->Konvertierung_Attr().Left(1);
				if( strTemp == "\"" ) {
					strAttrToCreate = pRule_Info->Konvertierung_Attr().Mid( 1, pRule_Info->Konvertierung_Attr().GetLength() - 2 );
					mapAttrToCreate.SetAt( pRule_Info->AttributeName(), strAttrToCreate );
				}
				else if( strTemp == "§" ) {
	//--- Konvertierungen -------------------------------------------------------------
					if( "{" == pRule_Info->Konvertierung_Attr().Mid(1,1) ) { // Attributmenge
						CxString strAttrNames(pRule_Info->AttributeName() + ";");
						if( "§{Gebaeudekennzeichen}" == pRule_Info->Konvertierung_Attr() ) {
							if( strText.Left(2) == "HA" ) {
								if( 0 <= strAttrNames.Find("Laenderschluessel;") )
									mapAttrToCreate.SetAt( "Laenderschluessel", strText.Mid( 2, 2 ) );
								if( 0 <= strAttrNames.Find("Regierungsbeziksschluessel;") )
									mapAttrToCreate.SetAt( "Regierungsbeziksschluessel", strText.Mid( 4, 1 ) );
								if( 0 <= strAttrNames.Find("Kreisschluessel;") )
									mapAttrToCreate.SetAt( "Kreisschluessel", strText.Mid( 5, 2 ) );
								if( 0 <= strAttrNames.Find("Gemeindeschluessel;") )
									mapAttrToCreate.SetAt( "Gemeindeschluessel", strText.Mid( 7, 3 ) );
								if( 0 <= strAttrNames.Find("Strassenschluessel;") )
									mapAttrToCreate.SetAt( "Strassenschluessel", strText.Mid( 10, 5 ) );
								if( 0 <= strAttrNames.Find("Hausnummer;") )
									mapAttrToCreate.SetAt( "Hausnummer", strText.Mid( 15, 4 ) );
								if( 0 <= strAttrNames.Find("Hausnummernzusatz;") )
									mapAttrToCreate.SetAt( "Hausnummernzusatz", strText.Mid( 19, 4 ) );
								if( 0 <= strAttrNames.Find("Gebaeudenummer;") )
									mapAttrToCreate.SetAt( "Gebaeudenummer", strText.Mid( 23, 3 ) );
							}
						}	
						if( "§{Flurstueckskennzeichen}" == pRule_Info->Konvertierung_Attr() ) {
							if( strText.Left(2) == "FS" ) {
								if( 0 <= strAttrNames.Find("Bundeslandschluessel;") )
									mapAttrToCreate.SetAt( "Bundeslandschluessel", strText.Mid( 2, 2 ) );
								if( 0 <= strAttrNames.Find("Gemarkungsschluessel;") )
									mapAttrToCreate.SetAt( "Gemarkungsschluessel", strText.Mid( 4, 4 ) );
								if( 0 <= strAttrNames.Find("Flur;") )
									mapAttrToCreate.SetAt( "Flur", strText.Mid( 8, 3 ) );
								if( 0 <= strAttrNames.Find("Flurstueckszaehler;") )
									mapAttrToCreate.SetAt( "Flurstueckszaehler", strText.Mid( 11, 5 ) );
								if( 0 <= strAttrNames.Find("Flurstuecksnenner;") )
									mapAttrToCreate.SetAt( "Flurstuecksnenner", strText.Mid( 16, 3 ) );
								if( 0 <= strAttrNames.Find("Flurstuecksfolgenummer;") )
									mapAttrToCreate.SetAt( "Flurstuecksfolgenummer", strText.Mid( 19, 2 ) );
							}
						}	
					}
					else {										// Einzelattribut
						if( "§WLDGE-Flurstueckskennzeichen" == pRule_Info->Konvertierung_Attr() ) {
							strAttrToCreate = strText.Mid( 2, 6 )
								+ "-" + strText.Mid( 8, 3 ) + "-"
								+ strText.Mid( 11, 5 ) + "/" + strText.Mid( 16, 3 )
								+ "." + strText.Mid( 19, 2 );
							mapAttrToCreate.SetAt( pRule_Info->AttributeName(), strAttrToCreate );
						}	
					}
				}
				else
					mapAttrToCreate.SetAt( pRule_Info->AttributeName(), strText );

				if( !mapAttrToCreate.IsEmpty() ) {
					CGeoObj	*pGO;

					pGO = g_pObjektPool->GetGeoObj( strObjNum + "H" );
					if( pConfiguration->m_tCreateAttributeRegeln )
						pGO->AddAttribute( strRegeln, strRule );
					if( 0 == pGO->AnzahlLinien() && !tText_erzeugt ) {
						double dblH;
						double dblR; 

						if( pGO->Folie().IsEmpty() )
							pGO->Folie() = strFolie;
						if( pGO->Objektart().IsEmpty() )
							pGO->Objektart() = strObjArt;
	//					pGO->Aktualitaet() = m_Aktuali;
						dblH = pSatz -> GrundPunktHoch();
						dblR = pSatz -> GrundPunktRechts();
						if (( dblH != 0.0 ) && ( dblR != 0.0 ))
							pGO -> SetzPunkt( dblH, dblR );
					}

					POSITION pos;
					CString strAttrName;
					CString strAttrValue;
					for ( pos = mapAttrToCreate.GetStartPosition();
						pos != NULL; ) {
						mapAttrToCreate.GetNextAssoc( pos, strAttrName, strAttrValue  );
						pGO -> AddAttribute( strAttrName, strAttrValue );
						g_pTriasInterface -> NeuesMerkmal( strAttrName );
					}
					mapAttrToCreate.RemoveAll();
				}
			}
		}

	//=== Regeln für Geometrien =======================================================
		if( pConfiguration->m_tCreateBIgeom && strText.IsEmpty() && !tText_erzeugt ) {
			if( 0 != pRule_Info->Importmodus_Detailgeometrie() ) {
				strObjNumBI = strObjNum + "D";
				strObjNumBI += "_";
				txt.Format("%03d", j);
				strObjNumBI += txt;
				txt.Format("%03d", k);
				strObjNumBI += txt;
				strObjNumBI += strObjArtBI;
				txt.Format("%08ld", pSatz->m_lNumParserCalls);
				strObjNumBI += txt;
	/*
					strObjNumBI = strObjNum;
					strObjNumBI += "_";
			//		txt.Format("%06ld", pSatz->m_lEDBSSatzNummer);
					txt.Format("%08ld", pSatz->m_lNumParserCalls);
					strObjNumBI += txt;
					strObjNumBI += "_";
					txt.Format("%03d", k);
					strObjNumBI += txt;
					strObjNumBI += "_";
					strObjNumBI += strObjArt + strInfoArt;
					strObjNumBI += "T";
					strObjNumBI += pSatz->OF_BI_ArtGeo(j,k);
	*/
				pBIpoints1 = pSatz -> OF_BI_Points( j, k );
				if( pBIpoints1 ) {
					int iAnzahlPunkte = 0;

					iArtGeo = atoi(pSatz->OF_BI_ArtGeo(j,k));
					switch( iArtGeo ) {
					case _EinzelpunktInBesondererAusrichtung:
			#pragma message( "Einzelpunkte verarbeiten" )
						pBIpoints2 = new CPunktFolge( *pBIpoints1, false );
						break;
					case _Gerade:
						pBIpoints2 = new CPunktFolge( *pBIpoints1, false );
						break;
					case _Polygonzug:
						pBIpoints2 = new CPunktFolge( *pBIpoints1, false );
						break;
					case _Kreisbogen_rechts:
						{
							if( pBIpoints1->GetSize() == 3 ) {
								SAFEARRAY *psa = NULL;
								ConvertArc1(
										(pBIpoints1->GetPoint(1)).Hoch(), (pBIpoints1->GetPoint(1)).Rechts(),
										(pBIpoints1->GetPoint(2)).Hoch(), (pBIpoints1->GetPoint(2)).Rechts(),
										(pBIpoints1->GetPoint(0)).Hoch(), (pBIpoints1->GetPoint(0)).Rechts(),
										&psa );
								if( psa ) {
									iAnzahlPunkte = psa->rgsabound[0].cElements / 2;
									if( iAnzahlPunkte > 0 ) {
										pBIpoints2 = new CPunktFolge( iAnzahlPunkte );
										do {
											--iAnzahlPunkte;
											(*pBIpoints2)[iAnzahlPunkte] = new CPunkt( *(((double*)psa->pvData) + iAnzahlPunkte*2), *(((double*)psa->pvData) + iAnzahlPunkte*2 + 1) );
										} while( iAnzahlPunkte > 0);
									}
									SafeArrayDestroy( psa );
									psa = NULL;
								}
							}
							else {	//Korrektur für Kreise aus zwei Punkten
								pBIpoints2 = new CPunktFolge( *pBIpoints1, false );
							}
						}
						break;
					case _Kreisbogen_links:
						{
							if( pBIpoints1->GetSize() == 3 ) {
								SAFEARRAY *psa = NULL;
								ConvertArc1(
										(pBIpoints1->GetPoint(0)).Hoch(), (pBIpoints1->GetPoint(0)).Rechts(),
										(pBIpoints1->GetPoint(2)).Hoch(), (pBIpoints1->GetPoint(2)).Rechts(),
										(pBIpoints1->GetPoint(1)).Hoch(), (pBIpoints1->GetPoint(1)).Rechts(),
										&psa );
								if( psa ) {
									iAnzahlPunkte = psa->rgsabound[0].cElements / 2;
									if( iAnzahlPunkte > 0 ) {
										pBIpoints2 = new CPunktFolge( iAnzahlPunkte );
										do {
											--iAnzahlPunkte;
											(*pBIpoints2)[iAnzahlPunkte] = new CPunkt( *(((double*)psa->pvData) + iAnzahlPunkte*2), *(((double*)psa->pvData) + iAnzahlPunkte*2 + 1) );
										} while( iAnzahlPunkte > 0);
									}
									SafeArrayDestroy( psa );
									psa = NULL;
								}
							}
							else {	//Korrektur für Kreise aus zwei Punkten
								pBIpoints2 = new CPunktFolge( *pBIpoints1, false );
							}
						}
						break;
			/*
					case _Kurve:
						iAnzahlPunkte = 0;

						pPF = new CPunktFolge( iAnzahlPunkte + 2 );
						(*pPF)[0] = new CPunkt( pSatz -> GrundPunktHoch(), pSatz -> GrundPunktRechts());
						(*pPF)[iAnzahlPunkte + 1] = new CPunkt( pSatz -> EndPunktHoch( i ), pSatz -> EndPunktRechts( i ));
						break;
			*/		default:
			//			_ASSERT(0);
						break;
					}
				}
				if( pBIpoints2 ) {
					pGOBI = g_pObjektPool->GetGeoObj( strObjNumBI );
					if( pConfiguration->m_tCreateAttributeRegeln )
						pGOBI->AddAttribute( strRegeln, strRule );
					pGOBI->tBI = true;
					pGOBI->Folie() = strFolie;
					if( pRule_Info->Objektart_bestimmt_Objektklasse_Detailgeometrie() ) {
						pGOBI->Objektart() = strObjArt;
						g_pMetaData->ObjectClassesTRiAS().Lookup( g_pMetaData->m_strObjectClassesTRiAS + strFolie + strObjArt, (CObject*&)pGOBI->ObjectClassTRiAS() );
					}
					else {
						pGOBI->Objektart() = strObjArtBI;
						g_pMetaData->ObjectClassesTRiAS().Lookup( pRule_Info->Objektklasse_Detailgeometrie(), (CObject*&)pGOBI->ObjectClassTRiAS() );
					}
					AddLineBI( strObjNumBI, pBIpoints2, pGOBI,
						"BI", strFolie, strObjArtBI );
					delete pBIpoints2;
					pBIpoints2 = NULL;
				}
			}
		}


	/*		
		if( pConfiguration->m_tDefaultObjectMapping ) {
	//==========================================================================
	/ *		lH = pSatz -> GrundPunktHoch();
			lR = pSatz -> GrundPunktRechts();
			if (( lH != 0.0 ) && ( lR != 0.0 ))
				pGO -> SetzPunkt( lH, lR );

			if ( pGO -> Objektart().IsEmpty())
				pGO -> Objektart() = strObjArt;
			else if ( pGO -> Objektart().Find( strObjArt ) < 0 )	{
				txt = strObjArt;
				txt += ", ";
				txt += pGO -> Objektart();
				pGO -> Objektart() = txt;
			}
	* /
	//=== Standard D-Regeln =============================================================================
		}
		else {
			if ( !strText.IsEmpty() && ( strText != "NNNN" )) {
		//=== C-Regeln =============================================================================
		/ *
				key = strObjArt;
				key += strInfoArt;
				key += ":";
				key += strText;
				if ( g_pTriasInterface -> Get_C_Rule( key, newkey )) {
					if ( !newkey.IsEmpty())	{
						strNewKey = newkey;
						strNewKey.Teilen( newkey, strText, '#' );

						pGO -> AddAttribute( newkey, strText );
						g_pTriasInterface -> NeuesMerkmal( newkey );
					}
				}
		* /
			}
			lH = pSatz -> GrundPunktHoch();
			lR = pSatz -> GrundPunktRechts();
			if (( lH != 0.0 ) && ( lR != 0.0 ))
				pGO -> SetzPunkt( lH, lR );

			if ( pGO -> Objektart().IsEmpty())
				pGO -> Objektart() = strObjArt;
			else if ( pGO -> Objektart().Find( strObjArt ) < 0 )	{
				txt = strObjArt;
				txt += ", ";
				txt += pGO -> Objektart();
				pGO -> Objektart() = txt;
			}

		//=== D-Regeln =============================================================================
		}
	*/
	} 
	catch( ... ) {
		AfxMessageBox( "Unerwarteter Fehler in BesondInfo",0,0);
	}
}	// BesondInfo