Teamcenter C++ API Reference  2312
FinderUtils.hxx
Go to the documentation of this file.
1 // Copyright 2022 Siemens Digital Industries Software
2 // ==================================================
3 // Copyright 2015.
4 // Siemens Product Lifecycle Management Software Inc.
5 // All Rights Reserved.
6 // ==================================================
7 // Copyright 2022 Siemens Digital Industries Software
8 
9 #ifndef QRY_FINDERUTILS_HXX
10 #define QRY_FINDERUTILS_HXX
11 
12 #include <vector>
13 #include <stdlib.h>
14 #include <string.h>
15 #include <iostream>
16 #include <map>
19 #include <tccore/aom_prop.h>
20 #include <qry/libqry_exports.h>
21 
22 
28 namespace Teamcenter
29 {
30  namespace QRY
31  {
32  class FinderUtils;
33  }
34 }
35 
39 class QRY_API Teamcenter::QRY::FinderUtils
40 {
41 public:
42 
48  {
52  std::string propertyGroupID;
56  std::string startValue;
60  std::string endValue;
61  };
62 
68  typedef std::map< BusinessObjectRef<Teamcenter::BusinessObject>, std::vector< std::string > > ObjectPropertyGroupingMap;;
69 
75  {
79  std::string internalPropertyName;
87  std::vector< BusinessObjectRef<Teamcenter::BusinessObject> > unmatchedObjectList;
88  };
89 
95  {
99  std::string internalPropertyName;
103  std::vector< PropertyGroupingValue > propertyValues;
107  std::vector< BusinessObjectRef<Teamcenter::BusinessObject> > objectList;
108  };
109 
110 
123  static int groupObjectsByProperties(
124  const std::vector< ObjectPropertyGroupInput >& objectPropertyGroupInputList,
126  std::vector< ObjectsGroupedByProperty>& groupedObjectsList
127  );
128 
129 
130 
131 private:
132 
136  FinderUtils();
137 
141  FinderUtils(const FinderUtils& obj);
142 
146  FinderUtils& operator=(const FinderUtils& other);
147 
151  ~FinderUtils();
152 
156  static logical to_logical( std::string const& s );
157 
163  static char* getReferencedObjectProperty( const tag_t &object_tag, std::string internalPropertyName );
164 
169  static bool isUserObject( const tag_t referencedObject );
170 
174  static logical isStartValueEmptyOrNone( const FinderUtils::PropertyGroupingValue propertyValue );
175 
179  static logical endValueExists( const FinderUtils::PropertyGroupingValue propertyValue );
180 
184  static std::vector< std::string > getGroupWithNoneInStartValues( const FinderUtils::ObjectPropertyGroupInput *objectPropertyGroupInput );
185 
190  FinderUtils::ObjectPropertyGroupInput &objectPropertyGroupInput,
191  FinderUtils::ObjectPropertyGroupingMap &groupedObjectsMap,
192  bool &foundGroup,
193  const tag_t &tableRowBOTag,
194  const char* tableRowPropertyName
195  );
196 
201  FinderUtils::ObjectPropertyGroupInput &objectPropertyGroupInput,
202  FinderUtils::ObjectPropertyGroupingMap &groupedObjectsMap,
203  bool &foundGroup,
204  const tag_t &tableRowBOTag,
205  const char* tableRowPropertyName
206  );
207 
212  FinderUtils::ObjectPropertyGroupInput &objectPropertyGroupInput,
213  FinderUtils::ObjectPropertyGroupingMap &groupedObjectsMap,
214  bool &foundGroup,
215  const tag_t &tableRowBOTag,
216  const char* tableRowPropertyName
217  );
218 
223  FinderUtils::ObjectPropertyGroupInput &objectPropertyGroupInput,
224  FinderUtils::ObjectPropertyGroupingMap &groupedObjectsMap,
225  bool &foundGroup,
226  const tag_t &tableRowBOTag,
227  const char* tableRowPropertyName
228  );
229 
234  FinderUtils::ObjectPropertyGroupInput &objectPropertyGroupInput,
235  FinderUtils::ObjectPropertyGroupingMap &groupedObjectsMap,
236  bool &foundGroup,
237  const tag_t &tableRowBOTag,
238  const char* tableRowPropertyName
239  );
240 
245  FinderUtils::ObjectPropertyGroupInput &objectPropertyGroupInput,
246  FinderUtils::ObjectPropertyGroupingMap &groupedObjectsMap,
247  bool &foundGroup,
248  const tag_t &tableRowBOTag,
249  const char* tableRowPropertyName
250  );
251 
256  FinderUtils::ObjectPropertyGroupInput &objectPropertyGroupInput,
257  FinderUtils::ObjectPropertyGroupingMap &groupedObjectsMap,
258  bool &isGroupFound
259  );
260 
261 
262 
263 
267  static void processPropertyValuesForGrouping(PROP_value_type_t &propertyValueType,
269  FinderUtils::ObjectPropertyGroupInput &objectPropertyGroupInput,
270  FinderUtils::ObjectPropertyGroupingMap &groupedObjectsMap,
271  bool &isGroupFound,
272  const tag_t &tableRowBOTag,
273  const char* tableRowPropertyName
274  );
275 
276 };
277 
278 #include <qry/libqry_undef.h>
279 #endif