¡@

Home 

c++ Programming Glossary: variant

Pass an array to a wrapped function as pointer+size or range

http://stackoverflow.com/questions/11584599/pass-an-array-to-a-wrapped-function-as-pointersize-or-range

indicates if we've been given a copy . For the second variant the typemaps are substantially similar typemap in numinputs..

How is std::string implemented?

http://stackoverflow.com/questions/1466073/how-is-stdstring-implemented

a short string optimization SSO implementation. In this variant the object contains the usual pointer to data length size of..

Template specialization of particular members?

http://stackoverflow.com/questions/1501357/template-specialization-of-particular-members

then works similar to our i2t of before as the following variant demonstrates which leaves the first parameter variable too so..

return value (not a reference) from the function, bound to a const reference in the calling function; how is its lifetime extended to the scope of the calling function?

http://stackoverflow.com/questions/2615162/return-value-not-a-reference-from-the-function-bound-to-a-const-reference-in

From within function Update the following is called variant I Bind it to a const reference const BoundingBox l_Bbox l_pPlayer.. const BoundingBox l_Bbox l_pPlayer GetBoundingBox variant II Bind it to a const copy const BoundingBox l_Bbox l_pPlayer.. l_Bbox object going out of scope. Though I understand in variant one the copy constructor is not called and thus is slightly..

Operator overloading

http://stackoverflow.com/questions/4421706/operator-overloading

and postfix flavor. To tell one from the other the postfix variants take an additional dummy int argument. If you overload increment.. int X tmp this operator return tmp Note that the postfix variant is implemented in terms of prefix. Also note that postfix does.. postfix does an extra copy. 2 2 Also note that the postfix variant does more work and is therefore less efficient to use than the..

Program can't find libgcc_s_dw2-1.dll [duplicate]

http://stackoverflow.com/questions/4984612/program-cant-find-libgcc-s-dw2-1-dll

commandline argument static libgcc should work. Another variant you could try is plain static . If you don't want to worry about..

How to find an item in a std::vector?

http://stackoverflow.com/questions/571394/how-to-find-an-item-in-a-stdvector

do that c vector std share improve this question Some variant of std find vector.begin vector.end item vector.end share..

Is there a way to instantiate objects from a string holding their class name?

http://stackoverflow.com/questions/582331/is-there-a-way-to-instantiate-objects-from-a-string-holding-their-class-name

you can give the function pointer a return type of boost variant A B C D ... instead. Like if you have a class Foo Bar and Baz.. a class Foo Bar and Baz it looks like this typedef boost variant Foo Bar Baz variant_type template typename T variant_type createInstance.. Baz it looks like this typedef boost variant Foo Bar Baz variant_type template typename T variant_type createInstance return..

Compile a DLL in C/C++, then call it from another program

http://stackoverflow.com/questions/847396/compile-a-dll-in-c-c-then-call-it-from-another-program

from VB and call it I'm fairly certain I can't pass a variant to the DLL...but that's all I know really. update again Okay..

Boolean expression (grammar) parser in c++

http://stackoverflow.com/questions/8706356/boolean-expression-grammar-parser-in-c

a tree data structure using Boost Variant's recursive variant support note the definition of expr struct op_or tag struct.. binop template typename tag struct unop typedef boost variant var boost recursive_wrapper unop op_not boost recursive_wrapper.. lookup table for named variables Traversing a recursive variant may look cryptic at first but the boost static_visitor is surprisingly..

C++11 anonymous union with non-trivial members

http://stackoverflow.com/questions/10693913/c11-anonymous-union-with-non-trivial-members

this question There is no need for placement new here. Variant members won't be initialized by the compiler generated constructor..

How to have template type deduced in std::function arguments with lambda?

http://stackoverflow.com/questions/14784441/how-to-have-template-type-deduced-in-stdfunction-arguments-with-lambda

so I made up this function template typename T typename Variant void if_init Variant opt_variant std function void T functor.. function template typename T typename Variant void if_init Variant opt_variant std function void T functor if auto ptr boost get.. ignored failed template argument deduction void if_init Variant opt_variant std function void T functor If I write if_init double..

Creating dynamic type in C++

http://stackoverflow.com/questions/16047560/creating-dynamic-type-in-c

a nutshell class MyBase public MyBase virtual run 0 class VariantA public MyBase public VariantA virtual run Run code specific.. MyBase virtual run 0 class VariantA public MyBase public VariantA virtual run Run code specific to hardware Variant A class.. public VariantA virtual run Run code specific to hardware Variant A class VariantB public MyBase public VariantB virtual run ..

C/C++: When would anyone use a union? Is it basically a remnant from the C only days?

http://stackoverflow.com/questions/4788965/c-c-when-would-anyone-use-a-union-is-it-basically-a-remnant-from-the-c-only

valid. For example let's say you want to create your own Variant type struct my_variant_t int type union char char_value short..

How do boost::variant and boost::any work?

http://stackoverflow.com/questions/4988939/how-do-boostvariant-and-boostany-work

a pointer. How does Any know what type it holds How does Variant achieve what it does through templates I would like to know..

best way to do variant visitation with lambdas

http://stackoverflow.com/questions/7867555/best-way-to-do-variant-visitation-with-lambdas

