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 Aspose
12 {
13 namespace Tasks
14 {
15 namespace Primavera
16 {
17 class PrimaveraProjectInfo;
18 } // namespace Primavera
19 } // namespace Tasks
20 } // namespace Aspose
21 namespace System
22 {
23 namespace Collections
24 {
25 namespace Generic
26 {
27 template <typename> class List;
28 } // namespace Generic
29 } // namespace Collections
30 namespace IO
31 {
32 class Stream;
33 } // namespace IO
34 class String;
35 } // namespace System
36 
37 namespace Aspose {
38 
39 namespace Tasks {
40 
41 /// <summary>
42 /// Represents a reader which allows to retrieve Project UIDs from Primavera Xml file.
43 /// </summary>
44 class ASPOSE_TASKS_SHARED_CLASS PrimaveraXmlReader : public Aspose::Tasks::PrimaveraBaseReader
45 {
47  typedef Aspose::Tasks::PrimaveraBaseReader BaseType;
48 
49  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
50  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
51 
52 public:
53 
54  /// <summary>
55  /// Initializes a new instance of the <see cref="PrimaveraXmlReader"></see> class.
56  /// </summary>
57  /// <param name="templatePath">Path to template where Primavera Xml project or projects are located</param>
58  ASPOSE_TASKS_SHARED_API PrimaveraXmlReader(const System::String& templatePath);
59  /// <summary>
60  /// Initializes a new instance of the <see cref="PrimaveraXmlReader"></see> class.
61  /// </summary>
62  /// <param name="stream">Stream containing Primavera Xml content.</param>
63  ASPOSE_TASKS_SHARED_API PrimaveraXmlReader(const System::SharedPtr<System::IO::Stream>& stream);
64 
65 protected:
66 
67  /// <summary>
68  /// Reads multi project data from the provided stream.
69  /// </summary>
70  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Primavera::PrimaveraProjectInfo>>> LoadFromStream(System::SharedPtr<System::IO::Stream> stream) override;
71 
72 private:
73 
74  static bool IsPrimaveraXmlProject(const System::SharedPtr<System::IO::Stream>& stream);
75  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Primavera::PrimaveraProjectInfo>>> ReadProjectInfos(const System::SharedPtr<System::IO::Stream>& stream);
76 
77 };
78 
79 } // namespace Tasks
80 } // namespace Aspose
81 
82 
Represents a base reader which can be used to read Project UIDs from multi project Primavera XER or X...
Definition: PrimaveraBaseReader.h:49
Represents a reader which allows to retrieve Project UIDs from Primavera Xml file.
Definition: PrimaveraXmlReader.h:45
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