Aspose.Tasks for C++
ResourceSavingArgs.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="ResourceSavingArgs.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.h>
9 
10 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
11 
12 namespace System
13 {
14 namespace IO
15 {
16 class Stream;
17 } // namespace IO
18 } // namespace System
19 
20 namespace Aspose {
21 
22 namespace Tasks {
23 
24 /// <summary>
25 /// This class represents set of data that related to external resource file's saving that
26 /// occurs during conversion to HTML format.
27 /// </summary>
28 class ASPOSE_TASKS_SHARED_CLASS ResourceSavingArgs : public System::Object
29 {
31  typedef System::Object BaseType;
32 
33  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
34  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
35 
36 public:
37 
38  /// <summary>
39  /// Gets the supposed file name that goes from converter to code of custom method.
40  /// Can be use in custom code to decide how to process or where save that file.
41  /// </summary>
42  ASPOSE_TASKS_SHARED_API System::String get_FileName() const;
43  /// <summary>
44  /// Sets the supposed file name that goes from converter to code of custom method.
45  /// Can be use in custom code to decide how to process or where save that file.
46  /// </summary>
47  ASPOSE_TASKS_SHARED_API void set_FileName(const System::String& value);
48  /// <summary>
49  /// Gets a value indicating whether the stream will be kept open after resource saving finishes.
50  /// </summary>
51  ASPOSE_TASKS_SHARED_API bool get_KeepStreamOpen() const;
52  /// <summary>
53  /// Sets a value indicating whether the stream will be kept open after resource saving finishes.
54  /// </summary>
55  ASPOSE_TASKS_SHARED_API void set_KeepStreamOpen(bool value);
56  /// <summary>
57  /// Gets the binary content of saved file.
58  /// </summary>
59  ASPOSE_TASKS_SHARED_API const System::SharedPtr<System::IO::Stream>& get_Stream() const;
60  /// <summary>
61  /// Sets the binary content of saved file.
62  /// </summary>
63  ASPOSE_TASKS_SHARED_API void set_Stream(const System::SharedPtr<System::IO::Stream>& value);
64  /// <summary>
65  /// Gets the resource URI.
66  /// </summary>
67  ASPOSE_TASKS_SHARED_API System::String get_Uri() const;
68  /// <summary>
69  /// Sets the resource URI.
70  /// </summary>
71  ASPOSE_TASKS_SHARED_API void set_Uri(const System::String& value);
72 
73  /// <summary>
74  /// Close stream if KeepStreamOpen is false, else flush it.
75  /// </summary>
76  ASPOSE_TASKS_SHARED_API void CloseStreamIfRequired();
77 
78  ASPOSE_TASKS_SHARED_API ResourceSavingArgs();
79 
80 protected:
81 
82  #ifdef ASPOSE_GET_SHARED_MEMBERS
83  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
84  #endif
85 
86 
87 private:
88 
89  System::String pr_FileName;
90  bool pr_KeepStreamOpen;
91  System::SharedPtr<System::IO::Stream> pr_Stream;
92  System::String pr_Uri;
93 
94 };
95 
96 } // namespace Tasks
97 } // namespace Aspose
98 
99 
This class represents set of data that related to external resource file's saving that occurs during ...
Definition: ResourceSavingArgs.h:29
void set_KeepStreamOpen(bool value)
Sets a value indicating whether the stream will be kept open after resource saving finishes.
System::String get_FileName() const
Gets the supposed file name that goes from converter to code of custom method. Can be use in custom c...
void set_Uri(const System::String &value)
Sets the resource URI.
void set_FileName(const System::String &value)
Sets the supposed file name that goes from converter to code of custom method. Can be use in custom c...
const System::SharedPtr< System::IO::Stream > & get_Stream() const
Gets the binary content of saved file.
bool get_KeepStreamOpen() const
Gets a value indicating whether the stream will be kept open after resource saving finishes.
void CloseStreamIfRequired()
Close stream if KeepStreamOpen is false, else flush it.
void set_Stream(const System::SharedPtr< System::IO::Stream > &value)
Sets the binary content of saved file.
System::String get_Uri() const
Gets the resource URI.
Definition: Asn.h:13