1 line
7.2 KiB
JavaScript
1 line
7.2 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[88],{146:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return p})),r.d(t,"metadata",(function(){return o})),r.d(t,"rightToc",(function(){return b})),r.d(t,"default",(function(){return l}));var a=r(2),n=r(6),c=(r(0),r(471)),p={id:"wrappercache",title:"WrapperCache",sidebar_label:"WrapperCache"},o={unversionedId:"api/generated/classes/wrappercache",id:"api/generated/classes/wrappercache",isDocsHomePage:!1,title:"WrapperCache",description:"JS side cache for wrapper objects.",source:"@site/docs/api/generated/classes/wrappercache.md",slug:"/api/generated/classes/wrappercache",permalink:"/docs/api/generated/classes/wrappercache",editUrl:"https://github.com/nodegui/nodegui/edit/master/website/docs/api/generated/classes/wrappercache.md",version:"current",sidebar_label:"WrapperCache",sidebar:"api",previous:{title:"StyleSheet",permalink:"/docs/api/generated/classes/stylesheet"},next:{title:"YogaWidget",permalink:"/docs/api/generated/classes/yogawidget"}},b=[{value:"Hierarchy",id:"hierarchy",children:[]},{value:"Index",id:"index",children:[{value:"Constructors",id:"constructors",children:[]},{value:"Methods",id:"methods",children:[]}]},{value:"Constructors",id:"constructors-1",children:[{value:"constructor",id:"constructor",children:[]}]},{value:"Methods",id:"methods-1",children:[{value:"get",id:"get",children:[]}]}],i={rightToc:b};function l(e){var t=e.components,r=Object(n.a)(e,["components"]);return Object(c.b)("wrapper",Object(a.a)({},i,r,{components:t,mdxType:"MDXLayout"}),Object(c.b)("p",null,"JS side cache for wrapper objects."),Object(c.b)("p",null,'This is mainly used for caching wrappers of Qt objects which are not\ndirectly created by our Nodejs application. The purpose of the cache\nis to keep "alive" wrapper objects and their underlying C++ wrappers\nwhich may be connected to Qt signals from the real Qt object.\nThis makes it easier for application to grab one of these objects,\nset up event handlers, and then let the object go and ',Object(c.b)("em",{parentName:"p"},"not")," have the\nwrapper automatically and unexpectedly garbage collected."),Object(c.b)("h2",{id:"hierarchy"},"Hierarchy"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("strong",{parentName:"li"},"WrapperCache"))),Object(c.b)("h2",{id:"index"},"Index"),Object(c.b)("h3",{id:"constructors"},"Constructors"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(a.a)({parentName:"li"},{href:"/docs/api/generated/classes/wrappercache#constructor"}),"constructor"))),Object(c.b)("h3",{id:"methods"},"Methods"),Object(c.b)("ul",null,Object(c.b)("li",{parentName:"ul"},Object(c.b)("a",Object(a.a)({parentName:"li"},{href:"/docs/api/generated/classes/wrappercache#get"}),"get"))),Object(c.b)("h2",{id:"constructors-1"},"Constructors"),Object(c.b)("h3",{id:"constructor"},"constructor"),Object(c.b)("p",null,"+"," ",Object(c.b)("strong",{parentName:"p"},"new WrapperCache"),"(): ",Object(c.b)("em",{parentName:"p"},Object(c.b)("a",Object(a.a)({parentName:"em"},{href:"/docs/api/generated/classes/wrappercache"}),"WrapperCache"))),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Returns:")," ",Object(c.b)("em",{parentName:"p"},Object(c.b)("a",Object(a.a)({parentName:"em"},{href:"/docs/api/generated/classes/wrappercache"}),"WrapperCache"))),Object(c.b)("h2",{id:"methods-1"},"Methods"),Object(c.b)("h3",{id:"get"},"get"),Object(c.b)("p",null,"\u25b8 ",Object(c.b)("strong",{parentName:"p"},"get"),"\u2039",Object(c.b)("strong",{parentName:"p"},"T"),"\u203a(",Object(c.b)("inlineCode",{parentName:"p"},"wrapperConstructor"),": object, ",Object(c.b)("inlineCode",{parentName:"p"},"native"),": ",Object(c.b)("a",Object(a.a)({parentName:"p"},{href:"/docs/api/generated/globals#nativeelement"}),"NativeElement"),"): ",Object(c.b)("em",{parentName:"p"},"T")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Type parameters:")),Object(c.b)("p",null,"\u25aa ",Object(c.b)("strong",{parentName:"p"},"T")),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Parameters:")),Object(c.b)("p",null,"\u25aa ",Object(c.b)("strong",{parentName:"p"},"wrapperConstructor"),": ",Object(c.b)("em",{parentName:"p"},"object")),Object(c.b)("table",null,Object(c.b)("thead",{parentName:"table"},Object(c.b)("tr",{parentName:"thead"},Object(c.b)("th",Object(a.a)({parentName:"tr"},{align:null}),"Name"),Object(c.b)("th",Object(a.a)({parentName:"tr"},{align:null}),"Type"))),Object(c.b)("tbody",{parentName:"table"},Object(c.b)("tr",{parentName:"tbody"},Object(c.b)("td",Object(a.a)({parentName:"tr"},{align:null}),Object(c.b)("inlineCode",{parentName:"td"},"constructor")),Object(c.b)("td",Object(a.a)({parentName:"tr"},{align:null}))))),Object(c.b)("p",null,"\u25aa ",Object(c.b)("strong",{parentName:"p"},"native"),": ",Object(c.b)("em",{parentName:"p"},Object(c.b)("a",Object(a.a)({parentName:"em"},{href:"/docs/api/generated/globals#nativeelement"}),"NativeElement"))),Object(c.b)("p",null,Object(c.b)("strong",{parentName:"p"},"Returns:")," ",Object(c.b)("em",{parentName:"p"},"T")))}l.isMDXComponent=!0},471:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return m}));var a=r(0),n=r.n(a);function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},c=Object.keys(e);for(a=0;a<c.length;a++)r=c[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a<c.length;a++)r=c[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=n.a.createContext({}),l=function(e){var t=n.a.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=l(e.components);return n.a.createElement(i.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},u=n.a.forwardRef((function(e,t){var r=e.components,a=e.mdxType,c=e.originalType,p=e.parentName,i=b(e,["components","mdxType","originalType","parentName"]),s=l(r),u=a,m=s["".concat(p,".").concat(u)]||s[u]||d[u]||c;return r?n.a.createElement(m,o(o({ref:t},i),{},{components:r})):n.a.createElement(m,o({ref:t},i))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=r.length,p=new Array(c);p[0]=u;var o={};for(var b in t)hasOwnProperty.call(t,b)&&(o[b]=t[b]);o.originalType=e,o.mdxType="string"==typeof e?e:a,p[1]=o;for(var i=2;i<c;i++)p[i]=r[i];return n.a.createElement.apply(null,p)}return n.a.createElement.apply(null,r)}u.displayName="MDXCreateElement"}}]); |