int FriendtrackerUI::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 38)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 38;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< QStringList*>(_v) = onlinePpIds(); break;
        case 1: *reinterpret_cast< QStringList*>(_v) = pins(); break;
        case 2: *reinterpret_cast< bb::cascades::GroupDataModel**>(_v) = friendListModel(); break;
        case 3: *reinterpret_cast< bool*>(_v) = getInitial(); break;
        }
        _id -= 4;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: setOnlinePpIds(*reinterpret_cast< QStringList*>(_v)); break;
        case 1: setPins(*reinterpret_cast< QStringList*>(_v)); break;
        case 3: setInitial(*reinterpret_cast< bool*>(_v)); break;
        }
        _id -= 4;
    } else if (_c == QMetaObject::ResetProperty) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 4;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 4;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}
예제 #2
0
int main(void)
{
    string name;

    // Get the string while isValid
    do
    {
        name = GetString();
    }
    while(stringValid(name) != 0);

    // If something was wrong with GetString()
    if (name == NULL)
    {
        printf("Error getString\n");
        return -1;
    }

    // Get the initials and print them
    getInitial(name);
}
예제 #3
0
short ExExeUtilLongRunningTcb::executeLongRunningQuery()
{
  Lng32 rc = 0;

  if (getInitial())
    {
      Lng32 cliRC = 
      cliInterface()->executeImmediate(
        "control query default HIST_ON_DEMAND_STATS_SIZE '0'");
      if (cliRC < 0) 
        {
          cliInterface()->allocAndRetrieveSQLDiagnostics(diagsArea_);
	  return cliRC;
        }
      

      // Perform the initial processing
      short rtc = processInitial(rc);
      if ((rc != 0) && (rc != 100))
        {
          cliInterface()->allocAndRetrieveSQLDiagnostics(diagsArea_);
        }

      cliRC = 
        cliInterface()->executeImmediate(
            "control query default HIST_ON_DEMAND_STATS_SIZE 'RESET'");
      if (cliRC < 0) 
        {
          cliInterface()->allocAndRetrieveSQLDiagnostics(diagsArea_);
	  return cliRC;
        }
      

#ifdef _DEBUG
      if (lrTdb().longRunningQueryPlan()) {

          Int32 bufSize = 100 + 
                strlen(lruStmtAndPartInfo_)+ strlen(lruStmtWithCKAndPartInfo_);
          char* lruQPInfo = new (getHeap()) char[bufSize];

          // str_printf() does not support %ld. Use %d instead.
          str_sprintf(lruQPInfo, 
	             "Queries to be processed: \n\n%s\n\n%s\n\n\n Initial rows deleted: %ld",
                      lruStmtAndPartInfo_,
                      lruStmtWithCKAndPartInfo_,
                      getRowsDeleted());

          ComDiagsArea * diagsArea = getDiagAreaFromUpQueueTail();
          (*diagsArea) << DgSqlCode(8427) << DgString0(lruQPInfo);

          NADELETEBASIC(lruQPInfo, getHeap());

      }
#endif

      setInitial(0);
    
    }
  else
    {
      // Perform the continuing processing
      short rtc = processContinuing(rc);
      if ((rc != 0) && (rc != 100))
        {
          cliInterface()->allocAndRetrieveSQLDiagnostics(diagsArea_);
        }

#ifdef _DEBUG
      if ((rc == 100 || rc > 0) && lrTdb().longRunningQueryPlan()) {

        char lruQPInfo [100];
        str_sprintf(lruQPInfo, "Total rows deleted: %ld\n\n", getRowsDeleted());

        ComDiagsArea * diagsArea = getDiagAreaFromUpQueueTail();
        (*diagsArea) << DgSqlCode(8427) << DgString0(lruQPInfo);
      }
#endif
    }
  

  return (short )rc;
}
예제 #4
0
	void reset()
	{
		quantum_ = getInitial();
	}
예제 #5
0
	constexpr RoundRobinQuantum() :
			quantum_{getInitial()}
	{

	}