CPlayerStatusDialog& CPlayerStatusDialog::operator&(double fValue) { CString strTemp; strTemp.Format("%.1f",fValue); AddTrace(strTemp); return *this; }
/* * Adds a vector to the display... */ int AddVector( bvptr vec ) { Trptr t; int n; if(!vec) return(0); /* must've passed it a null pointer by mistake */ signalwindow_width_dirty=1; n = vec->nbits; t = (Trptr) calloc_2(1, sizeof( TraceEnt ) ); if( t == NULL ) { fprintf( stderr, "Out of memory, can't add %s to analyzer\n", vec->name ); return( 0 ); } if(!hier_max_level) { t->name = vec->name; } else { t->name = hier_extract(vec->name, hier_max_level); } t->flags = ( n > 3 ) ? TR_HEX|TR_RJUSTIFY : TR_BIN|TR_RJUSTIFY; t->vector = TRUE; t->n.vec = vec; AddTrace( t ); return( 1 ); }
CPlayerStatusDialog& CPlayerStatusDialog::operator&(int nValue) { CString strTemp; strTemp.Format("%d",nValue); AddTrace(strTemp); return *this; }
int AddBlankTrace(char *commentname) { Trptr t; char *comment; if( (t = (Trptr) calloc_2( 1, sizeof( TraceEnt ))) == NULL ) { fprintf( stderr, "Out of memory, can't add blank trace to analyzer\n"); return( 0 ); } AddTrace(t); t->flags=TR_BLANK; if((comment=precondition_string(commentname))) { t->name=comment; t->is_alias=1; } return(1); }
/* * Adds a single bit signal to the display... */ int AddNode(nptr nd, char *aliasname) { Trptr t; hptr histpnt; hptr *harray; int histcount; int i; if(!nd) return(0); /* passed it a null node ptr by mistake */ if(nd->mvlfac) import_trace(nd); signalwindow_width_dirty=1; if( (t = (Trptr) calloc_2( 1, sizeof( TraceEnt ))) == NULL ) { fprintf( stderr, "Out of memory, can't add %s to analyzer\n", nd->nname ); return( 0 ); } if(!nd->harray) /* make quick array lookup for aet display */ { histpnt=&(nd->head); histcount=0; while(histpnt) { histcount++; histpnt=histpnt->next; } nd->numhist=histcount; if(!(nd->harray=harray=(hptr *)malloc_2(histcount*sizeof(hptr)))) { fprintf( stderr, "Out of memory, can't add %s to analyzer\n", nd->nname ); free_2(t); return(0); } histpnt=&(nd->head); for(i=0;i<histcount;i++) { *harray=histpnt; /* printf("%s, time: %d, val: %d\n", nd->nname, (*harray)->time, (*harray)->val); */ harray++; histpnt=histpnt->next; } } if(aliasname) { char *alias; t->name=alias=(char *)malloc_2((strlen(aliasname)+2)+1); strcpy(alias,"+ "); /* use plus sign to mark aliases */ strcpy(alias+2,aliasname); t->is_alias=1; /* means can be freed later */ } else { if(!hier_max_level) { t->name = nd->nname; } else { t->name = hier_extract(nd->nname, hier_max_level); } } if(nd->ext) /* expansion vectors */ { int n; n = nd->ext->msi - nd->ext->lsi; if(n<0)n=-n; n++; t->flags = (( n > 3 )||( n < -3 )) ? TR_HEX|TR_RJUSTIFY : TR_BIN|TR_RJUSTIFY; } else { t->flags |= TR_BIN; /* binary */ } t->vector = FALSE; t->n.nd = nd; AddTrace( t ); return( 1 ); }
CPlayerStatusDialog& CPlayerStatusDialog::operator&(char cText) { CString strText = cText; AddTrace(strText); return *this; }
CPlayerStatusDialog& CPlayerStatusDialog::operator&(const CString& strText) { AddTrace(strText); return *this; }