Skip to content

Commit

Permalink
Reformat PropertyNames C++ files
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Apr 4, 2024
1 parent a299231 commit 6e0cf15
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 121 deletions.
120 changes: 48 additions & 72 deletions cpp/src/Ice/PropertyNames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

#include "PropertyNames.h"

const IceInternal::Property IcePropsData[] =
{
const IceInternal::Property IcePropsData[] = {
IceInternal::Property("Ice.AcceptClassCycles", false, 0),
IceInternal::Property("Ice.ACM.Client", true, 0),
IceInternal::Property("Ice.ACM.Server", true, 0),
Expand Down Expand Up @@ -189,11 +188,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", false, 0),
IceInternal::Property("IceMX.Metrics.*.Map", false, 0),
IceInternal::Property("IceMX.Metrics.*.RetainDetached", false, 0),
Expand All @@ -203,11 +200,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.ACM.Timeout", false, 0),
IceInternal::Property("IceDiscovery.Multicast.ACM.Heartbeat", false, 0),
IceInternal::Property("IceDiscovery.Multicast.ACM.Close", false, 0),
Expand Down Expand Up @@ -329,12 +324,11 @@ const IceInternal::Property IceDiscoveryPropsData[] =
IceInternal::Property("IceDiscovery.DomainId", false, 0),
};

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.ACM.Timeout", false, 0),
IceInternal::Property("IceLocatorDiscovery.Reply.ACM.Heartbeat", false, 0),
IceInternal::Property("IceLocatorDiscovery.Reply.ACM.Close", false, 0),
Expand Down Expand Up @@ -420,12 +414,11 @@ const IceInternal::Property IceLocatorDiscoveryPropsData[] =
IceInternal::Property("IceLocatorDiscovery.Trace.Lookup", false, 0),
};

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, 0),
IceInternal::Property("IceBox.InstanceName", true, 0),
IceInternal::Property("IceBox.LoadOrder", false, 0),
Expand All @@ -446,11 +439,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, 0),
IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.ConnectionCached", false, 0),
IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy.PreferSecure", false, 0),
Expand All @@ -463,12 +454,11 @@ const IceInternal::Property IceBoxAdminPropsData[] =
IceInternal::Property("IceBoxAdmin.ServiceManager.Proxy", false, 0),
};

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.ACM.Timeout", false, 0),
IceInternal::Property("IceBridge.Source.ACM.Heartbeat", false, 0),
IceInternal::Property("IceBridge.Source.ACM.Close", false, 0),
Expand Down Expand Up @@ -510,12 +500,11 @@ const IceInternal::Property IceBridgePropsData[] =
IceInternal::Property("IceBridge.InstanceName", false, 0),
};

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, 0),
IceInternal::Property("IceGridAdmin.MetricsConfig", false, 0),
IceInternal::Property("IceGridAdmin.Username", false, 0),
Expand Down Expand Up @@ -642,12 +631,11 @@ const IceInternal::Property IceGridAdminPropsData[] =
IceInternal::Property("IceGridAdmin.Trace.SaveToRegistry", false, 0),
};

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.ACM.Timeout", false, 0),
IceInternal::Property("IceGrid.AdminRouter.ACM.Heartbeat", false, 0),
IceInternal::Property("IceGrid.AdminRouter.ACM.Close", false, 0),
Expand Down Expand Up @@ -1050,11 +1038,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, 0),
IceInternal::Property("IceSSL.CAs", false, 0),
IceInternal::Property("IceSSL.CertAuthDir", true, "IceSSL.CAs"),
Expand Down Expand Up @@ -1101,32 +1087,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.*", false, 0),
IceInternal::Property("IceStormAdmin.Host", false, 0),
IceInternal::Property("IceStormAdmin.Port", false, 0),
};

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, 0),
IceInternal::Property("IceBT.SndSize", false, 0),
};

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),
IceInternal::Property("Glacier2.Client.ACM.Timeout", false, 0),
IceInternal::Property("Glacier2.Client.ACM.Heartbeat", false, 0),
Expand Down Expand Up @@ -1268,22 +1249,20 @@ const IceInternal::Property Glacier2PropsData[] =
IceInternal::Property("Glacier2.Trace.Session", false, 0),
};

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", false, 0),
IceInternal::Property("Glacier2CryptPermissionsVerifier.*.AdminPermissionsVerifier", false, 0),
};

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 @@ -1298,11 +1277,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 @@ -1317,5 +1294,4 @@ const char* IceInternal::PropertyNames::clPropNames[] =
"IceBT",
"Glacier2",
"Glacier2CryptPermissionsVerifier",
0
};
0};
82 changes: 33 additions & 49 deletions cpp/src/Ice/PropertyNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,46 @@
namespace IceInternal
{

struct Property
{
const char* pattern;
bool deprecated;
const char* deprecatedBy;

Property(const char* n, bool d, const char* b) :
pattern(n),
deprecated(d),
deprecatedBy(b)
{
}

Property() :
pattern(0),
deprecated(false),
deprecatedBy(0)
struct Property
{
}
const char* pattern;
bool deprecated;
const char* deprecatedBy;

};
Property(const char* n, bool d, const char* b) : pattern(n), deprecated(d), deprecatedBy(b) {}

struct PropertyArray
{
const Property* properties;
const int length;
Property() : pattern(0), deprecated(false), deprecatedBy(0) {}
};

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

class PropertyNames
{
public:
const Property* properties;
const int length;

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;
PropertyArray(const Property* p, size_t len) : properties(p), length(static_cast<int>(len)) {}
};

static const PropertyArray validProps[];
static const char * clPropNames[];
};
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[];
};

}

Expand Down

0 comments on commit 6e0cf15

Please sign in to comment.