Exemplo n.º 1
0
  /*!
   * @if jp
   * @brief NamingContext を rebind する
   * @else
   * @brief Rebind NamingContext
   * @endif
   */
  void CorbaNaming::rebindContext(const char* string_name,
				  CosNaming::NamingContext_ptr name_cxt,
				  const bool force)
    throw (SystemException, NotFound, CannotProceed, InvalidName)
  {
    rebindContext(toName(string_name), name_cxt, force);
  }
Exemplo n.º 2
0
  /*!
   * @if jp
   * @brief Object を rebind する
   * @else
   * @brief Rebind object
   * @endif
   */
  void CorbaNaming::rebindByString(const char* string_name,
				   CORBA::Object_ptr obj,
				   const bool force)
    throw (SystemException, NotFound, CannotProceed, InvalidName)
  {
    rebind(toName(string_name), obj, force);
  }
Exemplo n.º 3
0
static status
initialiseDictItem(DictItem di, Any key, CharArray lbl, Any obj, Name style)
{ if ( instanceOfObject(key, ClassCharArray) && !isName(key) )
    key = toName(key);

  assign(di, key, key);
  assign(di, label, lbl);
  assign(di, index, ZERO);
  assign(di, object, (isDefault(obj) ? NIL : obj));
  assign(di, dict, NIL);
  assign(di, style, style);

  succeed;
}
Exemplo n.º 4
0
QDomElement GraphElement::save(QDomDocument *document) {
    QDomElement element = document->createElement(toName(getType()));
    QDomElement attr, attrType;
    QDomText attrText;
    for(QString key : attributes_.keys()) {
        attr = document->createElement("attr");
        attr.setAttribute("name", key);
        attrType = document->createElement(Attribute::toName(attributes_[key]->getType()));
        attrText = document->createTextNode(attributes_[key]->getValue().toString());
        attrType.appendChild(attrText);
        attr.appendChild(attrType);
        element.appendChild(attr);
    }
    return element;
}
Exemplo n.º 5
0
static status
changedVector(Vector v, Any *field)
{ if ( onFlag(v, F_INSPECT) )
  { Class class = classOfObject(v);

    if ( notNil(class->changed_messages) )
    { int index = field - v->elements;

      if ( index >= 0 && index < valInt(v->size) )
	return changedObject(v, toName((Any) toInt(index)), EAV);

      return changedFieldObject(v, field);
    }
  }

  succeed;
}
Exemplo n.º 6
0
int main(int argc, char ** argv) {
   QApplication app{argc, argv};
   WhatsThisSignaler sig;
   QPlainTextEdit w;
   w.setWindowFlags(Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint);
   w.setMinimumSize(200, 200);
   w.setReadOnly(true);
   w.show();
   sig.installOn(&w);
   QObject::connect(&sig, &WhatsThisSignaler::whatsThisEvent, &w, [&w](QWidget*widget, QEvent*ev){
      w.appendPlainText(QStringLiteral("%1(0x%2) \"%3\" QEvent::%4")
                        .arg(widget->metaObject()->className())
                        .arg((uintptr_t)widget, 0, 16)
                        .arg(widget->objectName())
                        .arg(toName(ev->type())));
   });
   return app.exec();
}
Exemplo n.º 7
0
Attribute *GraphElement::getAttribute(const QString &name) const {
    if(!hasAttribute(name))
        Exception(QString("%1 element \"%2\" has no attribute \"%3\"").arg(toName(type_), getID(), name));
    return attributes_[name];
}
Exemplo n.º 8
0
 /*!
  * @if jp
  * @brief 新しいコンテキストを bind する
  * @else
  * pbrief Bind new namingContext
  * @endif
  */
 CosNaming::NamingContext_ptr
 CorbaNaming::bindNewContext(const char* string_name, bool force)
   throw (SystemException, NotFound, CannotProceed, InvalidName, AlreadyBound)
 {
   return bindNewContext(toName(string_name));
 }
Exemplo n.º 9
0
 /*!
  * @if jp
  * @brief 与えられた NameComponent のバインディングを削除する
  * @else
  * @brief Unbind a binding specified by NameComponent
  * @endif
  */
 void CorbaNaming::unbind(const char* string_name)
   throw (SystemException, NotFound, CannotProceed, InvalidName)
 {
   unbind(toName(string_name));
 }
Exemplo n.º 10
0
 /*!
  * @if jp
  * @brief 与えられた NameComponent にバインドされている Object を返す
  * @else
  * @brief Return object bound on the specified name
  * @endif
  */
 CORBA::Object_ptr CorbaNaming::resolve(const char* string_name)
   throw (SystemException, NotFound, CannotProceed, InvalidName)
 { 
   return resolve(toName(string_name));
 }
string MakeCurrentPerfCase::Spec::toDescription (void) const
{
	// \todo [mika] Generate descrpition
	return toName();
}
Exemplo n.º 12
0
AliEmcalParticleMaker* AddTaskEmcalParticleMaker(
  const char *tracksName          = "PicoTracks",
  const char *clustersName        = 0,
  const char *tracksOutName       = "EmcalTracks",
  const char *clustersOutName     = "EmcalClusters",
  const char *taskName            = "AliEmcalParticleMaker"
)
{  
  // Get the pointer to the existing analysis manager via the static access method.
  //==============================================================================
  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
  if (!mgr) {
    ::Error("AddTaskEmcalParticleMaker", "No analysis manager to connect to.");
    return NULL;
  }  
  
  // Check the analysis type using the event handlers connected to the analysis manager.
  //==============================================================================
  AliVEventHandler *evhand = mgr->GetInputEventHandler();
  if (!evhand) {
    ::Error("AddTaskEmcalParticleMaker", "This task requires an input event handler");
    return NULL;
  }

  TString clusName(clustersName);
  if (!clustersName) {
    if (evhand->InheritsFrom("AliESDInputHandler")) {
      ::Info("AddTaskEmcalParticleMaker", "ESD analysis, clustersName = \"CaloClusters\"");
      clusName = "CaloClusters";
    } else {
      ::Info("AddTaskEmcalParticleMaker", "AOD analysis, clustersName = \"caloClusters\"");
      clusName = "caloClusters";
    }
  }
  
  //-------------------------------------------------------
  // Init the task and do settings
  //-------------------------------------------------------
  TString toName(tracksOutName);
  if (!toName.EndsWith(tracksName)) {
    toName += "_";
    toName +=tracksName;
  }
  TString coName(clustersOutName);
  if (!coName.EndsWith(clusName)) {
    coName += "_";
    coName += clusName;
  }
  TString tName(taskName);
  tName += "_";
  tName += toName;
  tName += "_";
  tName += coName;

  AliEmcalParticleMaker *eTask = new AliEmcalParticleMaker(tName);
  eTask->AddParticleContainer(tracksName);
  eTask->AddClusterContainer(clusName);
  eTask->SetTracksOutName(toName);
  eTask->SetClusOutName(coName);

  //-------------------------------------------------------
  // Final settings, pass to manager and set the containers
  //-------------------------------------------------------
  mgr->AddTask(eTask);
  
  // Create containers for input/output
  AliAnalysisDataContainer *cinput1  = mgr->GetCommonInputContainer();
  mgr->ConnectInput(eTask, 0, cinput1);
  
  return eTask;
}