CFx SDK Documentation  2023 SP0
DbDataLink.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 
26 #ifndef OD_DBDATALINK_H
27 #define OD_DBDATALINK_H
28 
29 #include "DbObject.h"
30 #include "OdValue.h"
31 #include "StringArray.h"
32 
33 #include "TD_PackPush.h"
34 
35 namespace OdDb
36 {
38  {
44  };
45 
47  {
52  };
53 
55  {
58  };
59 
61  {
73  };
74 
76  {
82  };
83 };
84 
95 {
96 public:
98 
99  OdDbDataLink(void);
100 
101  OdString name (void) const;
102  void setName (const OdString& sName);
103  OdString description (void) const;
104  void setDescription (const OdString& sDescription);
105  OdString getToolTip (void) const;
106  void setToolTip (const OdString& sToolTip);
107  OdString dataAdapterId (void) const;
108  void setDataAdapterId (const OdString& sAdapterId);
110  void setConnectionString(const OdString& sConnectionString);
113  OdInt32 updateOption (void) const;
114  void setUpdateOption(OdInt32 nOption);
115  //FELIX_CHANGE_BEGIN Backport from 22.4
117  //FELIX_CHANGE_END
119  OdTimeStamp* pTime,
120  OdString* pErrMessage) const;
121  void setUpdateStatus(const OdString& sErrMessage);
122  bool isValid (void) const;
125  OdStringArray& files) const;
126  //FELIX_CHANGE_BEGIN Backport from 22.4
127  void repathSourceFiles(OdString& sBasePath, OdDb::PathOption nOption);
129  //FELIX_CHANGE_END
130  OdValue getCustomData(const OdString& sKey) const;
131  void setCustomData(const OdString& sKey,
132  const OdValue* pData);
133  //FELIX_CHANGE_BEGIN Backport from 22.4
134  OdDbObjectPtr subWblockClone( OdDbIdMapping& idMap, OdDbObject* owner, bool bPrimary ) const;
135  //FELIX_CHANGE_END
136 
138  OdDbDwgFiler* pFiler);
139  virtual void dwgOutFields(
140  OdDbDwgFiler* pFiler) const;
142  OdDbDxfFiler* pFiler);
143  virtual void dxfOutFields(
144  OdDbDxfFiler* pFiler) const;
145 };
146 
148 
150 
151 
152 //FELIX_CHANGE_BEGIN Backport from 22.4
153 //*************************************************************************
154 // OdDbDataLinkManager
155 //*************************************************************************
156 class OdDbDataLinkManagerImpl;
157 
162 {
163 public:
165 
167 
170  OdDbObjectId createDataLink( const OdString& adapterId, const OdString& name,
171  const OdString& description, const OdString& connectionString );
172 
174 
176 
177  int dataLinkCount( void ) const;
178 
179  int getDataLink( OdDbObjectIdArray& dataLinks ) const;
180 
182 
183  void removeDataLink( const OdString& sKey, OdDbObjectId& idDataLink );
184 
185  void removeDataLink( const OdDbObjectId& idDataLink );
186 
187  void update( const OdDbObjectIdArray& dataIds, OdDb::UpdateDirection nDir, OdDb::UpdateOption nOption );
189 
190  void setDatabase( OdDbDatabase* pDb );
191 protected:
192  OdDbDataLinkManager( OdDbDataLinkManagerImpl* pValImpl );
193  OdDbDataLinkManagerImpl* m_pImpl;
194  friend class OdDbSystemInternals;
195 };
196 
198 
203 {
204 public:
205  //FELIX_CHANGE_BEGIN Compile swig wrapper fix
206  virtual void dataLinkUpdate( OdDbDataLink* pDataLink, OdDb::UpdateDirection nDir, OdDb::UpdateOption nOption, OdError* pError = nullptr ) = 0;
207  virtual void repathSourceFiles( OdString& sBasePath, OdDb::PathOption nOptionm, OdString& path, OdError* pError = nullptr ) = 0;
208  //FELIX_CHANGE_END
209 
211 };
212 
214 //FELIX_CHANGE_END
215 
216 #include "TD_PackPop.h"
217 
218 #endif // OD_DBDATALINK_H
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
int OdInt32
OdResult
Definition: OdResult.h:29
GLuint const GLchar * name
Definition: gles2_ext.h:265
DataLinkGetSourceContext
Definition: DbDataLink.h:76
@ kDataLinkGetSourceContextFileWatcher
Definition: DbDataLink.h:80
@ kDataLinkGetSourceContextOther
Definition: DbDataLink.h:81
@ kDataLinkGetSourceContextUnknown
Definition: DbDataLink.h:77
@ kDataLinkGetSourceContextXrefManager
Definition: DbDataLink.h:79
@ kDataLinkGetSourceContextEtransmit
Definition: DbDataLink.h:78
DataLinkOption
Definition: DbDataLink.h:38
@ kDataLinkHasCustomData
Definition: DbDataLink.h:43
@ kDataLinkOptionDisableInLongTransaction
Definition: DbDataLink.h:42
@ kDataLinkOptionPersistCache
Definition: DbDataLink.h:41
@ kDataLinkOptionNone
Definition: DbDataLink.h:39
@ kDataLinkOptionAnonymous
Definition: DbDataLink.h:40
UpdateDirection
Definition: DbDataLink.h:55
@ kUpdateDirectionSourceToData
Definition: DbDataLink.h:56
@ kUpdateDirectionDataToSource
Definition: DbDataLink.h:57
UpdateOption
Definition: DbDataLink.h:61
@ kUpdateOptionUpdateRowHeight
Definition: DbDataLink.h:64
@ kUpdateOptionSkipFormat
Definition: DbDataLink.h:63
@ kUpdateOptionOverwriteContentModifiedAfterUpdate
Definition: DbDataLink.h:68
@ kUpdateOptionOverwriteFormatModifiedAfterUpdate
Definition: DbDataLink.h:69
@ kUpdateOptionIncludeXrefs
Definition: DbDataLink.h:71
@ kUpdateOptionAllowSourceUpdate
Definition: DbDataLink.h:66
@ kUpdateOptionNone
Definition: DbDataLink.h:62
@ kUpdateOptionSkipFormatAfterFirstUpdate
Definition: DbDataLink.h:72
@ kUpdateOptionUpdateColumnWidth
Definition: DbDataLink.h:65
@ kUpdateOptionForceFullSourceUpdate
Definition: DbDataLink.h:67
@ kUpdateOptionForPreview
Definition: DbDataLink.h:70
PathOption
Definition: DbDataLink.h:47
@ kPathOptionNone
Definition: DbDataLink.h:48
@ kPathOptionAbsolute
Definition: DbDataLink.h:50
@ kPathOptionRelative
Definition: DbDataLink.h:49
@ kPathOptionPathAndFile
Definition: DbDataLink.h:51
OpenMode
Definition: DbObjectId.h:54