• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

passing vectors,maps from javascript to c++ shared library

New Here ,
Jul 31, 2017 Jul 31, 2017

Copy link to clipboard

Copied

  • Is it possible to pass vectors or maps from javascript to c++ shared library?
  • I went through the Extendscript Toolkit SDK which contains sample programs which shows how to pass data from c++ and javascript
  • I am able to pass basic data types such as integer and character etc to c++ shared library through the structure called TaggedData
  • Iam not able to send vector or maps to c++ shared library
  • If i alter the TaggedData structure(datas that are communicated between javascript and c++) then the code will fail
  • Is there any possible way to send vector and maps to c++ shared library?
TOPICS
SDK

Views

648

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Aug 01, 2017 Aug 01, 2017

I know of no such method.

As you point out, 'flat' basic data types work fine. Vectors and maps are in-memory structures, preventing them from being easily passed across the JavaScript <--> C++ boundary.

What is it you're trying to create?

Votes

Translate

Translate
Adobe Employee ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

I know of no such method.

As you point out, 'flat' basic data types work fine. Vectors and maps are in-memory structures, preventing them from being easily passed across the JavaScript <--> C++ boundary.

What is it you're trying to create?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2017 Aug 02, 2017

Copy link to clipboard

Copied

Is it possible to change the taggedData structure in the samples provided in the ExtendScript toolkit SDK?

Screen Shot 2017-08-02 at 3.08.11 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 02, 2017 Aug 02, 2017

Copy link to clipboard

Copied

I doubt it; JavaScript doesn't have any concept like a C 'union'. Also, notice that I mentioned 'flat' data structures? The 'string' and 'hObject' members of that union variable point outside the actual tagged data structure, to external memory. That's 'un-flat', and will never successfully get passed across a C / ExtendScript boundary.


Still, PPro's ExtendScript API allows for full control over the XMP associated with any given media.

So, again; what is it you're trying to create?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2017 Aug 02, 2017

Copy link to clipboard

Copied

I'am creating an extension for  PPro and some major operations are done in c++,so i need to pass vectors and maps from javascript to c++

Example

var cars=["bmw","benz"];

i need to pass cars object to c++ shared library, but TaggedData structure does'nt support this, so i was wondering if there is some other way i can pass this cars object

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Aug 03, 2017 Aug 03, 2017

Copy link to clipboard

Copied

LATEST

Let's leave aside the implementation details for a moment...

Could you provide an overview of the workflow(s) you'd like to support, from the user's perspective? That will help me give better guidance. [write me at b b b at adobe dot com, if you'd rather not discuss those workflows in public.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines