void OwnedData<std::string>::registerWrite()
{
    this->m_pDataRef = XPLMRegisterDataAccessor( this->m_dataRefIdentifier.c_str(), xplmType_Data, 1,
                                                 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                                                 NULL, NULL, NULL, writeFuncStr, NULL, this );
    ensureValid();
}
void OwnedData<bool>::registerRead()
{
    this->m_pDataRef = XPLMRegisterDataAccessor( this->m_dataRefIdentifier.c_str(), xplmType_Int, 0,
                                                 readFunc<int>, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                                                 NULL, NULL, NULL, NULL, this, NULL );
    ensureValid();
}
void OwnedData<double>::registerWrite()
{
    this->m_pDataRef = XPLMRegisterDataAccessor( this->m_dataRefIdentifier.c_str(), xplmType_Double, 1,
                                                 NULL, NULL, NULL, NULL, NULL, writeFunc<double>, NULL, NULL,
                                                 NULL, NULL, NULL, NULL, NULL, this );
    ensureValid();
}
void OwnedData<double>::registerRead()
{
    this->m_pDataRef = XPLMRegisterDataAccessor( this->m_dataRefIdentifier.c_str(), xplmType_Double, 0,
                                                 NULL, NULL, NULL, NULL, readFunc<double>, NULL, NULL, NULL,
                                                 NULL, NULL, NULL, NULL, this, NULL);
    ensureValid();
}
void OwnedData<std::string>::registerRead()
{
    this->m_pDataRef = XPLMRegisterDataAccessor( this->m_dataRefIdentifier.c_str(), xplmType_Data, 0,
                                                 NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                                                 NULL, NULL, readFuncStr, NULL, this, NULL );
    ensureValid();
}
void OwnedData<float>::registerReadWrite()
{
    this->m_pDataRef = XPLMRegisterDataAccessor( this->m_dataRefIdentifier.c_str(), xplmType_Float, 1,
                                                 NULL, NULL, readFunc<float>, writeFunc<float>, NULL, NULL, NULL, NULL,
                                                 NULL, NULL, NULL, NULL, this, this );
    ensureValid();
}
Exemple #7
0
void testObj::test<3>(void)
{
  GraphNodePtrNN node=makeNewLeaf( makeNewAlert(), 1234u );
  vector<path>   files;
  files.push_back("idmef_1234.xml");
  ensureValid(node, files);
}
Exemple #8
0
void testObj::test<4>(void)
{
  GraphNodePtrNN node=makeNewNode( makeNewLeaf( makeNewAlert(), 10u ), makeNewLeaf( makeNewAlert(), 20u ), 666u );
  vector<path>   files;
  files.push_back("idmef_10.xml");
  files.push_back("idmef_20.xml");
  ensureValid(node, files);
}
Exemple #9
0
void CurveDomain::refine(const ossia::domain& dom)
{
  auto min_v = dom.get_min();
  auto max_v = dom.get_max();

  if (min_v.valid())
    min = std::min(min, ossia::convert<double>(min_v));
  else
    min = std::min(start, end);

  if (max_v.valid())
    max = std::max(max, ossia::convert<double>(max_v));
  else
    max = std::max(start, end);

  ensureValid();
}
Exemple #10
0
CurveDomain::CurveDomain(const ossia::domain& dom, double start, double end)
    : min{ossia::convert<double>(dom.get_min())}
    , max{ossia::convert<double>(dom.get_max())}
    , start{start}
    , end{end}
{
  auto min_v = dom.get_min();
  auto max_v = dom.get_max();
  min = (min_v.valid())
            ? std::min(ossia::convert<double>(min_v), std::min(start, end))
            : std::min(start, end);
  max = (max_v.valid())
            ? std::max(ossia::convert<double>(max_v), std::max(start, end))
            : std::max(start, end);

  ensureValid();
}
Exemple #11
0
Component::Component(uint32_t type)
  : Block(type)
{
  ensureValid();
}
Exemple #12
0
Component::Component(uint32_t type, const uint8_t* value, size_t valueLen)
  : Block(makeBinaryBlock(type, value, valueLen))
{
  ensureValid();
}
Exemple #13
0
Component::Component(uint32_t type, ConstBufferPtr buffer)
  : Block(type, std::move(buffer))
{
  ensureValid();
}
Exemple #14
0
Component::Component(const Block& wire)
  : Block(wire)
{
  ensureValid();
}