xca/lib/builtin_curves.h
Christian Hohnstaedt 993da2d474 Use C++11 initializers for all non-static class members
When XCA started in 2002, there were no C++ initializers.
Drop explicit initializers from the constructors.

 - Fix indentations of section declarators.
 - Replace NULL by nullptr when feasible.
 - Sort private section: properties first, then methods.
2023-10-08 22:19:18 +02:00

49 lines
825 B
C++

/* vi: set sw=4 ts=4:
*
* Copyright (C) 2014 - 2020 Christian Hohnstaedt.
*
* All rights reserved.
*/
#ifndef __BUILTIN_EC_CURVES_H
#define __BUILTIN_EC_CURVES_H
#include <QString>
#include <QList>
#include "base.h"
#define CURVE_X962 1
#define CURVE_OTHER 2
#define CURVE_RFC5480 3
class builtin_curve
{
public:
int nid{};
QString comment{};
unsigned order_size{};
int flags{};
/* type: CKF_EC_F_P || CKF_EC_F_2M */
unsigned long type{};
builtin_curve(int n, QString c, int s, int f, int t)
: nid(n), comment(c), order_size(s), flags(f), type(t) { };
builtin_curve() = delete;
};
class builtin_curves: public QList<builtin_curve>
{
public:
builtin_curves();
bool containNid(int nid)
{
foreach(const builtin_curve &c, *this)
if (c.nid == nid)
return true;
return false;
}
};
#endif