//////////////////////////////////////////////////////////////////////////////
//
//  Copyright 2025 by Autodesk, Inc.  All rights reserved.
//
// This computer source code and related instructions and comments 
// are the unpublished confidential and proprietary information of 
// Autodesk, Inc. and are protected under applicable copyright and 
// trade secret law.  They may not be disclosed to, copied or used 
// by any third party without the prior written consent of Autodesk, Inc.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef __STDANSI_H
#define __STDANSI_H  

///<summary>This is class AcmStandardANSI.</summary>
class STDIMP_DLLSHARE AcmStandardANSI : public AcmStandard
{
public:  
  ACRX_DECLARE_MEMBERS(AcmStandardANSI);
  AcmStandardANSI();
  virtual ~AcmStandardANSI();
  ///<summary>Gets the original name of the standard.</summary>
  virtual LPCTSTR originalName() const; 
  ///<summary>This function initializes the internal structure of the standard.</summary>
  virtual Adesk::Boolean acmInit();             
  ///<summary>Returns a list of all supported text heights that conform to the standard setting.</summary>
  virtual void getTextHeightList(AcGeDoubleArray& txtArr) const;
  ///<summary>This function is used to initialize the standard.</summary>
  virtual Adesk::Boolean setFactoryDefaults();
  virtual Adesk::Boolean setDimDefaults();
  ///<summary>Gets the visibility status of metric-based or inch-based controls on the general page.</summary>
  virtual Acm::Visibility statusIsMetric() const;
  virtual StringCase supportedStringCase() const;


protected:
  ///<summary>Constructs arrow services objects.</summary>
  virtual void initArrowServices();
  ///<summary>Sets the the unit of the standard, dependent on whether the standard is inch-based or metric-based.</summary>
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);
  virtual Adesk::Boolean createDefaultStyle();
};                      

