///////////////////////////////////////////////////////////////////////////////
// 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 _DAI_COMPOUND_H_
#define _DAI_COMPOUND_H_
#include "Gi/GiDrawable.h"
#include "daiBuildOptions.h"
#include "TD_PackPush.h"
class OdStepFile;
/** \details
Implements the Data Access Interface (DAI) that provides functionality for manipulating data that is defined within the EXPRESS SCHEMA format.
*/
namespace OdDAI {
/** \details
A class that implements working with a SDAI compound object.
Compound objects typically implement behavior or any higher level features for application instance of particular EXPRESS type as e.g. draw,
geometry/topology data composition and storing, simplified data accessors or sub routines for any additional calculations over data.
*/
class DAI_EXPORT OdCompound : public OdGiDrawable
{
//DOM-IGNORE-BEGIN
ODRX_DECLARE_MEMBERS(OdCompound);
//DOM-IGNORE-END
/**\details
Composes the compound object into a specified model.
*/
virtual void compose() = 0;
/** \details
Checks whether this object is persistent (stored in a database).
\returns
true if this object is persistent (stored in a database), false otherwise.
*/
virtual bool isPersistent() const = 0;
/** \details
Retrieves the database ID of this object.
\returns
pointer to OdDbStub which represents a database identifier of this object.
\remarks
Returns a null pointer if this object is not persistent.
*/
virtual OdDbStub* id() const = 0;
/** \details
Retrieves the owning file for entity instance.
\returns Returns a smart pointer to the owning file.
*/
virtual OdStepFile* owningStepFile() const = 0;
/** \details
Sets a new Gs node cache for the compound object.
\param pGsNode [in] A raw pointer to an OdGsCache object.
*/
virtual void setGsNode(OdGsCache* pGsNode);
/** \details
Retrieves the current Gs node object of the compound object.
\returns Returns a raw pointer to the OdGsCache object associated with the compound object.
*/
virtual OdGsCache* gsNode() const;
/** \details
Sets the values of the compound object's sub-entity traits.
\param traits [out] A raw pointer to the traits to be filled and returned to a calling subroutine.
\returns Returns the result of setting the values.
*/
virtual OdUInt32 subSetAttributes(OdGiDrawableTraits* traits) const;
/** \details
Draws a graphical compound object representation that is independent of any viewport contexts.
\param wd [in] A raw pointer to the object that encapsulates parameters of viewport-independent vectorization.
\returns Returns true if drawing was successful; otherwise, the method returns false.
*/
virtual bool subWorldDraw(OdGiWorldDraw* wd) const;
/** \details
Draws a graphical compound object that is dependent on the viewport context.
\param vd [in] A raw pointer to the object that encapsulates parameters of viewport-dependent vectorization.
*/
virtual void subViewportDraw(OdGiViewportDraw* vd) const;
};
/** \details
A data type that represents a smart pointer to an object.
*/
typedef OdSmartPtr OdCompoundPtr;
}
#include "TD_PackPop.h"
#endif //_DAI_COMPOUND_H_