Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index


On Tue, Sep 11, 2018 at 1:06 PM, Rahul Gurung <gurungrahul2@gmail.com> wrote:
Hey,


Thanks but can you elaborate a little more about sequence ? What it really
is and how is effects the data type or its functions ?

I have never used an uno::Sequence object before.  So, guessing from
the name, the object is a container object, holding a collection of
objects.  Some examples (assuming that my guess is correct) are below:

uno::Sequence<table::CellRangeAddress> collectionOfAddresses;
uno::Sequence<std::string> collectionOfStandardCppStrings;
struct IntegerWrapper {
  int value;
};
uno::Sequence<IntegerWrapper> collectionOfIntValues;
uno::Sequence<uno::Sequence<std::string>> collectionOfCollectionsOfStrings;

A container object affects neither the data type nor the functions of
the contained objects.  Instead, a container object provides
facilities to deal with a collection of objects, for example, to
iterate over all of the contained objects as illustrated below
(assuming my guess is correct tnat uno::Sequence class defines the
`begin' and `end' member functions):

uno::Sequence<std::string> collectionOfStandardCppStrings;
// fill in collectionOfStandardCppStrings with std::string objects
for (auto itr = collectionOfStandardCppStrings.begin();
     itr != collectionOfStandardCppStrings.end(); ++itr) {
  std::cout << *itr << '\n';
}

--
Best regards,
Tadeus

On 11 September 2018 at 14:39, Tadeus Prastowo <tadeus.prastowo@unitn.it>
wrote:

On Tue, Sep 11, 2018 at 9:49 AM, Rahul Gurung <gurungrahul2@gmail.com>
wrote:
Hey,

What is difference between variable declared as

uno::Sequence<table::CellRangeAddress> aRanges;

aRanges is a variable of an uno::Sequence object.  The object is
likely a sequence of a table::CellRangeAddress objects.

and a simple one as

table::CellRangeAddress aRanges;

aRanges is a variable of a single table::CellRangeAddress object.

Thanks,
RG

--
Best regards,
Tadeus

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.