///<summary>This is class AcmSurfTextStdANSI.</summary>
class STDIMP_DLLSHARE AcmSurfTextStdANSI : public AcmSurfTextStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmSurfTextStdANSI);
  AcmSurfTextStdANSI();   
  virtual ~AcmSurfTextStdANSI();             
  ///<summary>Gets the information about the standard name and revision.</summary>
  Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const override;
  ///<summary>Provides the basic interface for the AcmStandardManager and hence determines 
  ///whether AcmSymbolSTD can be used for a particular standard.</summary>
  Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const override;
  void initToEditOriginal()const override;
  void initToEdit()const override;
  ///<summary>Sets the factory default values.</summary>
  Adesk::Boolean setFactoryDefaults() override;
  ///<summary>Gets a direction of lay symbol descriptor.</summary>
  Adesk::Boolean getLaySymbolList(AcmCObjArray<AcmSymbolDesc4CL>& list,
                                          const AcmCSurfText* pSubSym =NULL) const override;
  ///<summary>Sets the visibility status for all values in the surface texture sub-symbol.</summary>
  Acm::ErrorStatus checkVisibility(AcmCSurfText* pData) const override;
  ///<summary>Sets the initial status of variables.</summary>
  Acm::ErrorStatus initFields(AcmCSurfText* pData) const override;
  ///<summary>Sets the suggested values for any value in the sub-symbol.</summary>
  Acm::ErrorStatus setSuggested(AcmCSurfText* pData) const override;

  ///<summary>Returns an array of graphical sub-entities representative of "Production Method" field variables 
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  bool getSubEntsProd1(const AcmCSurfText* pSubSym,
                               AcmCAuxEntArray& subents,
                               AcDbExtents& fullExtent,
                               double txtHeight,
                               double& commonWidth,
                               AcGePoint3d& refPoint) const override;

  ///<summary>Returns an array of graphical sub-entities representative of "Sampling Length" field variable 
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  bool getSubEntsSampLen(const AcmCSurfText* pSubSym,
                                 AcmCAuxEntArray& subents,
                                 AcDbExtents& fullExtent,
                                 double txtHeight,
                                 double& commonWidth,
                                 AcGePoint3d& refPoint) const override;

  ///<summary>Returns an array of graphical sub-entities representative of "Other Value" field variable 
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  bool getSubEntsOtherVal(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const override;

  ///<summary>Returns an array of graphical sub-entities representative of "Other Minimum Value" field variable 
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  bool getSubEntsOtherMin(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const override;

  ///<summary>Returns an array of graphical sub-entities representative of "Direction of Lay" field variable 
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  bool getSubEntsDirLay(const AcmCSurfText* pSubSym,
                                AcmCAuxEntArray& subents,
                                AcDbExtents& fullExtent,
                                double txtHeight,
                                const AcCmColor & txtColor,
                                AcGePoint3d& refPoint) const override;

  ///<summary>Returns an array of graphical sub-entities representative of "Roughness average (Max)" field variable 
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  bool getSubEntsRaMax(const AcmCSurfText* pSubSym,
                       const AcmCSubSymbolsList* pSubSymbolsList,
                        AcmCAuxEntArray& subents,
                        AcDbExtents& fullExtent,
                        double txtHeight,
                        double& commonWidth,
                        AcGePoint3d& refPoint,
                        Adesk::Boolean isOnlyRaValue) const override;

  ///<summary>Returns an array of graphical sub-entities representative of "Roughness average (Min)" field variable in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  bool getSubEntsRaMin(const AcmCSurfText* pSubSym,
                       const AcmCSubSymbolsList* pSubSymbolsList,
                        AcmCAuxEntArray& subents,
                        AcDbExtents& fullExtent,
                        double txtHeight,
                        double& commonWidth,
                        AcGePoint3d& refPoint,
                        Adesk::Boolean isOnlyRaValue) const override;

  ///<summary>Returns the variable of the Surface Texture symbol standard that will hold the input value 
  ///at the positional index (as shown in the diagram below).</summary>
  ///<param name="dlgIndex ">Positional index (See diagram). DO_IMAGE images/surface_texture_requirement.png</param>
  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  ///<returns>Acad::eOk = If the variable is valid in the Surface Texture symbol standard. 
  ///Acad::eInvalidInput = If the index is not valid in the Surface Texture symbol standard.</returns>
  Acad::ErrorStatus getVarFromDlgIndex(Adesk::UInt8 dlgIndex, Acm::Variable& var) const;

  ///<summary>Returns the editability and other information of the drop-down list (Combo box) 
  ///in Surface Texture symbol standard dialog.</summary>
  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  ///<param name="varDlgInfo">Information of the drop-down list.</param>
  AcmSurfTextStd::ConfigListState checkConfigListState(Acm::Variable var, CVarDlgInfo& varDlgInfo) const override;
  ///<param name="symArray">Array indicating state of selection of direction of lay symbols.</param>
  void getDefaultLaySymbols(AcDbIntArray& symArray) const override;

  void getDefaultVarSuggestList(Acm::Variable var, CStringList& list) const override;

protected:
  ///<summary>Gets the height of the symbol.</summary>
  ///<param name="pSymb">Surface texture symbol of interest.</param>
  ///<param name="H1">Reference height 1.</param>
  ///<param name="H2">Reference height 2.</param>
  void getHeights(const AcmCSurfText* pSymb,
                          double& H1,
                          double& H2) const override;

}; 

///<summary>This is class AcmSurfTextStdANSI2018.</summary>
class STDIMP_DLLSHARE AcmSurfTextStdANSI2018 : public AcmSurfTextStdANSI
{
public:
    ACRX_DECLARE_MEMBERS(AcmSurfTextStdANSI2018);
    AcmSurfTextStdANSI2018();
    virtual ~AcmSurfTextStdANSI2018();
    ///<summary>Gets the information about the standard name and revision.</summary>
    Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const override;
    ///<summary>Provides the basic interface for the AcmStandardManager and hence determines 
    ///whether AcmSymbolSTD can be used for a particular standard.</summary>
    Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const override;

public:
    ///<summary>Sets the default state of variables belonging to the surface texture sub-symbol.</summary>
    void setDefaultSubSymbol(AcmCSurfText* pData) const override;

    ///<summary>Sets the default state of variables in each surface texture sub-symbol.</summary>
    void setDefaultSubSymbol(AcmCSubSymbolsList* pSubSymbolsList) const override;

    ///<summary>Returns the variable of the Surface Texture symbol standard that will hold the input value at the 
    ///positional index (as shown in the diagram below).</summary>
    ///<param name="dlgIndex">Positional index (See diagram). DO_IMAGE images/surface_texture_requirement.png</param>
    ///<param name="var">Variable in Surface Texture symbol standard.</param>
    ///<returns>Acad::eOk = If the variable is valid in the Surface Texture symbol standard. Acad::eInvalidInput = If 
    ///the index is not valid in the Surface Texture symbol standard.</returns>
    Acad::ErrorStatus getVarFromDlgIndex(Adesk::UInt8 dlgIndex, Acm::Variable& var) const override;

    ///<summary>Returns the editability and other information of the drop-down list (Combo box) in Surface Texture 
    ///symbol standard dialog.</summary>
    ///<param name="var">Variable in Surface Texture symbol standard.</param>
    ///<param name="varDlgInfo">Information of the drop-down list.</param>
    AcmSurfTextStd::ConfigListState checkConfigListState(Acm::Variable var, CVarDlgInfo& varDlgInfo) const override;

    ///<summary>Sets the visibility status for all values in the surface texture sub-symbol.</summary>
    Acm::ErrorStatus checkVisibility(AcmCSurfText* pData) const override;

    ///<summary>Sets the initial status of variables.</summary>
    Acm::ErrorStatus initFields(AcmCSurfText* pData) const override;

    ///<summary>Sets the suggested values for any value in the sub-symbol.</summary>
    Acm::ErrorStatus setSuggested(AcmCSurfText* pData) const override;

    ///<summary>Restore the drop down lists for all variables of surface texture symbol standard to the default 
    ///preset lists.</summary>
    void restoreAllSuggestedList() override;
    void getDefaultVarSuggestList(Acm::Variable var, CStringList& list) const override;

    ///<summary>Returns true if this symbol standard supports surface indication leader. 
    ///Otherwise, returns false.</summary>
    Adesk::Boolean isSurfIndLeaderSupported() const override;

    ///<summary>Sets the factory default values.</summary>
    Adesk::Boolean setFactoryDefaults() override;

    UINT getSettingsDialogIDD() const override;

    UINT getSymbolDialogIDD() const override;

    Acm::Visibility variableStatus(AcmSurfTextStd::Variable var) const override;

    ///<summary>Sets the default values for prefix sufix strings of variables in surface texture sub-symbol</summary>
    Acm::ErrorStatus initPost(AcmCSurfText* pData) const override;

    ///<summary> return true when the multi row descriptor is enabled in the surface texture sub-symbol</summary>
    Adesk::Boolean allowedMultiRowDesc() const override;

    ///<summary> return true when the multi sub-symbol systems is enabled in the surface texture symbol</summary>
    Adesk::Boolean allowedMultiSubSymbol() const override;

    void initToEditOriginal()const override;
    void initToEdit()const override;

    ///<param name="var">Variable in Surface Texture symbol standard.</param>
    ///<param name="label">Label to be displayed on "Properties" dialog.</param>
    void getPropertiesDlgLabel(Acm::Variable var, CString& label) const override;

    ///<summary>Gets a SurfText application modifiers types list.</summary>
    std::vector <Acm::SurfTextAppModifierType> getStAppModifierTypeList() const override;

protected:
    ///<summary>Gets the height of the symbol.</summary>
    ///<param name="pSymb">Surface texture symbol of interest.</param>
    ///<param name="H1">Reference height 1.</param>
    ///<param name="H2">Reference height 2.</param>
    void getHeights(const AcmCSurfText* pSymb,
                    double& H1,
                    double& H2) const override;

    ///<summary>Gets the height values of the symbol.</summary>
    ///<param name="pSymb">Surface texture symbol of interest.</param>
    ///<param name="H1">Reference height 1.</param>
    ///<param name="H2">Reference height 2.</param>
    ///<param name="H3">Reference height 3.</param>
    ///<param name="L3">Reference length 3.</param>
    void getLengthHeights(const AcmCSurfText* pSymb,
                        double& H1,
                        double& H2,
                        double& H3,
                        double& L3) const override;

    ///<summary>Creates a list of all sub-entities, which represents the symbol according the content of its sub-symbols.</summary>
    void getSubEnts(const AcmCSurfText* pSymb, const AcmCSubSymbolsList* pSubSymbolsList, AcmCAuxEntArray& subents) const override;

    ///<summary>Returns the reference length to be used for creating the landing line.</summary>
    ///<param name="pSubSym">Surface texture symbol of interest.</param>
    ///<param name="fullExtent">Geometrical extents of the array of sub-entities of the symbol.</param>
    ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
    ///<returns>Reference landing length.</returns>
    double getTailLength(const AcmCSurfText* pSubSym,
                                AcDbExtents& fullExtent,
                                AcGePoint3d& refPoint) const override;

    ///<summary>Returns an array of graphical sub-entities representative of "Production Method" field variables 
    ///in the given Surface Texture symbol.</summary>
    ///<param name="pSubSym">Surface Texture symbol of interest.</param>
    ///<param name="subents">Array of graphical sub-entities.</param>
    ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
    ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
    ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
    ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
    ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
    bool getSubEntsProd1(const AcmCSurfText* pSubSym,
                        AcmCAuxEntArray& subents,
                        AcDbExtents& fullExtent,
                        double txtHeight,
                        double& commonWidth,
                        AcGePoint3d& refPoint) const override;
private:
    Acm::ErrorStatus getRowDesc(const AcmCSurfText* pSubSymb, Adesk::UInt16 actRow, CString& str) const;

    bool getRowEnts(const AcmCSurfText* pSubSym, AcmCAuxEntArray& subents, AcDbExtents& fullExtent,
                    double txtHeight, double& commonWidth, AcGePoint3d& refPoint) const;


    void AppendToString(CString& str, CString& addStr) const;

    ///<summary>Returns an array of graphical sub-entities representative of "Direction of Lay" field variable 
    ///in the given Surface Texture symbol.</summary>
    ///<param name="pSubSym">Surface Texture symbol of interest.</param>
    ///<param name="subents">Array of graphical sub-entities.</param>
    ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
    ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
    ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
    ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
    ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
    bool getSubEntsDirLay(const AcmCSurfText* pSubSym,
                                AcmCAuxEntArray& subents,
                                AcDbExtents& fullExtent,
                                double txtHeight,
                                const AcCmColor & txtColor,
                                AcGePoint3d& refPoint) const override;
};

///<summary>This is class AcmFCFStdANSI.</summary>
class STDIMP_DLLSHARE AcmFCFStdANSI : public AcmFCFStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmFCFStdANSI);
  AcmFCFStdANSI();
  virtual ~AcmFCFStdANSI();
  ///<summary>Gets the information about the standard name and revision.</summary>
  Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const override;
  ///<summary>Provides the basic interface for the AcmStandardManager and hence determines 
  ///whether AcmSymbolSTD can be used for a particular standard.</summary>
  Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const override;
  ///<summary>Sets the factory default values.</summary>
  Adesk::Boolean setFactoryDefaults() override;
  void initToEditOriginal() const override;
  void initToEdit() const override;
  ///<summary>Returns the list of available geometric characteristic descriptor objects.</summary>
  Adesk::Boolean getGeom(AcmCObjArray<AcmCGDTSymbolDesc>& list,
                                 const AcmCFCF* pSubSym = NULL) const override;
  ///<summary>Returns the list of available material removal characteristics.</summary>
  Adesk::Boolean getMat(AcmCObjArray<AcmCGDTSymbolDesc>& list) const override;
  ///<summary>Checks whether the symbol data is visible or not.</summary>
  Acm::ErrorStatus checkVisibility(AcmCFCF* pData) const override;
  ///<summary>Initializes the feature control frame symbol.</summary>
  Acm::ErrorStatus initFields(AcmCFCF* pData) const override;
  ///<summary>Creates a list of all sub-entities, which represents the symbol according the content of sub-symbol.</summary>
  ///<param name="secondLeaderPoint">If specified, 
  ///this function will be filled with the second point to attach leader to.</param>
  ///<param name="pTopBoundingLine">If specified, this function will be filled with the top line of the boundary 
  ///<param name="pBottomBoundingLine">If specified, this function will be filled with the bottom line of the boundary 
  void getSubEnts(const AcmCFCF* pSymb, AcmCAuxEntArray& subents, AcGePoint3d* pSecondLeaderPnt= NULL,
                          AcGeLineSeg3d* pTopBoundingLine = NULL, AcGeLineSeg3d* pBottomBoundingLine = NULL) const override;

  void getSubEntsTransMat(const AcmCFCF* pSubSym, bool bMTextAttached,
                          AcmCAuxEntArray& subents, AcGeMatrix3d& mat) const override;
};   

class AcmFCFStdANSI2018 : public AcmFCFStdANSI
{
public:
    ACRX_DECLARE_MEMBERS(AcmFCFStdANSI2018);
    AcmFCFStdANSI2018();
    virtual ~AcmFCFStdANSI2018();

    Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const override;
    Adesk::Boolean setFactoryDefaults() override;
    void initToEditOriginal() const override;

    ///<summary>Initializes the sub-symbol.</summary>
    void setDefaultSubSymbol(AcmCFCF* pSubSym) const override;

    ///<summary>Gets a SurfText application modifiers types list.</summary>
    std::vector <Acm::SurfTextAppModifierType> getStAppModifierTypeList() const override;
    ///<summary>Checks whether the symbol data is visible or not.</summary>
    Acm::ErrorStatus checkVisibility(AcmCFCF* pSubSym) const override;
    ///<summary>Initializes the feature control frame symbol.</summary>
    Acm::ErrorStatus initFields(AcmCFCF* pSubSym) const override;

    ///<summary> return true when the multi row descriptor is enabled in the FCF sub-symbol</summary>
    Adesk::Boolean allowedMultiRowDesc() const override;
    ///<summary> return true when the multi Indicator descriptor is enabled in the FCF sub-symbol</summary>
    Adesk::Boolean allowedMultiIndicatorDesc() const override;

    Adesk::Boolean getMat(AcmCObjArray<AcmCGDTSymbolDesc>& list) const override;

    ///<summary>Gets avalable types of attach position for reference line and symbol geometrical specification</summary>
    std::vector <Acm::FCFAttachmentPoint> getRefLineAttachPositionList() const override;
    ///<summary>Gets default type of attach position between reference line and symbol geometrical specification</summary>
    Acm::FCFAttachmentPoint refLineAttachPosition() const override;

    ///<summary>Gets avalable types of place and feature indicartor types</summary>
    std::vector <Acm::GdtIndicatorType> getPlaceAndFeatureIndicatorList() const override;
    ///<summary>Gets default type of of place and feature indicartor</summary>
    Acm::GdtIndicatorType placeAndFeatureIndicator() const override;

    Adesk::Boolean getPlaneAndFeatDescs(AcmCObjArray<AcmCGDTIndicatorDesc>& list,
                                        const AcmCFCF* pSubSym = NULL) const override;

    ///<summary>Creates a list of all sub-entities, which represents the symbol according the content of sub-symbol.</summary>
    ///<param name="secondLeaderPoint">If specified, this function will be filled with the second point to 
    ///attach leader to.</param>
    ///<param name="pTopBoundingLine">If specified, this function will be filled with the top line of the boundary 
    ///<param name="pBottomBoundingLine">If specified, this function will be filled with the bottom line of the boundary 
    void getSubEnts(const AcmCFCF* pSymb, AcmCAuxEntArray& subents, AcGePoint3d* pSecondLeaderPnt = NULL,
        AcGeLineSeg3d* pTopBoundingLine = NULL, AcGeLineSeg3d* pBottomBoundingLine = NULL) const override;

    void getSubEntsTransMat(const AcmCFCF* pSubSym, bool bMTextAttached,
                            AcmCAuxEntArray& subents, AcGeMatrix3d& mat) const override;

    void getSubEntsAllAround(AcmCAuxEntArray& subents, Acm::SurfTextAppModifierType flag,
                             const AcGeMatrix3d& mat) const override;

protected:
    ///<summary>Gets the start and end points of the sub-symbol landing line.</summary>
    void getLandingLinePoints(AcmCAuxEntArray& subents, AcGePoint3d& startPt, AcGePoint3d& endPt) const override;
};

