Aspose.Tasks for C++
OleObject.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="OleObject.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/array.h>
9 #include <cstdint>
10 
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 namespace IO
18 {
19 namespace MSProject
20 {
21 class MppOleObjectReader;
22 class MppOleObjectWriter;
23 class MppPdfOleObjectWriter;
24 class MPPReader;
25 } // namespace MSProject
26 } // namespace IO
27 class View;
28 } // namespace Tasks
29 } // namespace Aspose
30 
31 namespace Aspose {
32 
33 namespace Tasks {
34 
35 /// <summary>
36 /// Represents an OLE object which can be inserter into Gantt Chart View of an MPP file.
37 /// </summary>
38 class ASPOSE_TASKS_SHARED_CLASS OleObject : public System::Object
39 {
40  typedef OleObject ThisType;
41  typedef System::Object BaseType;
42 
43  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
44  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
45 
46  friend class Aspose::Tasks::IO::MSProject::MppPdfOleObjectWriter;
47  friend class Aspose::Tasks::IO::MSProject::MppOleObjectReader;
48  friend class Aspose::Tasks::IO::MSProject::MppOleObjectWriter;
49  friend class Aspose::Tasks::IO::MSProject::MPPReader;
50 
51 public:
52 
53  /// <summary>
54  /// Gets the name of the instance of the OLE object.
55  /// </summary>
56  ASPOSE_TASKS_SHARED_API System::String get_Name() const;
57  /// <summary>
58  /// Sets the name of the instance of the OLE object.
59  /// </summary>
60  ASPOSE_TASKS_SHARED_API void set_Name(const System::String& value);
61  /// <summary>
62  /// Gets the application name to open the embedded object with.
63  /// </summary>
64  ASPOSE_TASKS_SHARED_API System::String get_ApplicationName() const;
65  /// <summary>
66  /// Sets the application name to open the embedded object with.
67  /// </summary>
68  ASPOSE_TASKS_SHARED_API void set_ApplicationName(const System::String& value);
69  /// <summary>
70  /// Gets the file format of the embedded object.
71  /// </summary>
72  ASPOSE_TASKS_SHARED_API System::String get_FileFormat() const;
73  /// <summary>
74  /// Sets the file format of the embedded object.
75  /// </summary>
76  ASPOSE_TASKS_SHARED_API void set_FileFormat(const System::String& value);
77  /// <summary>
78  /// Gets the embedded file's data; null if no data was embedded.
79  /// </summary>
80  ASPOSE_TASKS_SHARED_API const System::ArrayPtr<uint8_t>& get_Content() const;
81  /// <summary>
82  /// Sets the embedded file's data; null if no data was embedded.
83  /// </summary>
84  ASPOSE_TASKS_SHARED_API void set_Content(const System::ArrayPtr<uint8_t>& value);
85  /// <summary>
86  /// Gets the label of the inserted object.
87  /// </summary>
88  ASPOSE_TASKS_SHARED_API System::String get_Label() const;
89  /// <summary>
90  /// Sets the label of the inserted object.
91  /// </summary>
92  ASPOSE_TASKS_SHARED_API void set_Label(const System::String& value);
93  /// <summary>
94  /// Gets the full path of the inserted object.
95  /// </summary>
96  ASPOSE_TASKS_SHARED_API System::String get_FullPath() const;
97  /// <summary>
98  /// Sets the full path of the inserted object.
99  /// </summary>
100  ASPOSE_TASKS_SHARED_API void set_FullPath(const System::String& value);
101  /// <summary>
102  /// Gets the path to the temporary file of the inserted object.
103  /// </summary>
104  ASPOSE_TASKS_SHARED_API System::String get_TemporaryFile() const;
105  /// <summary>
106  /// Sets the path to the temporary file of the inserted object.
107  /// </summary>
108  ASPOSE_TASKS_SHARED_API void set_TemporaryFile(const System::String& value);
109  /// <summary>
110  /// Gets a flag indicating that OLE object should be shown either as an icon or as its regular picture.
111  /// </summary>
112  ASPOSE_TASKS_SHARED_API bool get_DisplayAsIcon() const;
113  /// <summary>
114  /// Sets a flag indicating that OLE object should be shown either as an icon or as its regular picture.
115  /// </summary>
116  ASPOSE_TASKS_SHARED_API void set_DisplayAsIcon(bool value);
117  /// <summary>
118  /// Gets a value indicating whether the project file contains only a link to the actual data stored at the link source.
119  /// </summary>
120  ASPOSE_TASKS_SHARED_API bool get_Linked();
121  /// <summary>
122  /// Gets the instance of the <see cref="View"></see> class the inserted object belongs to.
123  /// </summary>
124  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Tasks::View> get_View() const;
125  /// <summary>
126  /// Sets the instance of the <see cref="View"></see> class the inserted object belongs to.
127  /// </summary>
128  ASPOSE_TASKS_SHARED_API void set_View(const System::SharedPtr<Aspose::Tasks::View>& value);
129  /// <summary>
130  /// Gets the object id.
131  /// </summary>
132  ASPOSE_TASKS_SHARED_API int32_t get_Id() const;
133  /// <summary>
134  /// Sets the object id.
135  /// </summary>
136  ASPOSE_TASKS_SHARED_API void set_Id(int32_t value);
137 
138  /// <summary>
139  /// Initializes a new instance of the <see cref="OleObject"></see> class.
140  /// </summary>
141  ASPOSE_TASKS_SHARED_API OleObject();
142 
143 protected:
144 
145  /// <summary>
146  /// Gets the link name in the compound file (This link points to the OLE data).
147  /// </summary>
148  ASPOSE_TASKS_SHARED_API System::String get_Link() const;
149  /// <summary>
150  /// Sets the link name in the compound file (This link points to the OLE data).
151  /// </summary>
152  ASPOSE_TASKS_SHARED_API void set_Link(const System::String& value);
153  /// <summary>
154  /// Gets the Id of view the OLE object belongs to.
155  /// </summary>
156  ASPOSE_TASKS_SHARED_API int32_t get_ViewId() const;
157  /// <summary>
158  /// Sets the Id of view the OLE object belongs to.
159  /// </summary>
160  ASPOSE_TASKS_SHARED_API void set_ViewId(int32_t value);
161 
162  /// <summary>
163  /// Returns directory name in MPP file by OLE object link.
164  /// </summary>
165  /// <returns>Returns the directory name.</returns>
166  ASPOSE_TASKS_SHARED_API System::String GetMppFolderNameByLink();
167  #ifdef ASPOSE_GET_SHARED_MEMBERS
168  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
169  #endif
170 
171 
172 private:
173 
174  System::SharedPtr<Aspose::Tasks::View> view;
175  System::String pr_Name;
176  System::String pr_ApplicationName;
177  System::String pr_FileFormat;
178  System::ArrayPtr<uint8_t> pr_Content;
179  System::String pr_Label;
180  System::String pr_FullPath;
181  System::String pr_TemporaryFile;
182  bool pr_DisplayAsIcon;
183  int32_t pr_Id;
184  System::String pr_Link;
185  int32_t pr_ViewId;
186 
187 };
188 
189 } // namespace Tasks
190 } // namespace Aspose
191 
192 
Represents an OLE object which can be inserter into Gantt Chart View of an MPP file.
Definition: OleObject.h:39
void set_DisplayAsIcon(bool value)
Sets a flag indicating that OLE object should be shown either as an icon or as its regular picture.
void set_TemporaryFile(const System::String &value)
Sets the path to the temporary file of the inserted object.
void set_Name(const System::String &value)
Sets the name of the instance of the OLE object.
System::String get_FileFormat() const
Gets the file format of the embedded object.
System::SharedPtr< Aspose::Tasks::View > get_View() const
Gets the instance of the View class the inserted object belongs to.
void set_Id(int32_t value)
Sets the object id.
void set_View(const System::SharedPtr< Aspose::Tasks::View > &value)
Sets the instance of the View class the inserted object belongs to.
void set_FileFormat(const System::String &value)
Sets the file format of the embedded object.
System::String get_FullPath() const
Gets the full path of the inserted object.
bool get_DisplayAsIcon() const
Gets a flag indicating that OLE object should be shown either as an icon or as its regular picture.
int32_t get_Id() const
Gets the object id.
const System::ArrayPtr< uint8_t > & get_Content() const
Gets the embedded file's data; null if no data was embedded.
System::String get_Label() const
Gets the label of the inserted object.
void set_ApplicationName(const System::String &value)
Sets the application name to open the embedded object with.
void set_Content(const System::ArrayPtr< uint8_t > &value)
Sets the embedded file's data; null if no data was embedded.
System::String get_TemporaryFile() const
Gets the path to the temporary file of the inserted object.
void set_FullPath(const System::String &value)
Sets the full path of the inserted object.
OleObject()
Initializes a new instance of the OleObject class.
System::String get_ApplicationName() const
Gets the application name to open the embedded object with.
bool get_Linked()
Gets a value indicating whether the project file contains only a link to the actual data stored at th...
void set_Label(const System::String &value)
Sets the label of the inserted object.
System::String get_Name() const
Gets the name of the instance of the OLE object.
Definition: Asn.h:13