You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/FITK_Component/FITKOFDictWriter/FITKDictGroup.h

230 lines
7.3 KiB
C

/**
* @file FITKDictGroup.h
* @brief name {v1 v2 v3}
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-18
*/
#ifndef _FITKDICTGROUP_H__
#define _FITKDICTGROUP_H__
#include "FITKOFDictWriterAPI.h"
#include "FITKAbstractDict.h"
namespace DICT
{
class FITKDictValue;
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-15
*/
class FITKOFDictWriterAPI FITKDictGroup : public FITKAbstractDict
{
public:
explicit FITKDictGroup() = default;
FITKDictGroup(const FITKDictGroup &other);
~FITKDictGroup() override;
FITKDictGroup &operator=(const FITKDictGroup &other);
/**
* @brief
* @return
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-16
*/
DictType getDictType() override;
/**
* @brief
* @return int
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-16
*/
int count() const;
/**
* @brief
* @param[i] key
* @return DICT::FITKDictValue*
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-16
*/
FITKDictValue* value(const QString key);
/**
* @brief
* @param[i] index
* @return DICT::FITKDictValue*
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-16
*/
FITKDictValue* at(const int index);
/**
* @brief
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void append(QString key, FITKAbstractDict::DictType value);
/**
* @brief
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void append(QString key, bool value);
/**
* @brief
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void append(QString key, double value);
/**
* @brief
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void append(QString key, int value);
/**
* @brief
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void append(QString key, const QString &value);
/**
* @brief
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void append(QString key, const char *value);
/**
* @brief
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void append(QString key, const QStringList &value);
/**
* @brief
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void append(QString key, FITKAbstractDict* value);
/**
* @brief
* @param[i] index
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void insert(int index, QString key, FITKAbstractDict::DictType value);
/**
* @brief
* @param[i] index
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void insert(int index, QString key, bool value);
/**
* @brief
* @param[i] index
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void insert(int index, QString key, double value);
/**
* @brief
* @param[i] index
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void insert(int index, QString key, int value);
/**
* @brief
* @param[i] index
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void insert(int index, QString key, const QString &value);
/**
* @brief
* @param[i] index
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void insert(int index, QString key, const char *value);
/**
* @brief
* @param[i] index
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void insert(int index, QString key, const QStringList& value);
/**
* @brief
* @param[i] index
* @param[i] key
* @param[i] value
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-17
*/
void insert(int index, QString key, FITKAbstractDict* value);
/**
* @brief
* @param[i] i
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-16
*/
void removeAt(int index);
/**
* @brief
* @param[i] key
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-16
*/
void removeKey(QString key);
protected:
/**
* @brief
* @param[i] stream
* @param[i] lineStart
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-16
*/
void writeDict(QTextStream* stream, QString lineStart) override;
private:
/**
* @brief
* @author liuzhonghua (liuzhonghuaszch@163.com)
* @date 2024-07-16
*/
QList<FITKDictValue*> m_values{};
};
}
#endif