nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Christianson <>
Subject Re: MiNiFi CPP indentation confusion (Re: MINIFI-244)
Date Tue, 02 May 2017 14:59:31 GMT
OK, I can work with that. Does the style guide allow for cleaning up this bit?

  if (name
      == org::apache::nifi::minifi::processors::GenerateFlowFile::ProcessorName) {
    processor = std::make_shared<
        org::apache::nifi::minifi::processors::GenerateFlowFile>(name, uuid);
  } else if (name
      == org::apache::nifi::minifi::processors::LogAttribute::ProcessorName) {
    processor = std::make_shared<
        org::apache::nifi::minifi::processors::LogAttribute>(name, uuid);
  } else if (name
      == org::apache::nifi::minifi::processors::GetFile::ProcessorName) {
    processor =
  } else if (name
      == org::apache::nifi::minifi::processors::PutFile::ProcessorName) {
    processor =
  } else if (name
      == org::apache::nifi::minifi::processors::TailFile::ProcessorName) {
    processor =
  } else if (name
      == org::apache::nifi::minifi::processors::ListenSyslog::ProcessorName) {
    processor = std::make_shared<
        org::apache::nifi::minifi::processors::ListenSyslog>(name, uuid);
  } else if (name
        == org::apache::nifi::minifi::processors::ListenHTTP::ProcessorName) {
      processor = std::make_shared<
          org::apache::nifi::minifi::processors::ListenHTTP>(name, uuid);
  } else if (name
          == org::apache::nifi::minifi::processors::InvokeHTTP::ProcessorName) {
        processor = std::make_shared<
            org::apache::nifi::minifi::processors::InvokeHTTP>(name, uuid);
  } else if (name
      == org::apache::nifi::minifi::processors::ExecuteProcess::ProcessorName) {
    processor = std::make_shared<
        org::apache::nifi::minifi::processors::ExecuteProcess>(name, uuid);
  } else if (name
      == org::apache::nifi::minifi::processors::AppendHostInfo::ProcessorName) {
    processor = std::make_shared<
        org::apache::nifi::minifi::processors::AppendHostInfo>(name, uuid);
  } else {
    logger_->log_error("No Processor defined for %s", name.c_str());
    return nullptr;

It seems very excessive to continually repeat org::apache::nifi::minifi::processors. It looks
like the style guide may allow something like this?

namespace processors = org::apache::nifi::minifi::processors;

Is that correct?

From: Kevin Doran <>
Sent: Tuesday, May 2, 2017 10:49:25 AM
Subject: Re: MiNiFi CPP indentation confusion (Re: MINIFI-244)

Hi Andy,

I’ll let a minify-cpp veteran jump in if I have this wrong, but I believe we are following
the Google C++ Style Guide [1]. As it is my first time following this style, it caused me
to do a double take as well :-)

The Google C++ Style Guide does specify entries under public, protected, and private sections
are indented one space [2]


-- Kevin

On 5/2/17, 10:35, "Andrew Christianson" <> wrote:

    On closer inspection, it looks like just the public/private/etc. specifiers are single-space
indented, with the rest being two-spaces. Is this intentional?
    From: Andrew Christianson
    Sent: Tuesday, May 2, 2017 10:33:27 AM
    Subject: MiNiFi CPP indentation confusion (Re: MINIFI-244)

    Working on merging my code for MINIFI-244 with the latest refactoring where all of the
classes have been put into nested namespaces. Looking at sibling files, it looks like several
of them are indented with one space. This surprises me. What's the preferred indentation/code
style? Two spaces? This would be a first for me if we're actually going for single-space indentation.



View raw message