Sha256: 2188f115057ec6199df19be8212dd2a7a48338cd3ab837bf8832cc860ccc215a

Contents?: true

Size: 1.48 KB

Versions: 92

Compression:

Stored size: 1.48 KB

Contents

#ifndef SASS_PLUGINS_H
#define SASS_PLUGINS_H

#include <string>
#include <vector>
#include "utf8_string.hpp"
#include "sass/functions.h"

#ifdef _WIN32

  #define LOAD_LIB(var, path) HMODULE var = LoadLibraryW(UTF_8::convert_to_utf16(path).c_str())
  #define LOAD_LIB_WCHR(var, path_wide_str) HMODULE var = LoadLibraryW(path_wide_str.c_str())
  #define LOAD_LIB_FN(type, var, name) type var = (type) GetProcAddress(plugin, name)
  #define CLOSE_LIB(var) FreeLibrary(var)

  #ifndef dlerror
  #define dlerror() 0
  #endif

#else

  #define LOAD_LIB(var, path) void* var = dlopen(path.c_str(), RTLD_LAZY)
  #define LOAD_LIB_FN(type, var, name) type var = (type) dlsym(plugin, name)
  #define CLOSE_LIB(var) dlclose(var)

#endif

namespace Sass {


  class Plugins {

    public: // c-tor
      Plugins(void);
      ~Plugins(void);

    public: // methods
      // load one specific plugin
      bool load_plugin(const std::string& path);
      // load all plugins from a directory
      size_t load_plugins(const std::string& path);

    public: // public accessors
      const std::vector<Sass_Importer_Entry> get_headers(void) { return headers; }
      const std::vector<Sass_Importer_Entry> get_importers(void) { return importers; }
      const std::vector<Sass_Function_Entry> get_functions(void) { return functions; }

    private: // private vars
      std::vector<Sass_Importer_Entry> headers;
      std::vector<Sass_Importer_Entry> importers;
      std::vector<Sass_Function_Entry> functions;

  };

}

#endif

Version data entries

92 entries across 75 versions & 17 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/node-sass/src/libsass/src/plugins.hpp
optimacms-0.1.61 spec/dummy/node_modules/@rails/webpacker/node_modules/node-sass/src/libsass/src/plugins.hpp
disco_app-0.18.0 test/dummy/node_modules/node-sass/src/libsass/src/plugins.hpp
disco_app-0.18.2 test/dummy/node_modules/node-sass/src/libsass/src/plugins.hpp
tang-0.2.1 spec/tang_app/node_modules/node-sass/src/libsass/src/plugins.hpp
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/node-sass/src/libsass/src/plugins.hpp
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/node-sass/src/libsass/src/plugins.hpp
ruby2js-4.0.4 lib/tasks/testrails/node_modules/node-sass/src/libsass/src/plugins.hpp
ruby2js-4.0.3 lib/tasks/testrails/node_modules/node-sass/src/libsass/src/plugins.hpp
tang-0.2.0 spec/tang_app/node_modules/node-sass/src/libsass/src/plugins.hpp
tang-0.1.0 spec/tang_app/node_modules/node-sass/src/libsass/src/plugins.hpp
tang-0.0.9 spec/tang_app/node_modules/node-sass/src/libsass/src/plugins.hpp
enju_library-0.3.8 spec/dummy/node_modules/node-sass/src/libsass/src/plugins.hpp
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/sassc-2.0.0/ext/libsass/src/plugins.hpp
sassc-2.3.0 ext/libsass/src/plugins.hpp
ilog-0.4.1 node_modules/node-sass/src/libsass/src/plugins.hpp
ilog-0.4.0 node_modules/node-sass/src/libsass/src/plugins.hpp
ilog-0.3.3 node_modules/node-sass/src/libsass/src/plugins.hpp
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/sassc-2.0.1/ext/libsass/src/plugins.hpp
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/sassc-2.1.0-x86_64-linux/ext/libsass/src/plugins.hpp