示例#1
0
void pgSequence::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
	UpdateValues();
	if (properties)
	{
		CreateListColumns(properties);

		properties->AppendItem(_("Name"), GetName());
		properties->AppendItem(_("OID"), GetOid());
		properties->AppendItem(_("Owner"), GetOwner());
		properties->AppendItem(_("ACL"), GetAcl());
		properties->AppendItem(_("Current value"), GetLastValue());
		properties->AppendItem(_("Next value"), GetNextValue());
		properties->AppendItem(_("Minimum"), GetMinValue());
		properties->AppendItem(_("Maximum"), GetMaxValue());
		properties->AppendItem(_("Increment"), GetIncrement());
		properties->AppendItem(_("Cache"), GetCacheValue());
		properties->AppendYesNoItem(_("Cycled?"), GetCycled());
		properties->AppendYesNoItem(_("Called?"), GetCalled());
		properties->AppendYesNoItem(_("System sequence?"), GetSystemObject());
		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));

		if (!GetLabels().IsEmpty())
		{
			wxArrayString seclabels = GetProviderLabelArray();
			if (seclabels.GetCount() > 0)
			{
				for (unsigned int index = 0 ; index < seclabels.GetCount() - 1 ; index += 2)
				{
					properties->AppendItem(seclabels.Item(index), seclabels.Item(index + 1));
				}
			}
		}
	}
}
示例#2
0
wxString pgSequence::GetSql(ctlTree *browser)
{
	if (sql.IsNull())
	{
		UpdateValues();
		sql = wxT("-- Sequence: ") + GetQuotedFullIdentifier() + wxT("\n\n")
		      + wxT("-- DROP SEQUENCE ") + GetQuotedFullIdentifier() + wxT(";")
		      + wxT("\n\nCREATE SEQUENCE ") + GetQuotedFullIdentifier()
		      + wxT("\n  INCREMENT ") + GetIncrement().ToString()
		      + wxT("\n  MINVALUE ") + GetMinValue().ToString()
		      + wxT("\n  MAXVALUE ") + GetMaxValue().ToString()
		      + wxT("\n  START ") + GetLastValue().ToString()
		      + wxT("\n  CACHE ") + GetCacheValue().ToString();
		if (GetCycled())
			sql += wxT("\n  CYCLE");
		sql += wxT(";\n")
		       + GetOwnerSql(7, 3, wxT("TABLE ") + GetQuotedFullIdentifier());

		if (!GetConnection()->BackendMinimumVersion(8, 2))
			sql += GetGrant(wxT("arwdRxt"), wxT("TABLE ") + GetQuotedFullIdentifier());
		else
			sql += GetGrant(wxT("rwU"), wxT("TABLE ") + GetQuotedFullIdentifier());

		sql += GetCommentSql();

		if (GetConnection()->BackendMinimumVersion(9, 1))
			sql += GetSeqLabelsSql();
	}

	return sql;
}
示例#3
0
void BurnThread::WriteValToFile(int layerNum, int64_t pos)
{
	//if(threadSafeFile[layerNum])
	printf("writevaltofilepre %i  %i\n", pFlamMap->outFiles[layerNum], layerNum);
	if(pFlamMap->outFiles[layerNum])
	{
		//printf("writevaltofilepreprea\n");
		float f = GetLastValue(layerNum);
		//printf("writevaltofileprepreb\n");
		if(layerNum == FUELMOISTURE1
			|| layerNum == FUELMOISTURE10
			|| layerNum == FUELMOISTURE100
			|| layerNum == FUELMOISTURE1000)
		{
			//printf("writevaltofilepreprec\n");
			f = pFlamMap->MassageMoisture(f);
			//printf("writevaltofileprepred\n");
		}
		//EnterCriticalSection(&pFlamMap->outputCS);
		
		//pFlamMap->outFiles[layerNum].Seek(pos * sizeof(float), CFile::begin);
		//pFlamMap->outFiles[layerNum].Write(&f, sizeof(float));
		//pFlamMap->outFiles[layerNum].Flush();
		//ALM
		//printf("writevaltofile1 %i  %i\n",sizeof(threadSafeFile[layerNum]), pos * sizeof(float));
		//if (pFlamMap->outFiles[layerNum] != NULL)printf("pFlamMap->outFiles[layerNum] is opena\n");
		//fseek(threadSafeFile[layerNum], pos * sizeof(float), SEEK_SET);
		fseek(pFlamMap->outFiles[layerNum], pos * sizeof(float), SEEK_SET);
		//fseek(pFlamMap->outlayer[layerNum], pos * sizeof(float), SEEK_SET);
		//pFlamMap->outFiles[layerNum] = NULL;
		//printf("writevaltofile2\n");
		//threadSafeFile[layerNum]->Seek(pos * sizeof(float), CFile::begin);
		//fwrite(&f, sizeof(float), 1, threadSafeFile[layerNum]);
		//fputs(&f, pFlamMap->outFiles[layerNum]);
		//printf("writing file layerNum = %i", layerNum);
		fwrite(&f, sizeof(float), 1, pFlamMap->outFiles[layerNum]);
		//printf("writevaltofile3\n");
		//threadSafeFile[layerNum]->Write(&f, sizeof(float));
		//LeaveCriticalSection(&pFlamMap->outputCS);
		//threadSafeFile[layerNum]->Flush();
	}
}
void pgSequence::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane)
{
    UpdateValues();
    if (properties)
    {
        CreateListColumns(properties);

        properties->AppendItem(_("Name"), GetName());
        properties->AppendItem(_("OID"), GetOid());
        properties->AppendItem(_("Owner"), GetOwner());
        properties->AppendItem(_("ACL"), GetAcl());
        properties->AppendItem(_("Current value"), GetLastValue());
        properties->AppendItem(_("Minimum"), GetMinValue());
        properties->AppendItem(_("Maximum"), GetMaxValue());
        properties->AppendItem(_("Increment"), GetIncrement());
        properties->AppendItem(_("Cache"), GetCacheValue());
        properties->AppendItem(_("Cycled?"), GetCycled());
        properties->AppendItem(_("Called?"), GetCalled());
        properties->AppendItem(_("System sequence?"), GetSystemObject());
        properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
    }
}
示例#5
0
void BurnThread::WriteOutputLayers(int row, int col)

