Commit 0954b795 authored by David Thompson's avatar David Thompson
Browse files

Rename `smtk::model::BridgeBase` to `Bridge`.

parent 27149452
......@@ -55,7 +55,7 @@ namespace smtk
class AttributeListPhrase;
typedef std::vector<Arrangement> Arrangements;
class BRepModel;
class BridgeBase;
class Bridge;
class CellEntity;
class Chain;
typedef std::vector<Chain> Chains;
......@@ -166,8 +166,8 @@ namespace smtk
namespace model
{
// Model Related Pointer Classes
typedef smtk::shared_ptr< smtk::model::BridgeBase > BridgeBasePtr;
typedef std::map<smtk::util::UUID, smtk::shared_ptr< smtk::model::BridgeBase > > UUIDsToBridges;
typedef smtk::shared_ptr< smtk::model::Bridge > BridgePtr;
typedef std::map<smtk::util::UUID, smtk::shared_ptr< smtk::model::Bridge > > UUIDsToBridges;
typedef smtk::shared_ptr< smtk::model::DescriptivePhrase > DescriptivePhrasePtr;
typedef smtk::weak_ptr< smtk::model::DescriptivePhrase > WeakDescriptivePhrasePtr;
typedef smtk::shared_ptr< smtk::model::EntityPhrase > EntityPhrasePtr;
......
......@@ -36,7 +36,6 @@
#include "RefGroup.hpp"
using smtk::model::Cursor;
using smtk::model::BridgeBase;
namespace cgmsmtk {
namespace cgm {
......@@ -46,7 +45,7 @@ Bridge::Bridge()
{
}
/// Virtual destructor. Here because Bridge overrides virtual methods from BridgeBase.
/// Virtual destructor. Here because Bridge overrides virtual methods from Bridge.
Bridge::~Bridge()
{
}
......
......@@ -2,7 +2,7 @@
#define __smtk_cgm_Bridge_h
#include "smtk/cgmSMTKExports.h"
#include "smtk/model/BridgeBase.h"
#include "smtk/model/Bridge.h"
class Body;
class CoVolume;
......@@ -38,7 +38,7 @@ namespace cgmsmtk {
* entity, arrangement, and/or tessellation information for a UUID be
* mapped into SMTK from CGM.
*/
class CGMSMTK_EXPORT Bridge : public smtk::model::BridgeBase
class CGMSMTK_EXPORT Bridge : public smtk::model::Bridge
{
public:
typedef smtk::shared_ptr<Bridge> Ptr;
......
......@@ -1029,9 +1029,9 @@ smtk::util::UUID BRepModel::modelOwningEntity(const smtk::util::UUID& ent) const
* and the original modeling kernel, operations are associated with the
* bridge that performs the transcription.
*
* \sa BridgeBase
* \sa Bridge
*/
BridgeBasePtr BRepModel::bridgeForModel(const smtk::util::UUID& uid) const
BridgePtr BRepModel::bridgeForModel(const smtk::util::UUID& uid) const
{
// See if the passed entity has a bridge.
UUIDsToBridges::const_iterator it = this->m_modelBridges.find(uid);
......@@ -1060,10 +1060,10 @@ BridgeBasePtr BRepModel::bridgeForModel(const smtk::util::UUID& uid) const
* If \a uid already had a bridge entry, it will be changed to the
* specified \a bridge.
*
* \sa BridgeBase
* \sa Bridge
*/
void BRepModel::setBridgeForModel(
BridgeBasePtr bridge, const smtk::util::UUID& uid)
BridgePtr bridge, const smtk::util::UUID& uid)
{
this->m_modelBridges[uid] = bridge;
}
......
......@@ -135,8 +135,8 @@ public:
UUIDsToIntegerData const& integerProperties() const { return *this->m_integerData; }
smtk::util::UUID modelOwningEntity(const smtk::util::UUID& uid) const;
BridgeBasePtr bridgeForModel(const smtk::util::UUID& uid) const;
void setBridgeForModel(BridgeBasePtr bridge, const smtk::util::UUID& uid);
BridgePtr bridgeForModel(const smtk::util::UUID& uid) const;
void setBridgeForModel(BridgePtr bridge, const smtk::util::UUID& uid);
void assignDefaultNames();
std::string assignDefaultName(const smtk::util::UUID& uid);
......@@ -148,7 +148,7 @@ protected:
smtk::shared_ptr<UUIDsToStringData> m_stringData;
smtk::shared_ptr<UUIDsToIntegerData> m_integerData;
UUIDsToBridges m_modelBridges;
smtk::shared_ptr<BridgeBase> m_defaultBridge;
smtk::shared_ptr<Bridge> m_defaultBridge;
smtk::util::UUIDGenerator m_uuidGenerator;
int m_modelCount;
......
#include "smtk/model/BridgeBase.h"
#include "smtk/model/Bridge.h"
namespace smtk {
namespace model {
......@@ -17,10 +16,10 @@ namespace smtk {
*
* The return value is 0 upon failure and non-zero upon success.
* Failure occurs when any \a requested bits of information that
* are in BridgeBasee::allSupportedInformation() are not transcribed,
* are in Bridgee::allSupportedInformation() are not transcribed,
* or when \a requested is 0.
*/
int BridgeBase::transcribe(
int Bridge::transcribe(
const Cursor& entity, BridgedInfoBits requested, bool onlyDangling)
{
int retval = 0;
......@@ -53,13 +52,13 @@ int BridgeBase::transcribe(
* This is used to determine when an entity has been fully transcribed into storage
* and is no longer "dangling."
*/
BridgedInfoBits BridgeBase::allSupportedInformation() const
BridgedInfoBits Bridge::allSupportedInformation() const
{
return BRIDGE_EVERYTHING;
}
/// Return a list of names of solid-model operators available.
StringList BridgeBase::operatorNames() const
StringList Bridge::operatorNames() const
{
StringList result;
for (Operators::const_iterator it = this->m_operators.begin(); it != this->m_operators.end(); ++it)
......@@ -70,12 +69,12 @@ StringList BridgeBase::operatorNames() const
}
/// Return the list of solid-model operators available.
const Operators& BridgeBase::operators() const
const Operators& Bridge::operators() const
{
return this->m_operators;
}
OperatorPtr BridgeBase::op(const std::string& opName) const
OperatorPtr Bridge::op(const std::string& opName) const
{
Operators::const_iterator it;
for (it = this->m_operators.begin(); it != this->m_operators.end(); ++it)
......@@ -88,10 +87,10 @@ OperatorPtr BridgeBase::op(const std::string& opName) const
/**\brief Add a solid-model operator to this bridge.
*
* Subclasses of BridgeBase should call this method in their
* Subclasses of Bridge should call this method in their
* constructors to indicate which modeling operations they will support.
*/
void BridgeBase::addOperator(OperatorPtr oper)
void Bridge::addOperator(OperatorPtr oper)
{
this->m_operators.insert(oper->clone()->setBridge(shared_from_this()));
}
......@@ -107,9 +106,9 @@ void BridgeBase::addOperator(OperatorPtr oper)
*
* The entity is added to the list of dangling entities and will be
* removed from the list when a call to \a transcribeInternal indicates
* that BridgeBase::allSupportedInformation() is now present in storage.
* that Bridge::allSupportedInformation() is now present in storage.
*/
void BridgeBase::declareDanglingEntity(const Cursor& ent, BridgedInfoBits present)
void Bridge::declareDanglingEntity(const Cursor& ent, BridgedInfoBits present)
{
if ((present & this->allSupportedInformation()) < this->allSupportedInformation())
this->m_dangling[ent] = present;
......@@ -124,7 +123,7 @@ void BridgeBase::declareDanglingEntity(const Cursor& ent, BridgedInfoBits presen
* This should always be at least the information requested but may
* include more information.
*/
BridgedInfoBits BridgeBase::transcribeInternal(const Cursor& entity, BridgedInfoBits flags)
BridgedInfoBits Bridge::transcribeInternal(const Cursor& entity, BridgedInfoBits flags)
{
(void)entity;
(void)flags;
......
#ifndef __smtk_model_BridgeBase_h
#define __smtk_model_BridgeBase_h
#ifndef __smtk_model_Bridge_h
#define __smtk_model_Bridge_h
#include "smtk/util/UUID.h"
#include "smtk/util/SharedFromThis.h"
......@@ -15,10 +15,10 @@
namespace smtk {
namespace model {
class BridgeBase;
class Bridge;
class Cursor;
class Operator;
typedef std::map<smtk::util::UUID,smtk::shared_ptr<BridgeBase> > UUIDsToBridges;
typedef std::map<smtk::util::UUID,smtk::shared_ptr<Bridge> > UUIDsToBridges;
/**\brief Bit flags describing types of information bridged to Storage.
*
......@@ -66,7 +66,7 @@ typedef unsigned long BridgedInfoBits;
* Bridges may provide SMTK with Operators that can be used to
* modify models in storage.
*
* Register an instance of a BridgeBase subclass to a
* Register an instance of a Bridge subclass to a
* model with Storage::bridgeModel(). Then, when an
* entity cannot be resolved from a UUID created by
* the bridge, the \a transcribe method will be invoked
......@@ -81,10 +81,10 @@ typedef unsigned long BridgedInfoBits;
*
* \sa smtk::model::BridgedInformation smtk::model::Operator
*/
class SMTKCORE_EXPORT BridgeBase : smtkEnableSharedPtr(BridgeBase)
class SMTKCORE_EXPORT Bridge : smtkEnableSharedPtr(Bridge)
{
public:
smtkTypeMacro(BridgeBase);
smtkTypeMacro(Bridge);
int transcribe(const Cursor& entity, BridgedInfoBits flags, bool onlyDangling = true);
......@@ -108,4 +108,4 @@ protected:
} // namespace model
} // namespace smtk
#endif // __smtk_model_BridgeBase_h
#endif // __smtk_model_Bridge_h
......@@ -5,7 +5,7 @@ set(modelSrcs
AttributeAssignments.cxx
AttributeListPhrase.cxx
BRepModel.cxx
BridgeBase.cxx
Bridge.cxx
CellEntity.cxx
Chain.cxx
Cursor.cxx
......@@ -54,7 +54,7 @@ set(modelHeaders
AttributeAssignments.h
AttributeListPhrase.h
BRepModel.h
BridgeBase.h
Bridge.h
CellEntity.h
Chain.h
Cursor.h
......
#ifndef __smtk_model_DefaultBridge_h
#define __smtk_model_DefaultBridge_h
#include "smtk/model/BridgeBase.h"
#include "smtk/model/Bridge.h"
namespace smtk {
namespace model {
......@@ -10,12 +10,12 @@ namespace smtk {
*
* In other words, this bridge marks models as being "native" to SMTK.
*/
class DefaultBridge : public BridgeBase
class DefaultBridge : public Bridge
{
public:
smtkTypeMacro(DefaultBridge);
smtkCreateMacro(BridgeBase);
smtkSharedFromThisMacro(BridgeBase);
smtkCreateMacro(Bridge);
smtkSharedFromThisMacro(Bridge);
protected:
virtual BridgedInfoBits transcribeInternal(const Cursor& entity, BridgedInfoBits flags);
......
#include "smtk/model/ModelEntity.h"
#include "smtk/model/BridgeBase.h"
#include "smtk/model/Bridge.h"
#include "smtk/model/CellEntity.h"
#include "smtk/model/GroupEntity.h"
#include "smtk/model/Storage.h"
......@@ -111,7 +111,7 @@ Operators ModelEntity::operators() const
{
Operators ops;
Operators::const_iterator it;
BridgeBase::ConstPtr bridge = this->bridge();
Bridge::ConstPtr bridge = this->bridge();
for (
it = bridge->operators().begin();
it != bridge->operators().end();
......@@ -128,7 +128,7 @@ StringList ModelEntity::operatorNames() const
return this->bridge()->operatorNames();
}
BridgeBasePtr ModelEntity::bridge() const
BridgePtr ModelEntity::bridge() const
{
return this->m_storage->bridgeForModel(this->m_entity);
}
......
......@@ -46,7 +46,7 @@ public:
Operators operators() const;
StringList operatorNames() const;
BridgeBasePtr bridge() const;
BridgePtr bridge() const;
};
/// Add all the free cells in \a container to this model.
......
......@@ -214,7 +214,7 @@ StoragePtr Operator::storage() const
/** Set the storage which will initiate the operation.
*
* If a BridgeBase subclass manages multiple Storage instances,
* If a Bridge subclass manages multiple Storage instances,
* it is responsible for notifying all of them of any changes.
* This \a storage is merely the location holding any
* entities referenced by parameters of the operation.
......@@ -228,7 +228,7 @@ Operator::Ptr Operator::setStorage(StoragePtr s)
}
/// Return the bridge associated with this operator (or a "null"/invalid shared-pointer).
BridgeBasePtr Operator::bridge() const
BridgePtr Operator::bridge() const
{
return this->m_bridge;
}
......@@ -237,7 +237,7 @@ BridgeBasePtr Operator::bridge() const
*
* The return value is a shared pointer to this operator.
*/
Operator::Ptr Operator::setBridge(BridgeBasePtr b)
Operator::Ptr Operator::setBridge(BridgePtr b)
{
this->m_bridge = b;
return shared_from_this();
......
......@@ -53,15 +53,15 @@ public:
StoragePtr storage() const;
Ptr setStorage(StoragePtr s);
BridgeBasePtr bridge() const;
Ptr setBridge(BridgeBasePtr b);
BridgePtr bridge() const;
Ptr setBridge(BridgePtr b);
bool operator < (const Operator& other) const;
protected:
Parameters m_parameters;
StoragePtr m_storage;
BridgeBasePtr m_bridge;
BridgePtr m_bridge;
std::set<ParameterChangeObserver> m_parameterChangeTriggers;
std::set<WillOperateObserver> m_willOperateTriggers;
std::set<DidOperateObserver> m_didOperateTriggers;
......
#include "smtk/model/BridgeBase.h"
#include "smtk/model/Bridge.h"
#include "smtk/model/ModelEntity.h"
#include "smtk/model/Operator.h"
#include "smtk/model/OperatorResult.h"
......
......@@ -86,7 +86,7 @@
<suppress-warning text="skipping function 'smtk::model::BRepModel::BRepModel', unmatched parameter type 'shared_ptr&lt;smtk::model::BRepModel::storage_type&gt;'"/>
<suppress-warning text="skipping field 'Storage::m_arrangements' with unmatched type 'shared_ptr&lt;UUIDsToArrangements&gt;'"/>
<suppress-warning text="skipping field 'UUIDGenerator::P' with unmatched type 'Internal'"/>
<suppress-warning text="skipping field 'BRepModel::m_modelBridges' with unmatched type 'std::map&lt;smtk::util::UUID,BridgeBasePtr&gt;'"/>
<suppress-warning text="skipping field 'BRepModel::m_modelBridges' with unmatched type 'std::map&lt;smtk::util::UUID,BridgePtr&gt;'"/>
<!-- do not support input or output streams-->
<suppress-warning text="skipping function 'smtk::util::operator&lt;&lt;', unmatched return type 'std::ostream&amp;'"/>
......@@ -167,7 +167,7 @@
<!-- ignore shared_from_this base class-->
<suppress-warning text="template baseclass 'smtk::enable_shared_from_this&lt;__VA_ARGS__&gt;' of 'BRepModel' is not known"/>
<suppress-warning text="template baseclass 'smtk::enable_shared_from_this&lt;__VA_ARGS__&gt;' of 'BridgeBase' is not known"/>
<suppress-warning text="template baseclass 'smtk::enable_shared_from_this&lt;__VA_ARGS__&gt;' of 'Bridge' is not known"/>
<suppress-warning text="template baseclass 'smtk::enable_shared_from_this&lt;__VA_ARGS__&gt;' of 'DescriptivePhrase' is not known"/>
<suppress-warning text="skipping function 'smtk::model::BRepModel::create', unmatched return type 'smtk::shared_ptr&lt;smtk::model::BRepModel::SelfType&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::Storage::create', unmatched return type 'smtk::shared_ptr&lt;smtk::model::Storage::SelfType&gt;'"/>
......@@ -226,13 +226,13 @@
<suppress-warning text="skipping field 'DescriptivePhrase::m_parent' with unmatched type 'smtk::weak_ptr&lt;smtk::model::DescriptivePhrase&gt;'"/>
<!-- Ignore until we have time to support Operators -->
<suppress-warning text="skipping field 'BRepModel::m_modelBridges' with unmatched type 'std::map&lt;smtk::util::UUID,smtk::shared_ptr&lt;BridgeBase&gt;&gt;'"/>
<suppress-warning text="skipping field 'BRepModel::m_defaultBridge' with unmatched type 'smtk::shared_ptr&lt;BridgeBase&gt;'"/>
<suppress-warning text="skipping field 'BridgeBase::m_operators' with unmatched type 'std::set&lt;smtk::model::OperatorPtr&gt;'"/>
<suppress-warning text="skipping field 'BRepModel::m_modelBridges' with unmatched type 'std::map&lt;smtk::util::UUID,smtk::shared_ptr&lt;Bridge&gt;&gt;'"/>
<suppress-warning text="skipping field 'BRepModel::m_defaultBridge' with unmatched type 'smtk::shared_ptr&lt;Bridge&gt;'"/>
<suppress-warning text="skipping field 'Bridge::m_operators' with unmatched type 'std::set&lt;smtk::model::OperatorPtr&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::Storage::shared_from_this', unmatched return type 'smtk::shared_ptr&lt;const smtk::model::Storage::SelfType&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::BridgeBase::addOperator', unmatched parameter type 'smtk::model::OperatorPtr'"/>
<suppress-warning text="skipping function 'smtk::model::BridgeBase::op', unmatched return type 'smtk::model::OperatorPtr'"/>
<suppress-warning text="skipping function 'smtk::model::BridgeBase::operators', unmatched return type 'smtk::model::Operators const&amp;'"/>
<suppress-warning text="skipping function 'smtk::model::Bridge::addOperator', unmatched parameter type 'smtk::model::OperatorPtr'"/>
<suppress-warning text="skipping function 'smtk::model::Bridge::op', unmatched return type 'smtk::model::OperatorPtr'"/>
<suppress-warning text="skipping function 'smtk::model::Bridge::operators', unmatched return type 'smtk::model::Operators const&amp;'"/>
<suppress-warning text="skipping function 'smtk::model::ModelEntity::operators', unmatched return type 'smtk::model::Operators'"/>
<suppress-warning text="skipping function 'smtk::model::EntityListPhrase::shared_from_this', unmatched return type 'smtk::shared_ptr&lt;const smtk::model::EntityListPhrase::SelfType&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::EntityPhrase::shared_from_this', unmatched return type 'smtk::shared_ptr&lt;const smtk::model::EntityPhrase::SelfType&gt;'"/>
......@@ -551,7 +551,7 @@
<modify-function signature="removeCategory(const std::string &amp;)" remove="all"/>
</value-type>
<value-type template="smtk::shared_ptr" args="smtk::model::BridgeBase"/>
<value-type template="smtk::shared_ptr" args="smtk::model::Bridge"/>
<value-type template="smtk::shared_ptr" args="smtk::model::DescriptivePhrase"/>
<value-type template="smtk::shared_ptr" args="smtk::model::EntityPhrase"/>
<value-type template="smtk::shared_ptr" args="smtk::model::EntityListPhrase"/>
......@@ -764,12 +764,12 @@
<include file-name="smtk/model/AttributeAssignments.h" location="local"/>
</object-type>
<object-type name="BridgeBase">
<include file-name="smtk/model/BridgeBase.h" location="local"/>
<object-type name="Bridge">
<include file-name="smtk/model/Bridge.h" location="local"/>
</object-type>
<enum-type name="BridgedInformation">
<include file-name="smtk/model/BridgeBase.h" location="local"/>
<include file-name="smtk/model/Bridge.h" location="local"/>
</enum-type>
<enum-type name="Orientation">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment