///////////////////////////////////////////////////////////////////////////////
// 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 _BCFTOOLS_MODULE_H
#define _BCFTOOLS_MODULE_H
#include "OdPlatformSettings.h"
#include "IfcBuildOptions.h"
#include "RxModule.h"
#include "SmartPtr.h"
/** \details
Enumeration for modules initialization modes.
*/
enum BcfVersion
{
/**No BCF data module is initialized*/
kVersionBcfUndefined = 0,
/**BCF 2.1 data module is initialized.*/
kVersionBcf_2_1 = 1,
/**BCF 3.0 data module is initialized.*/
kVersionBcf_3_0 = 2,
/**All BCF data modules are initialized.*/
kVersionBcfAll = 4
};
/** \details
Array for version names.
*/
static OdString BcfVersionNumbers[kVersionBcfAll] = { "", "2.1", "3.0", ""};
/** \details
Initializes BCF SDK functionality.
\param version [in] A BCF version(s) to be initialized.
\returns eOk if BCF SDK was successfully initialized; otherwise, the function returns an appropriate error code.
\remarks
The function checks whether all needed modules are loaded and loads them if they are not.
If at least one of the necessary modules is not loaded, the function returns the eNullPtr error code.
*/
BCFTOOLS_EXPORT OdResult odBcfToolsInitialize(BcfVersion version = kVersionBcfUndefined);
/** \details
De-initializes BCF SDK functionality.
\returns Returns eOk if BCF SDK was successfully de-initialized; otherwise, the function returns an appropriate error code.
\remarks
The function checks whether the needed modules are loaded and decreases the reference counters for them.
If a reference counter for any appropriate module becomes equal to zero, the function unloads the module.
If no BCF-related modules are loaded, the function returns the eNullPtr error code.
*/
BCFTOOLS_EXPORT OdResult odBcfToolsUninitialize();
/** \details
Contains declarations related to working with BCF files content.
*/
namespace OdBcfTools {
/** \details
An abstract class that provides the interface for a module that contains BCF functionality.
*/
class BCFTOOLS_EXPORT OdBcfToolsModule : public OdRxModule
{
public:
/** \details
Initializes the BCF module.
*/
virtual void initApp();
/** \details
De-initializes the BCF module.
*/
virtual void uninitApp();
};
/** \details
A data type that represents a smart pointer to an OdBcfToolsModule object.
*/
typedef OdSmartPtr OdBcfToolsModulePtr;
} //namespace OdBcfTools
#endif // _BCFTOOLS_MODULE_H