lambda_visitor.h #include boost variant.hpp namespace Variant template typename ReturnType typename... Lambdas struct lambda_visitor.. run variant_t a b c a 42 b 3.14159265 auto visitor Variant make_lambda_visitor int int v int return v 1 double v int return.. b HAssertMsg result 6 unexpected auto blankVisitor Variant make_lambda_visitor_override_blank int int v int return 1 ..

C++ plugin for Unity “EntryPointNotFoundExeption”

http://stackoverflow.com/questions/11619986/c-plugin-for-unity-entrypointnotfoundexeption

clsObj ULONG numElems WBEM_S_FALSE if FAILED hRes break VARIANT vRet VariantInit vRet if SUCCEEDED clsObj Get L Description..

Add support to print & preview HTML in a dialog-based MFC app

http://stackoverflow.com/questions/18926793/add-support-to-print-preview-html-in-a-dialog-based-mfc-app

Exec CGID_DocHostCommandHandler OLECMDID_PRINT2 VARIANT VT_UNKNOWN NULL . The 3rd parameter contains an object which..

How to retrieve the Interface ID of a COM class so that it can be passed to CoCreateInstance?

http://stackoverflow.com/questions/2313432/how-to-retrieve-the-interface-id-of-a-com-class-so-that-it-can-be-passed-to-cocr

idFileExists unsigned int puArgErr 0 VARIANT VarResult EXCEPINFO pExcepInfo VariantInit VarResult VariantInit.. memset pParams 0 sizeof DISPPARAMS pParams.cArgs 1 VARIANT Arguments 1 VariantInit Arguments 0 pParams.rgvarg Arguments..

API Hook on a COM object function?

http://stackoverflow.com/questions/3692836/api-hook-on-a-com-object-function

NULL CLSCTX_ALL IID_IShellWindows void psw VARIANT v V_VT v VT_I4 IDispatch pdisp for V_I4 v 0 fFound psw Item..

Calling C++ function from JavaScript script running in a web browser control

http://stackoverflow.com/questions/3747414/calling-c-function-from-javascript-script-running-in-a-web-browser-control

DISPID_PROPERTYPUT DISPPARAMS params params.rgvarg new VARIANT 1 params.rgvarg 0 .pdispVal custObj params.rgvarg 0 .vt VT_DISPATCH.. REFIID riid LCID lcid WORD wFlags DISPPARAMS Params VARIANT pVarResult EXCEPINFO pExcepInfo UINT puArgErr Noteworthy implementations.. REFIID riid LCID lcid WORD wFlags DISPPARAMS Params VARIANT pVarResult EXCEPINFO pExcepInfo UINT puArgErr MessageBox NULL..

How to get a list of video capture devices (web cameras) on windows? (C++)

http://stackoverflow.com/questions/4286223/how-to-get-a-list-of-video-capture-devices-web-cameras-on-windows-c

pPropBag if FAILED hr pMoniker Release continue VARIANT var VariantInit var Get description or friendly name. hr pPropBag..

Convert VARIANT to…?

http://stackoverflow.com/questions/606527/convert-variant-to

VARIANT to&hellip Note Attempting to invoke a method of an interface.. inline _variant_t IS8Simulation GetSimObject _bstr_t Name VARIANT _result VariantInit _result HRESULT _hr get_SimObject Name _result.. _result false Note resultsDataString is of struct tagVARIANT VARTYPE vt is 9 unsigned short IDispatch IDispatch interface..

return array from com object

http://stackoverflow.com/questions/6338879/return-array-from-com-object

look like this id 1 HRESULT GetAlarms out retval SAFEARRAY VARIANT pAlarms The corresponding C method would look like this STDMETHODIMP.. CMyClass GetAlarms SAFEARRAY pAlarms CComSafeArray VARIANT alarms 3 CComVariant value value L First Alarm alarms.SetAt..

Using Component Object Model (COM) on non-Microsoft platforms

http://stackoverflow.com/questions/84269/using-component-object-model-com-on-non-microsoft-platforms

disthelper requires the programmer to setup his her own VARIANT . I'll publish my patches back as soon as I get NDA clearance..

How to get Excel cell value in C++

http://stackoverflow.com/questions/8619530/how-to-get-excel-cell-value-in-c

__uuidof Excel Window void pWindow if hr S_OK try VARIANT result VariantInit result AutoWrap DISPATCH_PROPERTYGET result.. 1 IDispatch pXlRange Get Range from Sheet VARIANT parm parm.vt VT_BSTR parm.bstrVal SysAllocString sOleText.. parm.vt VT_BSTR parm.bstrVal SysAllocString sOleText VARIANT result VariantInit result AutoWrap DISPATCH_PROPERTYGET result..

IE9 fails to fire onscroll event on HTMLWindow2 in BHO

http://stackoverflow.com/questions/9539410/ie9-fails-to-fire-onscroll-event-on-htmlwindow2-in-bho

addEventListener _bstr_t scroll spIDispatch VARIANT_TRUE if SUCCEEDED hr ... Now on your derived class..... __in WORD wFlags __in DISPPARAMS pDispParams __out_opt VARIANT pvarRes __out_opt EXCEPINFO pei __in_opt IServiceProvider..