passing FXArray by reference
"John Selverian" <[email protected]> Wed, 1 Oct 2025 20:45:02 -0400
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Organization | JAHM Software |
| Message-ID | <[email protected]> |
This is a multipart message in MIME format.
--===============0453111440453625780==
Content-Type: multipart/related;
boundary="----=_NextPart_000_0003_01DC3314.42D85AB0"
Content-Language: en-us
This is a multipart message in MIME format.
------=_NextPart_000_0003_01DC3314.42D85AB0
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0004_01DC3314.42D85AB0"
------=_NextPart_001_0004_01DC3314.42D85AB0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
I'm currently passing an FXArray by value. I'd like to pass it by
reference since it is very large but I can't seem to get it
right.
In my main program I declare it like this:
FXArray<Test> _testArrayMain;
And I pass it like this:
Search search (_testArrayMain);
In the routine I'm passing it to I have this:
In the header:
FXArray<Test> _testArray;
Search (const FXArray< Test >&);
In the source:
Search::Search(const FXArray< Test >& testArray)
{
_testArray = testArray;
}
It gets passed fine but it takes awhile since it is so big. I've
tried many different ways but I always get many compiler errors.
How would I pass it by reference?
Kind regards,
js
------=_NextPart_001_0004_01DC3314.42D85AB0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta name=3D"Microsoft =
Theme 2.00" content=3D"Concrete 011"><meta http-equiv=3DContent-Type =
content=3D"text/html; charset=3Dus-ascii"><meta name=3DGenerator =
content=3D"Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Verdana",sans-serif;
color:#434343;
mso-ligatures:standardcontextual;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=3Dwhite =
background=3D"cid:[email protected]" lang=3DEN-US =
link=3D"#148120" vlink=3D"#1E3C22" style=3D'word-wrap:break-word'><img =
src=3D"cid:[email protected]" =
v:src=3D"cid:[email protected]" v:shapes=3D"_x0000_Mail" =
width=3D0 height=3D0 class=3Dshape =
style=3D'display:none;width:0;height:0'><!--[if gte mso 9]><xml>
<v:background id=3D"_x0000_s1025" o:bwmode=3D"white" =
o:targetscreensize=3D"1024,768">
<v:fill src=3D"cid:[email protected]" =
o:title=3D"background_concrete" type=3D"frame" />
</v:background></xml><![endif]--><div class=3DWordSection1><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>I&#=
8217;m currently passing an FXArray by value. I’d like to pass it =
by reference since it is very large but I can’t seem to get it =
right.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>In =
my main program I declare it like this:<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>&nb=
sp; &nbs=
p; FXArray<Test> =
_testArrayMain;<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>And=
I pass it like this:<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal =
style=3D'text-indent:.5in'><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>Sea=
rch search (_testArrayMain);<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>In =
the routine I’m passing it to I have this:<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>In =
the header:<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>FXA=
rray<Test> _testArray;<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>Sea=
rch (const FXArray< Test >&);<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>In =
the source:<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>Sea=
rch::Search(const FXArray< Test >& =
testArray)<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>{<o=
:p></o:p></span></p><p class=3DMsoNormal =
style=3D'text-indent:.5in'><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>_te=
stArray =3D testArray;<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>}<o=
:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>It =
gets passed fine but it takes awhile since it is so big. I’ve =
tried many different ways but I always get many compiler =
errors.<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'>How=
would I pass it by reference?<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext'><o:=
p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-=
ligatures:none'>Kind regards,<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-=
ligatures:none'><o:p> </o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Aptos",serif;color:windowtext;mso-=
ligatures:none'>js<o:p></o:p></span></p></div></body></html>
------=_NextPart_001_0004_01DC3314.42D85AB0--
------=_NextPart_000_0003_01DC3314.42D85AB0
Content-Type: image/gif;
name="image001.gif"
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
R0lGODlhHwAfAIAAAODg4AAAACH5BAAAAAAALAAAAAAfAB8AAAIdhI+py+0Po5y02ouz3rz7D4bi
SJbmiabqyrbuOxUAOw==
------=_NextPart_000_0003_01DC3314.42D85AB0--
--===============0453111440453625780==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============0453111440453625780==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Foxgui-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/foxgui-users
--===============0453111440453625780==--