Changeset b40b987 for launchers


Ignore:
Timestamp:
Sep 30, 2018 9:32:49 AM (2 years ago)
Author:
meeh <meeh@…>
Branches:
master
Children:
ae0d420
Parents:
e8d371e
Message:

Mac OSX Launcher:

  • Fixed issue with >> and compilers in C++ in subprocess.hpp
  • Added queue for logger
  • Misc
Location:
launchers/macosx/include
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • launchers/macosx/include/PidWatcher.h

    re8d371e rb40b987  
    99using HandleFunction = std::function<void(int)>;
    1010
    11 static void noteProcDeath(CFFileDescriptorRef fdref, CFOptionFlags callBackTypes, void *info) {
     11static inline void noteProcDeath(CFFileDescriptorRef fdref, CFOptionFlags callBackTypes, void *info) {
    1212    struct kevent kev;
    1313    int fd = CFFileDescriptorGetNativeDescriptor(fdref);
  • launchers/macosx/include/strutil.hpp

    re8d371e rb40b987  
    1010#include <locale>
    1111#include "optional.h"
     12
     13#import <Foundation/NSString.h>
    1214
    1315#include <CoreFoundation/CoreFoundation.h>
     
    99101}
    100102
     103NSString* stdStringToNSString(std::string &stdstr) {
     104  return [NSString stringWithUTF8String:stdstr.c_str()];
     105}
     106
     107std::string nsStringToStd(NSString* nsStr) {
     108  const char *charlist = [nsStr UTF8String];
     109  return std::string(charlist);
     110}
     111
    101112#if __cplusplus > 201402L
    102113
  • launchers/macosx/include/subprocess.hpp

    re8d371e rb40b987  
    3535#define SUBPROCESS_HPP
    3636
     37#ifdef __cplusplus
     38
    3739#include <map>
    3840#include <algorithm>
     
    698700
    699701template <typename F>
    700 struct has_type<F, param_pack<>> {
     702struct has_type<F, param_pack<> > {
    701703  static constexpr bool value = false;
    702704};
    703705
    704706template <typename F, typename... T>
    705 struct has_type<F, param_pack<F, T...>> {
     707struct has_type<F, param_pack<F, T...> > {
    706708  static constexpr bool value = true;
    707709};
    708710
    709711template <typename F, typename H, typename... T>
    710 struct has_type<F, param_pack<H,T...>> {
     712struct has_type<F, param_pack<H,T...> > {
    711713  static constexpr bool value =
    712     std::is_same<F, typename std::decay<H>::type>::value ? true : has_type<F, param_pack<T...>>::value;
     714    std::is_same<F, typename std::decay<H>::type>::value ? true : has_type<F, param_pack<T...> >::value;
    713715};
    714716
     
    15291531  OutBuffer check_output_impl(F& farg, Args&&... args)
    15301532  {
    1531     static_assert(!detail::has_type<output, detail::param_pack<Args...>>::value, "output not allowed in args");
     1533    static_assert(!detail::has_type<output, detail::param_pack<Args...> >::value, "output not allowed in args");
    15321534    auto p = Popen(std::forward<F>(farg), std::forward<Args>(args)..., output{PIPE});
    15331535    auto res = p.communicate();
     
    16281630};
    16291631
     1632#endif // __cplusplus
     1633
    16301634#endif // SUBPROCESS_HPP
Note: See TracChangeset for help on using the changeset viewer.