/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef __NW_FIND_CONDITION_ITEM_H__ #define __NW_FIND_CONDITION_ITEM_H__ #include "NwObject.h" #include "NwSelectionSetsTypes.h" #include "NwDataType.h" class OdNwName; class OdNwVariant; /** \details This template class is a specialization of the OdSmartPtr class for OdNwName object pointers. */ typedef OdSmartPtr OdNwNamePtr; /** \details This class represents find condition items. */ class NWDBEXPORT OdNwFindConditionItem : public OdNwObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwFindConditionItem); //DOM-IGNORE-END public: /** \details Default constructor. */ OdNwFindConditionItem(); /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwFindConditionItem(); /** \details Gets the category column. \returns Smart pointer to the OdNwName object. \remarks Returns empty smart pointer if selected category is 'Item'. */ virtual OdNwNamePtr getCategory() const = 0; /** \details Gets the property column. \returns Smart pointer to the OdNwName object. \remarks Returns empty smart pointer if selected property is 'Name'. */ virtual OdNwNamePtr getProperty() const = 0; /** \details Gets the sign of the marked condition item flag. \returns The true value if the specified flag is set. \remarks Flag type can be one of the following: Name Value Description NwSelectionFindConditionFlags::NONE 0 No additional options. NwSelectionFindConditionFlags::IGNORE_CATEGORY_USER_NAME 1 Ignore DisplayName when matching category. NwSelectionFindConditionFlags::IGNORE_CATEGORY_INTERNAL_NAME 2 Ignore internal name when matching category. NwSelectionFindConditionFlags::IGNORE_PROPERTY_USER_NAME 4 Ignore DisplayName when matching property. NwSelectionFindConditionFlags::IGNORE_PROPERTY_INTERNAL_NAME 8 Ignore internal name when matching property. NwSelectionFindConditionFlags::IGNORE_STRING_VALUE_CASE 16 Ignore DisplayName when matching category or property. NwSelectionFindConditionFlags::NEGATE_CONDITIONS 32 Negate the sense of the condition. NwSelectionFindConditionFlags::START_GROUP 64 When used with collection of conditions, marks the start of a group of conditions. Collection will match when any group of conditions matches. NwSelectionFindConditionFlags::IGNORE_STRING_VALUE_DIACRITICS 128 Ignore diacritic signs when matching DisplayString values. NwSelectionFindConditionFlags::IGNORE_STRING_VALUE_CHARACTER_WIDTH 256 Ignore character width when matching DisplayString values.
*/ virtual bool isFlagSet(NwSelectionFindConditionFlags::Enum flag) = 0; /** \details Gets the condition type. \returns Value specified by the NwSelectionFindConditionType::Enum enumeration. \remarks Condition type can be one of the following: Name Value Description NEVER 0 Never used. ATTRIB 1 With attributes. NO_ATTRIB 2 No attributes. PROP 3 Defined; to match the search criteria, a property must have a value defined. NO_PROP 4 Undefined; to match the search criteria, a property must not have a defined value. SAME_TYPE 5 The same type EQUALS 6 Equals; a property must match the value exactly. NOT_EQUALS 7 Not equal; use with any type of property. LESS_THAN 8 Less than; use with numerical property types only. LESS_EQUAL 9 Less than or equal; use with numerical property types only. GREATER_EQUAL 10 Greater than or equal; use with numerical property types only. GREATER_THAN 11 Greater than; use with numerical property types only. CONTAINS 12 A property must contain the specified value. WILDCARD 13 Using wildcards allows matching any one character (?) or an arbitrary sequence of characters (*). WITHIN_DAY 14 To match the search criteria, a property must be within the specified day. WITHIN_WEEK 15 To match the search criteria, a property must be within the specified week.
*/ virtual NwSelectionFindConditionType::Enum getCondition() const = 0; /** \details Gets the value to compare. \returns Value of the column as a variant type. \remarks OdNwVariant::Type of return value can be one of the following: Name Value Description OdVariant::Type::kVoid 0 Default value type. OdVariant::Type::kString 0x01 String value type. OdVariant::Type::kBool 0x02 Boolean value type. OdVariant::Type::kInt32 0x05 Integer value type. OdVariant::Type::kInt64 0x05 A time_t value type. OdVariant::Type::kDouble 0x07 Double value type. OdVariant::Type::kRxObjectPtr 0x09 Name value type (with pointer to OdNwName object). OdNwVariant::Type::kPoint3d 0x0D A 3D point data type. OdNwVariant::Type::kPoint2d 0x0E A 2D point data type. OdNwVariant::Type::kAngle 0x0F An angular double type. OdNwVariant::Type::kLength 0x10 A length double type. OdNwVariant::Type::kArea 0x11 An area double type. OdNwVariant::Type::kVolume 0x12 A volume double type.
*/ virtual OdNwVariant getValue() const = 0; /** \details Receives the type of the value. \returns Type of the property's value as one of the enumerated items from the NwDataType::Enum enumerated type. \remarks Type can be one of the following: Name Value Description NwDataType::dt_NONE 0 Default value type. NwDataType::dt_DOUBLE 0x01 Double value type. NwDataType::dt_INT32 0x02 32-bit integer value type. NwDataType::dt_BOOL 0x03 Boolean value type. NwDataType::dt_DISPLAY_STRING 0x04 Display end-user string value type. NwDataType::dt_DATETIME 0x05 Date time value type. NwDataType::dt_DOUBLE_LENGTH 0x06 Double value type for length (in length's units). NwDataType::dt_DOUBLE_ANGLE 0x07 Double value type for angle (in radians). NwDataType::dt_NAME 0x08 Name value type (with pointer to OdNwName object). NwDataType::dt_IDENTIFIER_STRING 0x09 Programmatic identifier string value type. NwDataType::dt_DOUBLE_AREA 0x0A Double value type for area. NwDataType::dt_DOUBLE_VOLUME 0x0B Double value type for volume. NwDataType::dt_POINT3D 0x0C Point3d value type. NwDataType::dt_POINT2D 0x0D Point2d value type.
*/ virtual NwDataType::Enum getValueDataType() const = 0; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwFindConditionItem object pointers. */ typedef OdSmartPtr OdNwFindConditionItemPtr; /** \details This template class is a specialization of the OdArray class for OdNwFindConditionItemPtr object pointers. */ typedef OdArray OdNwFindConditionList; #endif