/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2024 Garmin International, Inc.
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
// may not use this file except in compliance with the Flexible and Interoperable Data
// Transfer (FIT) Protocol License.
/////////////////////////////////////////////////////////////////////////////////////////////
// ****WARNING****  This file is auto-generated!  Do NOT edit this file.
// Profile Version = 21.158.0Release
// Tag = production/release/21.158.0-0-gc9428aa
/////////////////////////////////////////////////////////////////////////////////////////////


#if !defined(FIELD_HPP)
#define FIELD_HPP

#include <cstdio>
#include <iosfwd>
#include <string>
#include <vector>
#include "fit.hpp"
#include "fit_profile.hpp"
#include "fit_field_base.hpp"

namespace fit
{

class Field
    : public FieldBase
{
public:
    Field(void);
    Field(const Field &field);
    Field(const Profile::MESG_INDEX mesgIndex, const FIT_UINT16 fieldIndex);
    Field(const FIT_UINT16 mesgNum, const FIT_UINT8 fieldNum);
    Field(const std::string& mesgName, const std::string& fieldName);

    FIT_UINT16 GetIndex(void) const;
    FIT_BOOL GetIsExpanded(void) const;
    void SetIsExpanded(FIT_BOOL newValue);

    virtual void SetBaseType( FIT_UINT8 type );
    virtual FIT_BOOL IsValid(void) const override;
    virtual FIT_BOOL GetIsAccumulated() const override;
    virtual std::string GetName(void) const override;
    virtual FIT_UINT8 GetNum(void) const override;
    virtual FIT_UINT8 GetType(void) const override;
    virtual std::string GetUnits(void) const override;
    virtual FIT_FLOAT64 GetScale(void) const override;
    virtual FIT_FLOAT64 GetOffset(void) const override;
    virtual FIT_UINT16 GetNumComponents(void) const override;
    virtual FIT_UINT16 GetNumSubFields(void) const override;
    virtual const Profile::FIELD_COMPONENT* GetComponent(const FIT_UINT16 component) const override;
    virtual const Profile::SUBFIELD* GetSubField(const FIT_UINT16 subFieldIndex) const override;

    // Unhide the overloaded get methods from FieldBase.
    using FieldBase::GetName;
    using FieldBase::GetType;
    using FieldBase::GetUnits;
    using FieldBase::GetScale;
    using FieldBase::GetOffset;

private:
    const Profile::MESG* profile;
    FIT_UINT16 profileIndex;
    FIT_UINT8 type;
    FIT_BOOL isFieldExpanded;
};

} // namespace fit

#endif // defined(FIELD_HPP)
