aboutsummaryrefslogtreecommitdiff
path: root/libs/installer_fomod_plus/share/xml/XmlHelper.h
blob: 6934a869883bbfe259e9d102636282d97ac18b4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include "ModuleConfiguration.h"

class XmlHelper {
public:
    static OrderTypeEnum getOrderType(const std::string& orderType, OrderTypeEnum defaultOrder = OrderTypeEnum::Explicit)
    {
        if (orderType == "Explicit")
            return OrderTypeEnum::Explicit;
        if (orderType == "Ascending")
            return OrderTypeEnum::Ascending;
        if (orderType == "Descending")
            return OrderTypeEnum::Descending;
        return defaultOrder; // Ascending for plugins, Explicit for groups
    }
};