Fix copyright lines
[folly.git] / folly / experimental / NestedCommandLineApp.h
index a34e62cfe7d976fb9a07d635dba7e507a64d6ccb..785b7f9fd9683b7caf7f2e7b154a6c0b0fbcbe30 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2015-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-#ifndef FOLLY_NESTEDCOMMANDLINEAPP_H_
-#define FOLLY_NESTEDCOMMANDLINEAPP_H_
+#pragma once
 
 #include <functional>
 #include <stdexcept>
 
+#include <folly/CPortability.h>
 #include <folly/experimental/ProgramOptions.h>
 
 namespace folly {
@@ -31,7 +30,7 @@ namespace folly {
  * empty; the message is only allowed when exiting with a non-zero status), and
  * return the exit code. (Other exceptions will propagate out of run())
  */
-class ProgramExit : public std::runtime_error {
+class FOLLY_EXPORT ProgramExit : public std::runtime_error {
  public:
   explicit ProgramExit(int status, const std::string& msg = std::string());
   int status() const { return status_; }
@@ -68,6 +67,8 @@ class NestedCommandLineApp {
   explicit NestedCommandLineApp(
       std::string programName = std::string(),
       std::string version = std::string(),
+      std::string programHeading = std::string(),
+      std::string programHelpFooter = std::string(),
       InitFunction initFunction = InitFunction());
 
   /**
@@ -143,6 +144,8 @@ class NestedCommandLineApp {
       const std::vector<std::string>& args);
 
   std::string programName_;
+  std::string programHeading_;
+  std::string programHelpFooter_;
   std::string version_;
   InitFunction initFunction_;
   boost::program_options::options_description globalOptions_;
@@ -150,6 +153,4 @@ class NestedCommandLineApp {
   std::map<std::string, std::string> aliases_;
 };
 
-}  // namespaces
-
-#endif /* FOLLY_NESTEDCOMMANDLINEAPP_H_ */
+} // namespace folly