Exemple #1
0
AnimTable::AnimIndex AnimTable::AddAnimName(const char* anim_name) {
  // Allow empty indices in the animation table.
  if (anim_name == nullptr || *anim_name == '\0') return kInvalidAnimIndex;

  // If this anim already exists, re-use it.
  auto existing = name_map_.find(anim_name);
  if (existing != name_map_.end()) return existing->second;

  // Allocate a new index and insert into name map.
  const AnimIndex new_idx = static_cast<AnimIndex>(name_map_.size());
  name_map_.insert(NameToIndex(anim_name, new_idx));
  return new_idx;
}
FdoByteArray* FdoRdbmsSQLDataReader::GetGeometry(const wchar_t* propertyName)
{
	int len = 0;
    const void* ptr = FdoRdbmsSQLDataReader::GetGeometry(NameToIndex(propertyName), &len);
    return (len) ? FdoByteArray::Create((unsigned char*)ptr, len) : NULL;
}
bool FdoRdbmsSQLDataReader::IsNull(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::IsNull(NameToIndex(columnName));
}
FdoLOBValue* FdoRdbmsSQLDataReader::GetLOB(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::GetLOB(NameToIndex(columnName));
}
FdoIStreamReader* FdoRdbmsSQLDataReader::GetLOBStreamReader(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::GetLOBStreamReader(NameToIndex(columnName));
}
const wchar_t* FdoRdbmsSQLDataReader::GetString(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::GetString(NameToIndex(columnName));
}
float FdoRdbmsSQLDataReader::GetSingle(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::GetSingle(NameToIndex(columnName));
}
FdoInt64 FdoRdbmsSQLDataReader::GetInt64(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::GetInt64(NameToIndex(columnName));
}
double FdoRdbmsSQLDataReader::GetDouble(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::GetDouble(NameToIndex(columnName));
}
FdoDateTime FdoRdbmsSQLDataReader::GetDateTime(const wchar_t* columnName)
{
    return mFdoConnection->DbiToFdoTime(FdoRdbmsSQLDataReader::GetString(NameToIndex(columnName)));
}
FdoByte FdoRdbmsSQLDataReader::GetByte(const wchar_t* columnName)
{
    return (FdoByte)FdoRdbmsSQLDataReader::GetInt16(NameToIndex(columnName));
}
bool FdoRdbmsSQLDataReader::GetBoolean(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::GetBoolean(NameToIndex(columnName));
}
FdoPropertyType FdoRdbmsSQLDataReader::GetPropertyType(const wchar_t* columnName)
{
    return FdoRdbmsSQLDataReader::GetPropertyType(NameToIndex(columnName));
}
FdoDataType FdoRdbmsSQLDataReader::GetColumnType( const wchar_t* columnName )
{
    return FdoRdbmsUtil::DbiToFdoType( mColList[NameToIndex(columnName)].datatype );
}
FdoInt32 FdoRdbmsSQLDataReader::GetColumnIndex(const wchar_t* columnName)
{
    return NameToIndex(columnName);
}