///<summary>The AcmWeldingStdANSI class is a derived class of the AcmWeldingStd class. 
///The usage of AcmWeldingStdANSI class is the same as that of AcmWeldingStd class.</summary>
class STDIMP_DLLSHARE AcmWeldingStdANSI : public AcmWeldingStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmWeldingStdANSI);
  ///<summary>Constructs the class.</summary>
  AcmWeldingStdANSI();          
  ///<summary>Destructs the class.</summary>
  virtual ~AcmWeldingStdANSI();             

  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;
  ///<summary>This class implementation doesn't do anything and returns eNotImplemented 
  ///if it is not overloaded in the child class.</summary>
  virtual Acm::ErrorStatus cInit();    
  ///<summary>Sets the factory default values.</summary>
  virtual Adesk::Boolean setFactoryDefaults();

  void initToEditOriginal() const override;
  void initToEdit() const override;

  virtual void setDefaultSubSymbol(AcmCSubWelding* pData) const;

  virtual Adesk::Boolean   initPost(AcmCWeld* pWeld) const;
  Acm::ErrorStatus getSuggestedFinished(std::vector<AcString>& descList,
                                        std::vector<AcString>* pKeywordList = nullptr) const override;
  virtual Acm::ErrorStatus checkVisibility(AcmCSubWelding* pData) const;

  virtual Adesk::Boolean getWelds(const AcmCSubWelding *pSubWeld,
                                  Acm::WeldLocationFilter filter,
                                  AcmCObjArray<AcmCSymbolDesc>& list) const;

  virtual void getSubEnts(const AcmCSubWelding* pSubSym,
                          AcmCAuxEntArray& subents,
                          AcGePoint3d& ptRefEnd) const;
  ///<summary>Returns Adesk::kTrue if welding standards (such as ANSI) 
  ///allow multiple welding symbols (sub-weldings) to be connected to one leader.</summary>
  virtual Adesk::Boolean isMultipleSymbolsAllowed() const;
  void allowedStaggerType(const AcmCSubWelding* pWelding, Adesk::UInt32& value) const override;

  ///<summary>Returns all supported insertion types of welding processes.</summary>
  virtual UINT getProcessInsertTypes() const;
  ///<summary>Returns all supported types of welding processes</summary>
  virtual UINT getProcessTypes() const;
  ///<summary>For internal use only.
  ///Extra factor to scale the weld size of ACM2014 or earlier version.</summary>
  virtual double extraScaleFactor() const;

  Adesk::Boolean allowedOperation() const override
  {  return  Adesk::kTrue;};
  Adesk::Boolean allowedSpacer() const override
  {  return  Adesk::kTrue; };
};

///<summary>The AcmWeldingStdANSI2012 class is a derived class of the AcmWeldingStdANSI class 
/// and it represent the revision AWS A2.4-2012 of welding standard
///The usage of AcmWeldingStdANSI2012 class is the same as that of AcmWeldingStd class.</summary>
class STDIMP_DLLSHARE AcmWeldingStdANSI2012 : public AcmWeldingStdANSI
{
public:
    ACRX_DECLARE_MEMBERS(AcmWeldingStdANSI2012);
    ///<summary>Constructs the class.</summary>
    AcmWeldingStdANSI2012();
    ///<summary>Destructs the class.</summary>
    virtual ~AcmWeldingStdANSI2012();

    UINT dialogPageResourceIDD() const override;
    Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const override;
    ///<summary>This class implementation doesn't do anything and returns eNotImplemented 
    ///if it is not overloaded in the child class.</summary>
    Acm::ErrorStatus cInit() override;
    ///<summary>Sets the factory default values.</summary>
    Adesk::Boolean setFactoryDefaults() override;
    Adesk::Boolean   initPost(AcmCWeld* pWeld) const override;

    Adesk::Boolean isDistancePaletteAllowed() const override;
    std::vector<Adesk::UInt16> getAllowedDistanceTypes() const override;

    //default settings
    void setDefaultSubWeld(AcmCWeld* pData) const override;
    void setDefaultSubSymbol(AcmCSubWelding* pSubWeld) const override;

    Adesk::UInt64 getDistanceBitmap(Acm::WeldingDistanceType var) const override;

    virtual Adesk::Boolean isSurfIndLeaderSupported() const { return Adesk::kTrue; }

};

///<summary>The AcmWeldingStdANSI2020 class is a derived class of the AcmWeldingStdANSI2012 class 
/// and it represent the revision AWS A2.4-2020 of welding standard
///The usage of AcmWeldingStdANSI2020 class is the same as that of AcmWeldingStd class.</summary>
// class STDIMP_DLLSHARE AcmWeldingStdANSI2020 : public AcmWeldingStdANSI2012
// {
// public:
//     ACRX_DECLARE_MEMBERS(AcmWeldingStdANSI2020);
//     ///<summary>Constructs the class.</summary>
//     AcmWeldingStdANSI2020();
//     ///<summary>Destructs the class.</summary>
//     virtual ~AcmWeldingStdANSI2020();
// 
//     virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
//     ///<summary>This class implementation doesn't do anything and returns eNotImplemented 
//     ///if it is not overloaded in the child class.</summary>
//     virtual Acm::ErrorStatus cInit();
//     ///<summary>Sets the factory default values.</summary>
//     virtual Adesk::Boolean setFactoryDefaults();
//     virtual Adesk::Boolean   initPost(AcmCWeld* pWeld) const;
// };

//////////////////////////////////////////////////////////////////////////
///<summary>This is class AcmDatumStdANSI.</summary>
class STDIMP_DLLSHARE AcmDatumStdANSI : public AcmDatumStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmDatumStdANSI);
  AcmDatumStdANSI();
  virtual ~AcmDatumStdANSI();

  ///<summary>Gets the information about the standard name and revision.</summary>
  Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const override;
  ///<summary>Provides the basic interface for the AcmStandardManager and 
  ///hence determines whether AcmSymbolSTD can be used for a particular standard.</summary>
  Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const override;
  ///<summary>Sets the factory default values.</summary>
  Adesk::Boolean setFactoryDefaults() override;
  ///<summary>This class implementation doesn't do anything and returns eNotImplemented 
  ///if it is not overloaded in the child class.</summary>
  Acm::ErrorStatus cInit() override;

protected:
  ///<summary>This member function is called on all symbol standards when their owner, 
  ///the AcmStandard object, changes units from millimeters to inches or vice versa.</summary>
  Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric) override;

};

//////////////////////////////////////////////////////////////////////////
///<summary>This is class AcmDatumStdANSI2018 
///that represents the revision ASME Y14.5-2018 R(2024).</summary>
class STDIMP_DLLSHARE AcmDatumStdANSI2018 : public AcmDatumStdANSI
{
public:
    ACRX_DECLARE_MEMBERS(AcmDatumStdANSI2018);
    AcmDatumStdANSI2018();
    virtual ~AcmDatumStdANSI2018();

    ///<summary>Gets the information about the standard name and revision.</summary>
    Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const override;
    ///<summary>Sets the factory default values.</summary>
    Adesk::Boolean setFactoryDefaults() override;
    ///<summary>This class implementation doesn't do anything and returns eNotImplemented 
    ///if it is not overloaded in the child class.</summary>
    Acm::ErrorStatus cInit() override;

    Acm::ErrorStatus checkVisibility(AcmCTargetBalloon* pData) const override;
    Acm::ErrorStatus initFields(AcmCTargetBalloon* pData) const override;
    Acad::ErrorStatus getAllowedBallonAngle(double& angle, bool& isLeaderAng, const AcmSymbol* pSymbol) const override;

};

//////////////////////////////////////////////////////////////////////////
///<summary>This is class AcmIdStdANSI.</summary>
class STDIMP_DLLSHARE AcmIdStdANSI : public AcmIdStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmIdStdANSI);
  AcmIdStdANSI();
  virtual ~AcmIdStdANSI();
  ///<summary>Gets the information about the standard name and revision.</summary>
  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  ///<summary>Provides the basic interface for the AcmStandardManager and 
  ///hence determines whether AcmSymbolSTD can be used for a particular standard.</summary>
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;
  ///<summary>Gets the status for the feature id and datum Id symbols.</summary>
  virtual Adesk::Boolean isSupportedType(Acm::SubSymbolType type) const;
  ///<summary>Creates a list of all sub-entities, which represents the symbol according the content of sub-symbol.</summary>
  virtual void getSubEnts(const AcmCId* pSymb, 
                          AcmCAuxEntArray& subents) const;

  virtual AcString getOmitedCharacters() const override;
};

class STDIMP_DLLSHARE AcmIdStdANSI2018 : public AcmIdStdANSI
{
public:
    ACRX_DECLARE_MEMBERS(AcmIdStdANSI2018);
    AcmIdStdANSI2018();
    virtual ~AcmIdStdANSI2018();