{
	if (pFlamMap->outFiles[0] != NULL)printf("pFlamMap->outFiles[layerNum] is open\n");
	//printf("in writeoutputlayers1\n");
	if(ld.fuel==-3)
     	return;
	//printf("in writeoutputlayers2\n");
	float *layer;

	if(ld.slope>35)
		ld.slope*=1;
	//printf("in writeoutputlayers3\n");
	int nE = pFlamMap->analysisRect.Width(), loc;
	//printf("in writeoutputlayers4 geteast  = %i  row = %i  col = %i\n", pFlamMap->GetNumEast(), row, col);
	//int nE = pRun->workArea->GetFMPRect().Width() + 1, loc;
	int64_t offset = (int64_t)pFlamMap->GetNumEast() * (int64_t)row + (int64_t)col;
	loc = row*nE + col;
	//printf("in writeoutputlayers5\n");
	for(int i = FLAMELENGTH; i < NUM_STATICOUTPUTS; i++)
	{
		//printf("in writeoutputlayers6\n");
		if(pFlamMap->GetOutputOption(i))
		{	
			//printf("in writeoutputlayers7\n");
			//pFlamMap->WriteThreadLayerVal(i, row, col, GetLastValue(i))
			layer=pFlamMap->outlayer[i];
			if(layer)
			{
				//printf("in writeoutputlayers8\n");
				layer[offset]=GetLastValue(i);
				//printf("in writeoutputlayers9 layer[offset] = %f pFlamMap->outlayer[i] = %f\n", layer[offset], pFlamMap->outlayer[i]);
				if(i == FUELMOISTURE1
					|| i == FUELMOISTURE10
					|| i == FUELMOISTURE100
					|| i == FUELMOISTURE1000)
				{
					//printf("in writeoutputlayers10\n");
					layer[offset] = pFlamMap->MassageMoisture(layer[offset]);
				}
			}
			else{
				//printf("in writeoutputlayers11 offset = %i\n", offset);
				WriteValToFile(i, offset);
				//printf("in writeoutputlayers12\n");
			}
		}
	}
	//printf("in writeoutputlayers13\n");
/*	if(pFlamMap->GetOutputOption(FLAMELENGTH))
	{	
		layer=pFlamMap->GetThreadLayer(FLAMELENGTH, row);
		if(layer)
		{
			layer[col]=GetLastValue(FLAMELENGTH);
			}
		else
		{
			WriteValToFile(FLAMELENGTH, loc);
		}

	}
	if(pFlamMap->GetOutputOption(SPREADRATE))
     {	layer=pFlamMap->GetThreadLayer(SPREADRATE, row);
     	layer[col]=GetLastValue(SPREADRATE);
     }
	if(pFlamMap->GetOutputOption(INTENSITY))
     {	layer=pFlamMap->GetThreadLayer(INTENSITY, row);
     	layer[col]=GetLastValue(INTENSITY);
     }
	if(pFlamMap->GetOutputOption(HEATAREA))
     {	layer=pFlamMap->GetThreadLayer(HEATAREA, row);
     	layer[col]=GetLastValue(HEATAREA);
     }
	if(pFlamMap->GetOutputOption(CROWNSTATE))
     {	layer=pFlamMap->GetThreadLayer(CROWNSTATE, row);
     	layer[col]=GetLastValue(CROWNSTATE);
     }
	if(pFlamMap->GetOutputOption(SOLARRADIATION))
     {	layer=pFlamMap->GetThreadLayer(SOLARRADIATION, row);
     	layer[col]=GetLastValue(SOLARRADIATION);
     }
	if(pFlamMap->GetOutputOption(FUELMOISTURE1))
     {	layer=pFlamMap->GetThreadLayer(FUELMOISTURE1, row);
     	layer[col]=pFlamMap->MassageMoisture(GetLastValue(FUELMOISTURE1));
     }
	if(pFlamMap->GetOutputOption(FUELMOISTURE10))
     {	layer=pFlamMap->GetThreadLayer(FUELMOISTURE10, row);
     	layer[col]=pFlamMap->MassageMoisture(GetLastValue(FUELMOISTURE10));
     }
	if(pFlamMap->GetOutputOption(FUELMOISTURE100))
     {	layer=pFlamMap->GetThreadLayer(FUELMOISTURE100, row);
     	layer[col]=pFlamMap->MassageMoisture(GetLastValue(FUELMOISTURE100));
     }
	if(pFlamMap->GetOutputOption(FUELMOISTURE1000))
     {	layer=pFlamMap->GetThreadLayer(FUELMOISTURE1000, row);
     	layer[col]=pFlamMap->MassageMoisture(GetLastValue(FUELMOISTURE1000));
     }
	if(pFlamMap->GetOutputOption(MIDFLAME))
     {	layer=pFlamMap->GetThreadLayer(MIDFLAME, row);
     	layer[col]=GetLastValue(MIDFLAME);
     }
	if(pFlamMap->GetOutputOption(HORIZRATE))
     {	layer=pFlamMap->GetThreadLayer(HORIZRATE, row);
     	layer[col]=GetLastValue(HORIZRATE);
     }
	if(pFlamMap->GetOutputOption(MAXSPREADDIR))
     {	layer=pFlamMap->GetThreadLayer(MAXSPREADDIR, row);
     	layer[col]=GetLastValue(MAXSPREADDIR);
     }
	if(pFlamMap->GetOutputOption(ELLIPSEDIM_A))
     {	layer=pFlamMap->GetThreadLayer(ELLIPSEDIM_A, row);
     	layer[col]=GetLastValue(ELLIPSEDIM_A);
     }
	if(pFlamMap->GetOutputOption(ELLIPSEDIM_B))
     {	layer=pFlamMap->GetThreadLayer(ELLIPSEDIM_B, row);
     	layer[col]=GetLastValue(ELLIPSEDIM_B);
     }
	if(pFlamMap->GetOutputOption(ELLIPSEDIM_C))
     {	layer=pFlamMap->GetThreadLayer(ELLIPSEDIM_C, row);
     	layer[col]=GetLastValue(ELLIPSEDIM_C);
     }
	if(pFlamMap->GetOutputOption(MAXSPOT))
     {	layer=pFlamMap->GetThreadLayer(MAXSPOT, row);
     	layer[col]=GetLastValue(MAXSPOT);
     }*/
}