Aspose.Tasks for C++
PrimaveraXmlReader.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="PrimaveraXmlReader.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include "aspose.tasks.cpp/Primavera/PrimaveraBaseReader.h"
9 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
10 
11 namespace System
12 {
13 namespace Collections
14 {
15 namespace Generic
16 {
17 template <typename> class List;
18 } // namespace Generic
19 } // namespace Collections
20 namespace IO
21 {
22 class Stream;
23 } // namespace IO
24 class String;
25 } // namespace System
26 
27 namespace Aspose {
28 
29 namespace Tasks {
30 
31 /// <summary>
32 /// Represents a reader which allows to retrieve Project UIDs from Primavera Xml file.
33 /// </summary>
34 class ASPOSE_TASKS_SHARED_CLASS PrimaveraXmlReader : public Aspose::Tasks::PrimaveraBaseReader
35 {
37  typedef Aspose::Tasks::PrimaveraBaseReader BaseType;
38 
39  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
40  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
41 
42 public:
43 
44  /// <summary>
45  /// Initializes a new instance of the <see cref="PrimaveraXmlReader"></see> class.
46  /// </summary>
47  /// <param name="templatePath">Path to template where Primavera Xml project or projects are located</param>
48  ASPOSE_TASKS_SHARED_API PrimaveraXmlReader(const System::String& templatePath);
49  /// <summary>
50  /// Initializes a new instance of the <see cref="PrimaveraXmlReader"></see> class.
51  /// </summary>
52  /// <param name="stream">Stream containing Primavera Xml content.</param>
53  ASPOSE_TASKS_SHARED_API PrimaveraXmlReader(const System::SharedPtr<System::IO::Stream>& stream);
54 
55 protected:
56 
57  /// <summary>
58  /// Reads multi project data from the provided stream.
59  /// </summary>
60  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<int32_t>> LoadFromStream(System::SharedPtr<System::IO::Stream> stream) override;
61 
62 private:
63 
64  static bool IsPrimaveraXmlProject(const System::SharedPtr<System::IO::Stream>& stream);
65  System::SharedPtr<System::Collections::Generic::List<int32_t>> ReadProjectUids(const System::SharedPtr<System::IO::Stream>& stream);
66 
67 };
68 
69 } // namespace Tasks
70 } // namespace Aspose
71 
72 
Represents a base reader which can be used to read Project UIDs from multi project Primavera XER or X...
Definition: PrimaveraBaseReader.h:45
Represents a reader which allows to retrieve Project UIDs from Primavera Xml file.
Definition: PrimaveraXmlReader.h:35
PrimaveraXmlReader(const System::String &templatePath)
Initializes a new instance of the PrimaveraXmlReader class.
PrimaveraXmlReader(const System::SharedPtr< System::IO::Stream > &stream)
Initializes a new instance of the PrimaveraXmlReader class.
Definition: Asn.h:13