Provide convenience functions to create SiLA 2 conform Fully Qualified Identifiers
Description
Provide functions for creating Fully Qualified Feature Identifiers, Fully Qualified Command Identifiers, Fully Qualified Command Parameter Identifiers and so on. Ultimately it would be nice to be able to simply do something like the following:
grpc::Status CGreetingProviderImpl::SayHello(
grpc::ServerContext* Context,
const SayHello_Parameters* Request,
SayHello_Responses* Response
)
{
auto FullyQualifiedCommandParameterIdentifer = SiLA2::makeFullyQualifiedIdentifier(Request);
}
(The naming is of course discussable...)
Use cases / Benefits
This makes the code significantly easier to read and write, which is especially helpful when raising SiLA Validation or Defined Execution Errors. Everyone still knows what's happening without the pain of having to write the Fully Qualified Identifier by hand since they can get really long very fast (just as an example: "org.silastandard/examples/GreetingProvider/Command/SayHello/Parameter/Name" is the correct Fully Qualified Command Parameter Identifier for the Greeting Providers Name parameter).
Proposals
The functions could be implemented using gRPC's/protobuf's reflection mechanism. For example the GetTypeName method already returns "sila2.org.silastandard.examples.greetingprovider.v1.SayHello_Parameters" and with the GetDescriptor method we can inspect all of the messages fields (i.e. the actual parameters). With some additional string operations, it might be possible to construct a Fully Qualified Command Parameter Identifier out of that.