<commit_before>#ifndef _FWAPPLICATION_H_
#define _FWAPPLICATION_H_

#include <Element.h>
#include <Command.h>

class FWApplication : public Element {
public:
  FWApplication(const char * _name, bool _full_screen = false)
    : name(_name), full_screen(_full_screen) { }
    
  void initialize(FWPlatform * _platform) override {
    Element::initialize(_platform);
    Command c(Command::CREATE_APPLICATION, getParentInternalId(), getInternalId());
    c.setTextValue(name);
    sendCommand(c);
  }

  void setCaption(const std::string & s) {
    Command c(Command::SET_CAPTION, getId());
    c.setTextValue(s);
    sendCommand(c);
  }

  void launchBrowser(const std::string & input_url) {
    sendCommand(Command(Command::LAUNCH_BROWSER, getInternalId(), input_url));
  }
  
  void postNotification(const std::string & title, const std::string & command) {
    sendCommand(Command(Command::POST_NOTIFICATION, getInternalId(), title, command));
  }

 private:
  std::string name;
  bool full_screen;
};

#endif<commit_msg>create app logger<commit_after>#ifndef _FWAPPLICATION_H_
#define _FWAPPLICATION_H_

#include <Element.h>
#include <Command.h>
#include <FWPlatform.h>

class FWApplication : public Element {
public:
  FWApplication(const char * _name, bool _full_screen = false)
    : name(_name), full_screen(_full_screen) { }
    
  void initialize(FWPlatform * _platform) override {
    Element::initialize(_platform);
    Command c(Command::CREATE_APPLICATION, getParentInternalId(), getInternalId());
    c.setTextValue(name);
    sendCommand(c);
  }

  void setCaption(const std::string & s) {
    Command c(Command::SET_CAPTION, getId());
    c.setTextValue(s);
    sendCommand(c);
  }

  void launchBrowser(const std::string & input_url) {
    sendCommand(Command(Command::LAUNCH_BROWSER, getInternalId(), input_url));
  }
  
  void postNotification(const std::string & title, const std::string & command) {
    sendCommand(Command(Command::POST_NOTIFICATION, getInternalId(), title, command));
  }

  Logger & getLogger() {
    if (!logger.get()) {
      logger = getPlatform().createLogger(name);
    }
    return *logger;
  }

 private:
  std::string name;
  bool full_screen;
  std::shared_ptr<Logger> logger;
};

#endif
{'fraction_non_alphanumeric': 0.1283542039355993, 'fraction_numerical': 0.0, 'mean_word_length': 4.8713910761154855, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '81807', 'n_tokens_mistral': 724, 'n_tokens_neox': 706, 'n_words': 143}