Version: 8.3.0
CppComponent.cxx File Reference
#include "RuntimeSALOME.hxx"
#include "CppComponent.hxx"
#include "CppContainer.hxx"
#include "TypeCode.hxx"
#include "CppNode.hxx"
#include <iostream>
#include <sstream>
#include <cstdlib>
#include "YacsTrace.hxx"
Include dependency graph for CppComponent.cxx:

Go to the source code of this file.

Functions

static std::ostream & operator<< (std::ostream &f, const Any &A)
 

Function Documentation

static std::ostream& operator<< ( std::ostream &  f,
const Any A 
)
static

Definition at line 37 of file CppComponent.cxx.

References YACS::ENGINE::Bool, YACS::ENGINE::Double, gui.CONNECTOR::f(), YACS::ENGINE::Any::getBoolValue(), YACS::ENGINE::Any::getDoubleValue(), YACS::ENGINE::Any::getIntValue(), YACS::ENGINE::Any::getStringValue(), YACS::ENGINE::Any::getType(), CORBAEngineTest::i, YACS::ENGINE::Int, YACS::ENGINE::TypeCode::kind(), YACS::ENGINE::NONE, YACS::ENGINE::Objref, YACS::ENGINE::Sequence, YACS::ENGINE::SequenceAny::size(), YACS::ENGINE::String, and gui.Appli::t.

38 {
39  const TypeCode * t = A.getType();
40  if (NULL == t)
41  f << "(type NULL)";
42  else
43  switch (t->kind()) {
44  case NONE :
45  f << "(type None)";
46  break;
47  case Double :
48  f << "(type Double) " << A.getDoubleValue();
49  break;
50  case Int :
51  f << "(type Int) " << A.getIntValue();
52  break;
53  case String :
54  f << "(type String) " << A.getStringValue();
55  break;
56  case Bool :
57  f << "(type Bool) " << A.getBoolValue();
58  break;
59  case Objref :
60  f << "(type Objref)";
61  break;
62  case Sequence :
63  f << "(type Sequence) ";
64  {
65  int i;
66  const SequenceAny * sA = dynamic_cast<const SequenceAny *>(&A);
67  for (i=0; i<sA->size(); i++)
68  f << " " << *((*sA)[i]);
69  }
70  break;
71  }
72  return f;
73 }