Example #1
0
	static void Put(const T& val, config_t* config, const char* index)
	{
		const char* section = index;

		const char* key = index;
		while (*key != 0) ++key;
		++key;
		
		SetFunc(config, section, key, val);
	}
Example #2
0
void CParmStatDlg::OnFunc() 
{
   UpdateData();
   SetFunc();
   EnableType();
   EnableHint();
   EnableScale();
   m_pRun->SetValues(this);
   UpdateData(FALSE);
}
Example #3
0
   PerfTrackMallocInterposition(): fFifoFD(-1), fPerfData() {
      // Initialize data structures, mutex, fifo.
      SetFunc((void**)&fPMalloc, "malloc");
      SetFunc((void**)&fPRealloc, "realloc");
      SetFunc((void**)&fPFree, "free");

      pthread_mutex_init(&fgPTMutex, 0);

      static char envPreload[] = "LD_PRELOAD=";
      putenv(envPreload);

      // Open the FIFO:
      static const char* fifoenv = "PT_FIFONAME";
      const char* fifoname = getenv(fifoenv);
      if (fifoname) {
         fFifoFD = open(fifoname, O_WRONLY);
         if (fFifoFD < 0) {
            printf("%s:%d: Error opening FIFO %s: %s\n", __FILE__, __LINE__, fifoname, strerror(errno)); 
         }
      } else {
         printf("%s:%d: %s not set: %s\n", __FILE__, __LINE__, fifoenv, strerror(errno)); 
      }
      fPerfData[kPDTag]=699692586; // for collector to know that stored values are valid
   }
Example #4
0
BOOL CParmStatDlg::OnInitDialog() 
{
   CParamDlg::OnInitDialog();
   
   SetWindowText("Statistic Functions");
   InitFunc();
   SetFunc();
   ShowType();
   ShowHint();
   EnableFunc();
   EnableType();
   EnableHint();
   EnableValues();
   m_pRun->SetValues(this);
   UpdateData(FALSE);
   return TRUE;
}
Example #5
0
void mglCanvas::DefaultPlotParam()
{
/* NOTE: following variables and mutex will not be changed by DefaultPlotParam()
long InUse;			///< Smart pointer (number of users)
mglFont *fnt;		///< Class for printing vector text
int Quality;		///< Quality of plot (0x0-pure, 0x1-fast; 0x2-fine; 0x4 - low memory)
int Width;			///< Width of the image
int Height;			///< Height of the image
int Depth;			///< Depth of the image
int CurFrameId;		///< Number of automaticle created frames
GifFileType *gif;*/
	SetDrawReg(1,1,0);		Perspective(0);
	memcpy(mgl_mask_val, mgl_mask_def, 16*sizeof(uint64_t));	// should be > 16*8
	ax.Clear();	ay.Clear();	az.Clear();	ac.Clear();
	mgl_clear_fft();		DefMaskAn=0;	ResetMask();
	SetTickRotate(true);	SetTickSkip(true);
	SetWarn(mglWarnNone,"");	mglGlobalMess = "";
	ObjId = -1;	HighId = INT_MIN;
	SetFunc(0,0);	CutOff(0);	Ternary(0);
	Stop=false;	event_cb = NULL;	event_par=NULL;
	SetRanges(mglPoint(-1,-1,-1,-1), mglPoint(1,1,1,1));
	SetOrigin(NAN,NAN,NAN,NAN);
	SetBarWidth(0.7);	SetMarkSize(1);	SetArrowSize(1);
	SetAlphaDef(0.5);		FontDef[0]=0;
	SetTranspType(0);		SetMeshNum(0);	// NOTE: default MeshNum=0
	SetRotatedText(true);	CurrPal = 0;
	SetLegendMarks();		SetFontSize(4);
	SetTuneTicks(3);		SetAmbient();	SetDiffuse();
	clr(MGL_DISABLE_SCALE);
	clr(MGL_USE_GMTIME);	clr(MGL_NOSUBTICKS);
	SetDifLight(false);		SetReduceAcc(false);
	SetDefScheme(MGL_DEF_SCH);	SetPalette(MGL_DEF_PAL);
	SetPenPal("k-1");		Alpha(false);
	stack.clear();	Restore();	DefColor('k');
	SetPlotFactor(0);	InPlot(0,1,0,1,false);
	SetTickLen(0);	SetCut(true);
	AdjustTicks("xyzc",true);	Clf('w');

	for(int i=0;i<10;i++)	{	AddLight(i, mglPoint(0,0,1));	Light(i,false);	}
	Light(0,true);	Light(false);	SetDifLight(true);
}
Example #6
0
	static void Put(const T& val, obs_data_t* config, const char* index)
	{
		SetFunc(config, index, val);
	}