//////////////////////////////////////////////////////////////////////////////
//
//  Copyright 2025 Autodesk, Inc.  All rights reserved.
//
//  Use of this software is subject to the terms of the Autodesk license 
//  agreement provided at the time of installation or download, or which 
//  otherwise accompanies this software in either electronic or hard copy form.   
//////////////////////////////////////////////////////////////////////////////
#ifndef __STDGB_H
#define __STDGB_H
#ifndef __STDISO_H
#error include 'stdISO.h' before including this file
#endif

///<summary>This is class AcmStandardGB.</summary>
class STDIMP_DLLSHARE AcmStandardGB : public AcmStandardISO
{
public:
  ACRX_DECLARE_MEMBERS(AcmStandardGB);
  AcmStandardGB();
  virtual ~AcmStandardGB();
  ///<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();         
  virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;             
protected:
  ///<summary>Constructs arrow services objects.</summary>
  virtual void initArrowServices();
  virtual Adesk::Boolean createDefaultStyle();
};                      

///<summary>The AcmBOMStdGB class is a derived class of the AcmBOMStd class. The usage of AcmBOMStdGB 
///class is the same as that of AcmBOMStd class.</summary>
class STDIMP_DLLSHARE AcmBOMStdGB : public AcmBOMStdISO
{
public:
  ACRX_DECLARE_MEMBERS(AcmBOMStdGB);
  ///<summary>the construct function.</summary>
  AcmBOMStdGB();
  ///<summary>the destruct function.</summary>
  virtual ~AcmBOMStdGB();
  ///<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();
  ///<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>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  virtual Adesk::Boolean   isCreatedFor(const AcmStandard* pStd) const;
  ///<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();

protected:
   virtual HINSTANCE serviceResourceHandle() const;
};

///<summary>This is class AcmCPartListStdGB.</summary>
class STDIMP_DLLSHARE AcmCPartListStdGB : public AcmCPartListStdISO
{
public:
  AcmCPartListStdGB(AcmBOMStd *std);
  virtual ~AcmCPartListStdGB();
  ///<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>This is class AcmCBalloonStdGB.</summary>
class STDIMP_DLLSHARE AcmCBalloonStdGB : public AcmCBalloonStdISO
{
public:
  AcmCBalloonStdGB(AcmBOMStd *std);
  virtual ~AcmCBalloonStdGB();
  ///<summary>You may overload this method in their classes to initialize the balloon standard.</summary>
  virtual Acm::ErrorStatus cInit();
  ///<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>This is class AcmSurfTextStdGB.</summary>
class STDIMP_DLLSHARE AcmSurfTextStdGB : public AcmSurfTextStdISO
{
public:
  ACRX_DECLARE_MEMBERS(AcmSurfTextStdGB);
  AcmSurfTextStdGB();
  virtual ~AcmSurfTextStdGB();
  ///<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>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  Adesk::Boolean   isCreatedFor(const AcmStandard* pStd) 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>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;

  Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) 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;
  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;

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>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>This is class AcmSurfTextStdGB2006.</summary>
class STDIMP_DLLSHARE AcmSurfTextStdGB2006 : public AcmSurfTextStdISO2002
{
public:
  ACRX_DECLARE_MEMBERS(AcmSurfTextStdGB2006);
  AcmSurfTextStdGB2006();
  virtual ~AcmSurfTextStdGB2006();
  ///<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>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  Adesk::Boolean   isCreatedFor(const AcmStandard* pStd) const override;
};

///<summary>This is class AcmFCFStdGB.</summary>
class STDIMP_DLLSHARE AcmFCFStdGB : public AcmFCFStdISO
{
public:
  ACRX_DECLARE_MEMBERS(AcmFCFStdGB);
  AcmFCFStdGB();
  virtual ~AcmFCFStdGB();
  ///<summary>Sets the factory default values.</summary>
  Adesk::Boolean setFactoryDefaults() override;
  ///<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>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  Adesk::Boolean   isCreatedFor(const AcmStandard* pStd) const override;
  ///<summary>Returns the list of available material removal characteristics.</summary>
  Adesk::Boolean getMat(AcmCObjArray<AcmCGDTSymbolDesc>& list) 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;

  ///<summary>Converts the GDT symbol type to its string representation.</summary>
  Adesk::Boolean getSymbolImp(int subSym,
                                      CString& symtext) const override;

  Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer);
  Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const override;
  ///<summary>This function is used to return the default secondary arrow type for symbol.</summary>
  Acm::ArrowType defaultSecondaryArrowType() const override;
  ///<summary>Returns true if this symbol standard supports surface indication leader. 
  ///Otherwise, returns false.</summary>
  Adesk::Boolean isSurfIndLeaderSupported() const override;
};                      

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

  ///<summary>Sets the factory default values.</summary>
  virtual Adesk::Boolean setFactoryDefaults();
  ///<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>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  virtual Adesk::Boolean   isCreatedFor(const AcmStandard* pStd) const;
  ///<summary>Returns the list of available material removal characteristics.</summary>
  virtual Adesk::Boolean getMat(AcmCObjArray<AcmCGDTSymbolDesc>& list) const;
};

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

  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;
  ///<summary>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  virtual Adesk::Boolean   isCreatedFor(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();
  virtual void getSubEnts(const AcmCSubWelding* pSubSym,
                          AcmCAuxEntArray& subents,
                          AcGePoint3d& ptRefEnd) const;
  virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;

  ///<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>This is class AcmDatumStdGB.</summary>
class STDIMP_DLLSHARE AcmDatumStdGB : public AcmDatumStdISO
{
public:
  ACRX_DECLARE_MEMBERS(AcmDatumStdGB);
  AcmDatumStdGB();
  virtual ~AcmDatumStdGB();
  ///<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>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  virtual Adesk::Boolean   isCreatedFor(const AcmStandard* pStd) const;
  virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;
};                      

///<summary>This is class AcmIdStdGB.</summary>
class STDIMP_DLLSHARE AcmIdStdGB : public AcmIdStdISO
{
public:
  ACRX_DECLARE_MEMBERS(AcmIdStdGB);
  AcmIdStdGB();
  virtual ~AcmIdStdGB();
  ///<summary>Sets factory default values for surface indication leader properties.</summary>
  virtual Adesk::Boolean setSurfIndLeaderFactoryDefaults();
  ///<summary>Gets the information about the standard name and revision.</summary>
  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  ///<summary>Check the visibility of symbol variables. The "visiblity" always means certain properties are supported 
  ///by various master standards, or standard revisions.</summary>
  ///<param name="pData">The Id sub-symbol.</param>
  virtual Acm::ErrorStatus checkVisibility(AcmCId* pData) 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>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  virtual Adesk::Boolean   isCreatedFor(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>Returns whether surface indication leader is supported or not.</summary>
  virtual Adesk::Boolean isSurfIndLeaderSupported(Acm::SubSymbolType type) const;

  virtual Adesk::Boolean isLandingSupported(Acm::SubSymbolType type) const;
  virtual double nonDrawingDistance(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>Since the Datum Id uses a different arrowheads than other symbols, this member function specifies 
  ///which one.</summary>
  virtual Acm::ArrowType defaultArrowType() 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 Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const; 
  virtual Adesk::Boolean allowedInclinedDatum() const;
};

///<summary>This is class AcmIdStdGB2008.</summary>
class STDIMP_DLLSHARE AcmIdStdGB2008 : public AcmIdStdISO2004
{
public:
  ACRX_DECLARE_MEMBERS(AcmIdStdGB2008);
  AcmIdStdGB2008();
  virtual ~AcmIdStdGB2008();
  ///<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>Returns true if the symbol standard is created for a particular draft standard.</summary>
  ///<param name="pStd">The draft standard.</param>
  virtual Adesk::Boolean   isCreatedFor(const AcmStandard* pStd) const;
  virtual Adesk::Boolean allowedInclinedDatum() const;
  ///<summary>Since the Datum Id uses a different arrowheads than other symbols, this member function specifies
  ///which one.</summary>
  virtual Acm::ArrowType defaultArrowType() const;
};

#endif // __STDGB_H 
