Example #1
0
	void LodGroup::Import(std::istream & ifs)
	{
		DeSerialize(m_threshold, ifs);
		size_t meshCount = 0;
		DeSerialize(meshCount, ifs);
		for (int meshIndex = 0; meshIndex < meshCount; meshIndex++) {
			auto mesh = std::make_shared<Mesh>();
			mesh->Import(ifs);
			m_meshes.push_back(mesh);
		}
	}
Example #2
0
void ModelVoxel::Import(std::istream & ifs)
{
	size_t size;
	DeSerialize(size, ifs);
	for (int i = 0; i < size; i++) {
		std::pair<AssetID, TransformID> component;
		DeSerialize(component.first, ifs);
		DeSerialize(component.second, ifs);
		m_components.insert(component);
	}
}
Example #3
0
// Loads a model from mgr, including the dictionary only if lang is not null.
bool LSTMRecognizer::Load(const char* lang, TessdataManager* mgr) {
  TFile fp;
  if (!mgr->GetComponent(TESSDATA_LSTM, &fp)) return false;
  if (!DeSerialize(mgr, &fp)) return false;
  if (lang == nullptr) return true;
  // Allow it to run without a dictionary.
  LoadDictionary(lang, mgr);
  return true;
}
int GStringList::FromFile(const char *pzDelimiter, const char *pzPathAndFileName, int nItemCount /* = -1*/)
{
	GString strData;
	if (strData.FromFile(pzPathAndFileName,0))
	{
		DeSerialize(pzDelimiter, strData, nItemCount);
		return 1;
	}
	return 0;
}
Example #5
0
void XESkillMng::DeSerialize( XArchive& ar, int )
{
	Destroy();
	int ver, num;
	ar >> ver;
	ar >> m_strProp;
	ar >> num;
	for( int i = 0; i < num; ++i ) {
		auto pDat = new XSkillDat();
		pDat->DeSerialize( ar, ver );
		m_listSkillDat.Add( pDat );
	}
}
Example #6
0
void ourtrackserv::AddQueryDissect(QTcpSocket *clientSocket)
{
  QByteArray recvbuff = clientSocket->readAll();
  //Десериализуем вектор
  QVector<MainListItem> items = DeSerialize(recvbuff);

  // Проверяем значения на добавление и добавляем
  for (auto it = items.begin(); it != items.end(); it++)
  {
    // Добавляем в БД 
    db_ctrl.AddTorrentItem(*it); 
  }

}
bool FlowFileRecord::DeSerialize(std::string key) {
  std::string value;
  bool ret;

  ret = flow_repository_->Get(key, value);

  if (!ret) {
    logger_->log_error("NiFi FlowFile Store event %s can not found", key);
    return false;
  }
  io::DataStream stream((const uint8_t*) value.data(), value.length());

  ret = DeSerialize(stream);

  if (ret) {
    logger_->log_debug("NiFi FlowFile retrieve uuid %s size %llu connection %s success", uuidStr_, stream.getSize(), uuid_connection_);
  } else {
    logger_->log_debug("NiFi FlowFile retrieve uuid %s size %llu connection %s fail", uuidStr_, stream.getSize(), uuid_connection_);
  }

  return ret;
}
Example #8
0
GStringList::GStringList(const char *pzDelimiter, const char *pzSource)
{
	DeSerialize(pzDelimiter, pzSource);
}
Example #9
0
bool LLBC_Variant::DeSerializeEx(LLBC_Stream &stream)
{
    return DeSerialize(stream);
}
Example #10
0
GStringList::GStringList(const char *pzDelimiter, const char *pzSource, int nItemCount/*  = -1*/)
{
	DeSerialize(pzDelimiter, pzSource, nItemCount);
}