Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an add-on over the memory region for storing tuples. #49

Open
marat1961 opened this issue Nov 12, 2020 · 0 comments
Open

Create an add-on over the memory region for storing tuples. #49

marat1961 opened this issue Nov 12, 2020 · 0 comments

Comments

@marat1961
Copy link
Owner

Then we could assume that we have a typed region that contains an array of data described by some tuple.
An easy interface for accessing an array of values would be extremely useful.

var 
  meta: TsgTupleMeta;
  rgn: PMemoryRegion;
  tuple1, tuple2: TsgTuple;
  ptr: Pointer;
  pv: PVector;
  ps: PChar;
  pi: PInteger;
begin  
  meta.MakeTrio<TVector, string, Integer>(nil, True);  
  rgn := meta.MakeTupleRegion;
  tuple1 := rgn[5];
  tuple2 := rgn[7];
  tuple1.Assign(rgn[7]);  
  ptr := tuple.tie(0);
  pi := tuple.tie<TVector>(0);
  ps := tuple.tie<string>(1);
  pv := tuple.tie<Integer>(2);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant