Login Page - Create Account

Support Board


Date/Time: Tue, 07 May 2024 15:31:37 +0000



Post From: ACSIL: using std::map (dictionary) for referring to Subraphs

[2015-10-07 17:55:28]
Sierra Chart Engineering - Posts: 104368

My understanding is that it creates a reference, so “bullish” is not an array in its own right, but rather a pointer to the array contained by sc.Subgraph[0]. I hope my understanding is correct.
Yes, this is correct.

1.
std::map <SCString, SCSubgraphRef> ControlLine ;

This will not work because STL requires copyable objects.

2. The memory use will not be anything additional because SCFloatArray is still only a reference class.

For clarity, this line should be like this:
ControlLine[“POC”] = sc.Subgraph[1].Data

And we are not certain this will always work properly under all conditions. For example, there could be some member functions of the SCFloatArray which will not work properly.

3. You cannot but it really will not be necessary because a copy is not taken anyway.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2015-10-07 17:56:40