    ///<summary>Gets the information about the standard name and revision.</summary>
    virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
    ///<summary>Provides the basic interface for the AcmStandardManager and 
    ///hence determines whether AcmSymbolSTD can be used for a particular standard.</summary>
    virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;
    ///<summary>Gets the status for the feature id and datum Id symbols.</summary>
    virtual Adesk::Boolean isSupportedType(Acm::SubSymbolType type) const;
    ///<summary>Sets factory default values for surface indication leader properties.</summary>
    virtual Adesk::Boolean setSurfIndLeaderFactoryDefaults();
    ///<summary>Since the Datum Id uses a different arrowheads than other symbols, this member function
    ///specifies which one.</summary>
    virtual Acm::ArrowType defaultArrowType() const;
    ///<summary>Returns whether surface indication leader is supported or not.</summary>
    virtual Adesk::Boolean isSurfIndLeaderSupported(Acm::SubSymbolType type) const;
    ///by various master standards, or standard revisions.</summary>
    virtual Acm::ErrorStatus checkVisibility(AcmCId* pData) const;
    ///<summary>Selects all supported arrowhead services available for use for the datum standard and returns a list
    ///of their descriptor objects.</summary>
    Adesk::Boolean getDatumArrowDesc(AcmCObjArray<AcmCArrowDesc>& list, Adesk::Boolean bDarkTheme = Adesk::kFalse) const override;

    ///<summary>Creates a list of all sub-entities, which represents the symbol according the content of sub-symbol.</summary>
    virtual void getSubEnts(const AcmCId* pSymb,
        AcmCAuxEntArray& subents) const;

    virtual AcString getOmitedCharacters() const override;
};

///<summary>This is class AcmCPartListStdANSI.</summary>
class STDIMP_DLLSHARE AcmCPartListStdANSI : public AcmCPartListStd
{
public:
  AcmCPartListStdANSI(AcmBOMStd *std);
  virtual ~AcmCPartListStdANSI();
  ///<summary>This member function will forward the call to the parts list standard and balloon standard objects, 
  ///if they are defined.</summary>
  virtual Adesk::Boolean setFactoryDefaults();
  ///<summary>This member function is implemented for the AcmSymbolStd interface. 
  ///It is necessary to be able to properly edit the standard.</summary>
  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;

protected:
  ///<summary>This is a protected member function that is used to properly synchronize the parts list standard 
  ///if the standard changes units.</summary>
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);
};

///<summary>This is class AcmCBalloonStdANSI.</summary>
class STDIMP_DLLSHARE AcmCBalloonStdANSI : public AcmCBalloonStd
{
public:
  AcmCBalloonStdANSI(AcmBOMStd *std);
  virtual ~AcmCBalloonStdANSI();
  ///<summary>This member function will forward the call to the parts list standard and balloon standard objects, 
  ///if they are defined.</summary>
  virtual Adesk::Boolean setFactoryDefaults();

  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  ///<summary>You may overload this method in their classes to initialize the balloon standard.</summary>
  virtual Acm::ErrorStatus cInit();

protected:
  ///<summary>This is a protected member function that is used to properly synchronize the balloon standard 
  ///if the standard changes units.</summary>
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);
};


///<summary>The AcmBOMStdANSI class is a derived class of the AcmBOMStd class. 
///The usage of AcmBOMStdANSI class is the same as that of AcmBOMStd class.</summary>
class STDIMP_DLLSHARE AcmBOMStdANSI : public AcmBOMStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmBOMStdANSI);
  ///<summary>the construct function</summary>
  AcmBOMStdANSI();
  ///<summary>the destruct function.</summary>
  virtual ~AcmBOMStdANSI();
  ///<summary>This member function will forward the call to the parts list standard and balloon standard objects, if they are defined.</summary>
  virtual Adesk::Boolean setFactoryDefaults();
  ///<summary>This member function is implemented for the AcmSymbolStd interface. 
  ///It is necessary to be able to properly edit the standard.</summary>
  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  ///<summary>Provides the basic interface for the AcmStandardManager and hence determines 
  ///whether AcmSymbolSTD can be used for a particular standard.</summary>
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;
  ///<summary>You may overload this method in their classes to initialize the BOM standard with their own parts list standard balloon standards.</summary>
  virtual Acm::ErrorStatus cInit();

protected:
  ///<summary>This is a protected member function that is used to properly synchronize the BOM standard if the standard changes units.</summary>
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);

};

#endif // STDANSI
