Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Jun 19, 2024
1 parent 34b031f commit ca2222e
Show file tree
Hide file tree
Showing 3 changed files with 1,369 additions and 1,385 deletions.
120 changes: 48 additions & 72 deletions cpp/src/Ice/PropertyNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

#include "PropertyNames.h"

const IceInternal::Property IcePropsData[] =
{
const IceInternal::Property IcePropsData[] = {
IceInternal::Property("Ice.AcceptClassCycles", false, "0", false),
IceInternal::Property("Ice.Admin.AdapterId", false, "", false),
IceInternal::Property("Ice.Admin.Connection.CloseTimeout", false, "10", false),
Expand Down Expand Up @@ -181,11 +180,9 @@ const IceInternal::Property IcePropsData[] =
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceProps(IcePropsData,
sizeof(IcePropsData)/sizeof(IcePropsData[0]));
IceInternal::PropertyNames::IceProps(IcePropsData, sizeof(IcePropsData) / sizeof(IcePropsData[0]));

const IceInternal::Property IceMXPropsData[] =
{
const IceInternal::Property IceMXPropsData[] = {
IceInternal::Property("IceMX.Metrics.*.GroupBy", true, "", false),
IceInternal::Property("IceMX.Metrics.*.Map", true, "", false),
IceInternal::Property("IceMX.Metrics.*.RetainDetached", true, "10", false),
Expand All @@ -195,11 +192,9 @@ const IceInternal::Property IceMXPropsData[] =
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceMXProps(IceMXPropsData,
sizeof(IceMXPropsData)/sizeof(IceMXPropsData[0]));
IceInternal::PropertyNames::IceMXProps(IceMXPropsData, sizeof(IceMXPropsData) / sizeof(IceMXPropsData[0]));

const IceInternal::Property IceDiscoveryPropsData[] =
{
const IceInternal::Property IceDiscoveryPropsData[] = {
IceInternal::Property("IceDiscovery.Multicast.AdapterId", false, "", false),
IceInternal::Property("IceDiscovery.Multicast.Connection.CloseTimeout", false, "10", false),
IceInternal::Property("IceDiscovery.Multicast.Connection.ConnectTimeout", false, "10", false),
Expand Down Expand Up @@ -327,12 +322,11 @@ const IceInternal::Property IceDiscoveryPropsData[] =
IceInternal::Property("IceDiscovery.DomainId", false, "", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceDiscoveryProps(IceDiscoveryPropsData,
sizeof(IceDiscoveryPropsData)/sizeof(IceDiscoveryPropsData[0]));
const IceInternal::PropertyArray IceInternal::PropertyNames::IceDiscoveryProps(
IceDiscoveryPropsData,
sizeof(IceDiscoveryPropsData) / sizeof(IceDiscoveryPropsData[0]));

const IceInternal::Property IceLocatorDiscoveryPropsData[] =
{
const IceInternal::Property IceLocatorDiscoveryPropsData[] = {
IceInternal::Property("IceLocatorDiscovery.Reply.AdapterId", false, "", false),
IceInternal::Property("IceLocatorDiscovery.Reply.Connection.CloseTimeout", false, "10", false),
IceInternal::Property("IceLocatorDiscovery.Reply.Connection.ConnectTimeout", false, "10", false),
Expand Down Expand Up @@ -422,12 +416,11 @@ const IceInternal::Property IceLocatorDiscoveryPropsData[] =
IceInternal::Property("IceLocatorDiscovery.Trace.Lookup", false, "0", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceLocatorDiscoveryProps(IceLocatorDiscoveryPropsData,
sizeof(IceLocatorDiscoveryPropsData)/sizeof(IceLocatorDiscoveryPropsData[0]));
const IceInternal::PropertyArray IceInternal::PropertyNames::IceLocatorDiscoveryProps(
IceLocatorDiscoveryPropsData,
sizeof(IceLocatorDiscoveryPropsData) / sizeof(IceLocatorDiscoveryPropsData[0]));

const IceInternal::Property IceBoxPropsData[] =
{
const IceInternal::Property IceBoxPropsData[] = {
IceInternal::Property("IceBox.InheritProperties", false, "", false),
IceInternal::Property("IceBox.InstanceName", false, "IceBox", true),
IceInternal::Property("IceBox.LoadOrder", false, "", false),
Expand All @@ -448,11 +441,9 @@ const IceInternal::Property IceBoxPropsData[] =
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceBoxProps(IceBoxPropsData,
sizeof(IceBoxPropsData)/sizeof(IceBoxPropsData[0]));
IceInternal::PropertyNames::IceBoxProps(IceBoxPropsData, sizeof(IceBoxPropsData) / sizeof(IceBoxPropsData[0]));

const IceInternal::Property IceBoxAdminPropsData[] =
{
const IceInternal::Property IceBoxAdminPropsData[] = {
IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.EndpointSelection", false, "", false),
IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.ConnectionCached", false, "", false),
IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.PreferSecure", false, "", false),
Expand All @@ -465,12 +456,11 @@ const IceInternal::Property IceBoxAdminPropsData[] =
IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy", false, "", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceBoxAdminProps(IceBoxAdminPropsData,
sizeof(IceBoxAdminPropsData)/sizeof(IceBoxAdminPropsData[0]));
const IceInternal::PropertyArray IceInternal::PropertyNames::IceBoxAdminProps(
IceBoxAdminPropsData,
sizeof(IceBoxAdminPropsData) / sizeof(IceBoxAdminPropsData[0]));

const IceInternal::Property IceBridgePropsData[] =
{
const IceInternal::Property IceBridgePropsData[] = {
IceInternal::Property("IceBridge.Source.AdapterId", false, "", false),
IceInternal::Property("IceBridge.Source.Connection.CloseTimeout", false, "10", false),
IceInternal::Property("IceBridge.Source.Connection.ConnectTimeout", false, "10", false),
Expand Down Expand Up @@ -514,12 +504,11 @@ const IceInternal::Property IceBridgePropsData[] =
IceInternal::Property("IceBridge.InstanceName", false, "IceBridge", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceBridgeProps(IceBridgePropsData,
sizeof(IceBridgePropsData)/sizeof(IceBridgePropsData[0]));
const IceInternal::PropertyArray IceInternal::PropertyNames::IceBridgeProps(
IceBridgePropsData,
sizeof(IceBridgePropsData) / sizeof(IceBridgePropsData[0]));

const IceInternal::Property IceGridAdminPropsData[] =
{
const IceInternal::Property IceGridAdminPropsData[] = {
IceInternal::Property("IceGridAdmin.AuthenticateUsingSSL", false, "", false),
IceInternal::Property("IceGridAdmin.MetricsConfig", false, "", false),
IceInternal::Property("IceGridAdmin.Username", false, "", false),
Expand Down Expand Up @@ -652,12 +641,11 @@ const IceInternal::Property IceGridAdminPropsData[] =
IceInternal::Property("IceGridAdmin.Trace.SaveToRegistry", false, "", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceGridAdminProps(IceGridAdminPropsData,
sizeof(IceGridAdminPropsData)/sizeof(IceGridAdminPropsData[0]));
const IceInternal::PropertyArray IceInternal::PropertyNames::IceGridAdminProps(
IceGridAdminPropsData,
sizeof(IceGridAdminPropsData) / sizeof(IceGridAdminPropsData[0]));

const IceInternal::Property IceGridPropsData[] =
{
const IceInternal::Property IceGridPropsData[] = {
IceInternal::Property("IceGrid.AdminRouter.AdapterId", false, "", false),
IceInternal::Property("IceGrid.AdminRouter.Connection.CloseTimeout", false, "10", false),
IceInternal::Property("IceGrid.AdminRouter.Connection.ConnectTimeout", false, "10", false),
Expand Down Expand Up @@ -1071,11 +1059,9 @@ const IceInternal::Property IceGridPropsData[] =
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceGridProps(IceGridPropsData,
sizeof(IceGridPropsData)/sizeof(IceGridPropsData[0]));
IceInternal::PropertyNames::IceGridProps(IceGridPropsData, sizeof(IceGridPropsData) / sizeof(IceGridPropsData[0]));

const IceInternal::Property IceSSLPropsData[] =
{
const IceInternal::Property IceSSLPropsData[] = {
IceInternal::Property("IceSSL.Alias", false, "", false),
IceInternal::Property("IceSSL.CAs", false, "", false),
IceInternal::Property("IceSSL.CertStore", false, "My", false),
Expand Down Expand Up @@ -1108,32 +1094,27 @@ const IceInternal::Property IceSSLPropsData[] =
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceSSLProps(IceSSLPropsData,
sizeof(IceSSLPropsData)/sizeof(IceSSLPropsData[0]));
IceInternal::PropertyNames::IceSSLProps(IceSSLPropsData, sizeof(IceSSLPropsData) / sizeof(IceSSLPropsData[0]));

const IceInternal::Property IceStormAdminPropsData[] =
{
const IceInternal::Property IceStormAdminPropsData[] = {
IceInternal::Property("IceStormAdmin.TopicManager.*", true, "", false),
IceInternal::Property("IceStormAdmin.Host", false, "", false),
IceInternal::Property("IceStormAdmin.Port", false, "", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceStormAdminProps(IceStormAdminPropsData,
sizeof(IceStormAdminPropsData)/sizeof(IceStormAdminPropsData[0]));
const IceInternal::PropertyArray IceInternal::PropertyNames::IceStormAdminProps(
IceStormAdminPropsData,
sizeof(IceStormAdminPropsData) / sizeof(IceStormAdminPropsData[0]));

const IceInternal::Property IceBTPropsData[] =
{
const IceInternal::Property IceBTPropsData[] = {
IceInternal::Property("IceBT.RcvSize", false, "", false),
IceInternal::Property("IceBT.SndSize", false, "", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::IceBTProps(IceBTPropsData,
sizeof(IceBTPropsData)/sizeof(IceBTPropsData[0]));
IceInternal::PropertyNames::IceBTProps(IceBTPropsData, sizeof(IceBTPropsData) / sizeof(IceBTPropsData[0]));

const IceInternal::Property Glacier2PropsData[] =
{
const IceInternal::Property Glacier2PropsData[] = {
IceInternal::Property("Glacier2.AddConnectionContext", false, "0", false),
IceInternal::Property("Glacier2.Client.AdapterId", false, "", false),
IceInternal::Property("Glacier2.Client.Connection.CloseTimeout", false, "10", false),
Expand Down Expand Up @@ -1279,22 +1260,20 @@ const IceInternal::Property Glacier2PropsData[] =
IceInternal::Property("Glacier2.Trace.Session", false, "0", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::Glacier2Props(Glacier2PropsData,
sizeof(Glacier2PropsData)/sizeof(Glacier2PropsData[0]));
const IceInternal::PropertyArray IceInternal::PropertyNames::Glacier2Props(
Glacier2PropsData,
sizeof(Glacier2PropsData) / sizeof(Glacier2PropsData[0]));

const IceInternal::Property Glacier2CryptPermissionsVerifierPropsData[] =
{
const IceInternal::Property Glacier2CryptPermissionsVerifierPropsData[] = {
IceInternal::Property("Glacier2CryptPermissionsVerifier.*.PermissionsVerifier", true, "", false),
IceInternal::Property("Glacier2CryptPermissionsVerifier.*.AdminPermissionsVerifier", true, "", false),
};

const IceInternal::PropertyArray
IceInternal::PropertyNames::Glacier2CryptPermissionsVerifierProps(Glacier2CryptPermissionsVerifierPropsData,
sizeof(Glacier2CryptPermissionsVerifierPropsData)/sizeof(Glacier2CryptPermissionsVerifierPropsData[0]));
const IceInternal::PropertyArray IceInternal::PropertyNames::Glacier2CryptPermissionsVerifierProps(
Glacier2CryptPermissionsVerifierPropsData,
sizeof(Glacier2CryptPermissionsVerifierPropsData) / sizeof(Glacier2CryptPermissionsVerifierPropsData[0]));

const IceInternal::PropertyArray IceInternal::PropertyNames::validProps[] =
{
const IceInternal::PropertyArray IceInternal::PropertyNames::validProps[] = {
IceProps,
IceMXProps,
IceDiscoveryProps,
Expand All @@ -1309,11 +1288,9 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::validProps[] =
IceBTProps,
Glacier2Props,
Glacier2CryptPermissionsVerifierProps,
IceInternal::PropertyArray(0,0)
};
IceInternal::PropertyArray(0, 0)};

const char* IceInternal::PropertyNames::clPropNames[] =
{
const char* IceInternal::PropertyNames::clPropNames[] = {
"Ice",
"IceMX",
"IceDiscovery",
Expand All @@ -1328,5 +1305,4 @@ const char* IceInternal::PropertyNames::clPropNames[] =
"IceBT",
"Glacier2",
"Glacier2CryptPermissionsVerifier",
0
};
0};
83 changes: 39 additions & 44 deletions cpp/src/Ice/PropertyNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,58 +12,53 @@
namespace IceInternal
{

struct Property
{
const char* pattern;
bool usesRegex;
const char* defaultValue;
bool deprecated;

Property(const char* n, bool r, const char* dv, bool d) :
pattern(n),
usesRegex(r),
defaultValue(dv),
deprecated(d)
struct Property
{
}
const char* pattern;
bool usesRegex;
const char* defaultValue;
bool deprecated;

Property() = delete;
};
Property(const char* n, bool r, const char* dv, bool d)
: pattern(n),
usesRegex(r),
defaultValue(dv),
deprecated(d)
{
}

struct PropertyArray
{
const Property* properties;
const int length;
Property() = delete;
};

PropertyArray(const Property* p, size_t len) :
properties(p),
length(static_cast<int>(len))
struct PropertyArray
{
}
};
const Property* properties;
const int length;

class PropertyNames
{
public:
PropertyArray(const Property* p, size_t len) : properties(p), length(static_cast<int>(len)) {}
};

static const PropertyArray IceProps;
static const PropertyArray IceMXProps;
static const PropertyArray IceDiscoveryProps;
static const PropertyArray IceLocatorDiscoveryProps;
static const PropertyArray IceBoxProps;
static const PropertyArray IceBoxAdminProps;
static const PropertyArray IceBridgeProps;
static const PropertyArray IceGridAdminProps;
static const PropertyArray IceGridProps;
static const PropertyArray IceSSLProps;
static const PropertyArray IceStormAdminProps;
static const PropertyArray IceBTProps;
static const PropertyArray Glacier2Props;
static const PropertyArray Glacier2CryptPermissionsVerifierProps;
class PropertyNames
{
public:
static const PropertyArray IceProps;
static const PropertyArray IceMXProps;
static const PropertyArray IceDiscoveryProps;
static const PropertyArray IceLocatorDiscoveryProps;
static const PropertyArray IceBoxProps;
static const PropertyArray IceBoxAdminProps;
static const PropertyArray IceBridgeProps;
static const PropertyArray IceGridAdminProps;
static const PropertyArray IceGridProps;
static const PropertyArray IceSSLProps;
static const PropertyArray IceStormAdminProps;
static const PropertyArray IceBTProps;
static const PropertyArray Glacier2Props;
static const PropertyArray Glacier2CryptPermissionsVerifierProps;

static const PropertyArray validProps[];
static const char* clPropNames[];
};
static const PropertyArray validProps[];
static const char* clPropNames[];
};

}

Expand Down
Loading

0 comments on commit ca2222e

Please sign in to comment.