Commit 523eb703 authored by David Thompson's avatar David Thompson

Move classes from util to {common, io, simulation}.

parent 35d5db27
#include "implement_an_operator.h"
#include "smtk/util/AutoInit.h"
#include "smtk/util/UUID.h"
#include "smtk/AutoInit.h"
#include "smtk/common/UUID.h"
#include "smtk/attribute/Attribute.h"
#include "smtk/attribute/Definition.h"
......@@ -15,7 +16,7 @@
#include "smtk/model/ModelEntity.h"
#include "smtk/model/Volume.h"
#include "smtk/util/testing/cxx/helpers.h"
#include "smtk/common/testing/cxx/helpers.h"
#include "smtk/model/testing/cxx/helpers.h"
#include "smtk/options.h"
......@@ -26,10 +27,9 @@
#include "implement_an_operator_xml.h"
// -- 1 --
using namespace smtk::common;
using namespace smtk::model;
using smtk::attribute::IntItem;
using smtk::util::UUID;
using smtk::util::UUIDArray;
namespace ex {
......@@ -85,7 +85,7 @@ void testOperator(ModelEntity model)
{
// Get the default bridge for our model manager:
smtk::model::BridgePtr bridge =
model.manager()->bridgeForModel(smtk::util::UUID::null());
model.manager()->bridgeForModel(UUID::null());
// Ask the bridge to create an operator:
ex::CounterOperator::Ptr op =
......
......@@ -92,7 +92,7 @@ matProp = asys.createAttribute('fluid', matDef)
# TODO: Replace with resource.readModel()
jsonFile = open(modelFileName,'r')
json = jsonFile.read()
smtk.model.ImportJSON.intoModel(json, mmgr)
smtk.io.ImportJSON.intoModel(json, mmgr)
# Now find groups corresponding to IC/BCs:
models = mmgr.findEntitiesByProperty('name', 'Test Model')
......
#ifndef __smtk_util_AutoInit_h
#define __smtk_util_AutoInit_h
#ifndef __smtk_AutoInit_h
#define __smtk_AutoInit_h
/*! \file */
// This file contains macros used to initialize components of SMTK
......@@ -45,4 +45,4 @@
~C##_ComponentInit() { smtkAutoInitDestructMacro(C) } \
} C##_ComponentInit_Instance;
#endif // __smtk_util_AutoInit_h
#endif // __smtk_AutoInit_h
#Build the actual code
add_subdirectory(common)
smtk_source_group(common)
add_subdirectory(attribute)
smtk_source_group(attribute)
add_subdirectory(model)
smtk_source_group(model)
add_subdirectory(util)
smtk_source_group(util)
add_subdirectory(simulation)
smtk_source_group(simulation)
add_subdirectory(io)
smtk_source_group(io)
add_subdirectory(view)
smtk_source_group(view)
set(smtk_headers ${attributeHeaders} ${modelHeaders} ${utilHeaders} ${viewHeaders})
set(smtk_srcs ${attributeSrcs} ${modelSrcs} ${utilSrcs} ${viewSrcs})
set(smtk_headers ${commonHeaders} ${attributeHeaders} ${modelHeaders} ${simulationHeaders} ${ioHeaders} ${viewHeaders})
set(smtk_srcs ${commonSrcs} ${attributeSrcs} ${modelSrcs} ${simulationSrcs} ${ioSrcs} ${viewSrcs})
add_library(SMTKCore ${smtk_srcs})
target_link_libraries(SMTKCore
......@@ -48,9 +54,11 @@ if(SMTK_BUILD_PYTHON_WRAPPINGS AND Shiboken_FOUND)
GENERATOR_ARGS --avoid-protected-hack
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
LOCAL_INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}/common
${CMAKE_CURRENT_SOURCE_DIR}/attribute
${CMAKE_CURRENT_SOURCE_DIR}/model
${CMAKE_CURRENT_SOURCE_DIR}/util
${CMAKE_CURRENT_SOURCE_DIR}/simulation
${CMAKE_CURRENT_SOURCE_DIR}/io
${CMAKE_CURRENT_SOURCE_DIR}/view
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
......@@ -91,4 +99,4 @@ add_subdirectory(extension)
# Now that the main components of smtk have been built we can build the custom
# model bridges that the user has enabled
################################################################################
add_subdirectory(bridge)
\ No newline at end of file
add_subdirectory(bridge)
......@@ -28,13 +28,53 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#define __smtk_PublicPointerDefs_h
#include "smtk/SharedPtr.h"
#include "smtk/util/SystemConfig.h"
#include "smtk/SystemConfig.h"
#include <map>
#include <set>
#include <vector>
namespace smtk
{
namespace common
{
class Resource;
class ResourceSet;
class UUID;
class UUIDGenerator;
typedef std::set<UUID> UUIDs;
typedef std::vector<UUID> UUIDArray;
}
namespace attribute
{
class Attribute;
typedef unsigned long AttributeId;
class RefItem;
class RefItemDefinition;
class Definition;
class DirectoryItem;
class DirectoryItemDefinition;
class DoubleItem;
class DoubleItemDefinition;
class FileItem;
class FileItemDefinition;
class GroupItem;
class GroupItemDefinition;
class IntItem;
class IntItemDefinition;
class Item;
class ItemDefinition;
class Manager;
class ModelEntityItem;
class ModelEntityItemDefinition;
class StringItem;
class StringItemDefinition;
class ValueItem;
class ValueItemDefinition;
class VoidItem;
class VoidItemDefinition;
}
namespace model
{
class Arrangement;
......@@ -64,13 +104,11 @@ namespace smtk
typedef std::vector<smtk::model::Face> Faces;
class FaceUse;
typedef std::vector<smtk::model::FaceUse> FaceUses;
class ExportJSON;
class GridInfo;
class GridInfo2D;
class GridInfo3D;
class GroupEntity;
class InstanceEntity;
class ImportJSON;
class Loop;
typedef std::vector<smtk::model::Loop> Loops;
class Entity;
......@@ -99,44 +137,16 @@ namespace smtk
typedef std::vector<smtk::model::VolumeUse> VolumeUses;
}
namespace attribute
namespace simulation
{
class Attribute;
typedef unsigned long AttributeId;
class RefItem;
class RefItemDefinition;
class Definition;
class DirectoryItem;
class DirectoryItemDefinition;
class DoubleItem;
class DoubleItemDefinition;
class FileItem;
class FileItemDefinition;
class GroupItem;
class GroupItemDefinition;
class IntItem;
class IntItemDefinition;
class Item;
class ItemDefinition;
class Manager;
class ModelEntityItem;
class ModelEntityItemDefinition;
class StringItem;
class StringItemDefinition;
class ValueItem;
class ValueItemDefinition;
class VoidItem;
class VoidItemDefinition;
class ExportSpec;
class UserData;
}
namespace util
namespace io
{
class Resource;
class UserData;
class UUID;
class UUIDGenerator;
typedef std::set<UUID> UUIDs;
typedef std::vector<UUID> UUIDArray;
class ExportJSON;
class ImportJSON;
}
namespace view
......@@ -148,6 +158,11 @@ namespace smtk
class ModelEntity;
class Root;
class SimpleExpression;
}
namespace common
{
typedef smtk::shared_ptr< smtk::common::Resource > ResourcePtr;
};
//Shiboken requires that we use fully qualified namespaces for all
......@@ -156,7 +171,7 @@ namespace smtk
{
// Model Related Pointer Classes
typedef smtk::shared_ptr< smtk::model::Bridge > BridgePtr;
typedef std::map<smtk::util::UUID, smtk::shared_ptr< smtk::model::Bridge > > UUIDsToBridges;
typedef std::map<smtk::common::UUID, smtk::shared_ptr< smtk::model::Bridge > > UUIDsToBridges;
typedef smtk::shared_ptr< smtk::model::DefaultBridge > DefaultBridgePtr;
typedef smtk::shared_ptr< smtk::model::BridgeIO > BridgeIOPtr;
typedef smtk::shared_ptr< smtk::model::BridgeIOJSON > BridgeIOJSONPtr;
......@@ -254,13 +269,11 @@ namespace smtk
typedef smtk::shared_ptr< smtk::attribute::Manager > ManagerPtr;
};
namespace util
namespace simulation
{
//custom user data classes
typedef smtk::shared_ptr< smtk::util::Resource > ResourcePtr;
typedef smtk::shared_ptr< smtk::util::UserData > UserDataPtr;
typedef smtk::shared_ptr< smtk::simulation::ExportSpec > ExportSpecPtr;
typedef smtk::shared_ptr< smtk::simulation::UserData > UserDataPtr;
};
namespace view
......
#ifndef __smtk_util_SharedFromThis_h
#define __smtk_util_SharedFromThis_h
#ifndef __smtk_SharedFromThis_h
#define __smtk_SharedFromThis_h
/*! \file SharedFromThis.h
* \brief Macros for dealing with shared-pointer classes.
*/
......@@ -176,4 +176,4 @@
) \
);
#endif // __smtk_util_SharedFromThis_h
#endif // __smtk_SharedFromThis_h
......@@ -24,8 +24,8 @@
// .SECTION Description
// .SECTION See Also
#ifndef __smtk_util_SystemConfig_h
#define __smtk_util_SystemConfig_h
#ifndef __smtk_SystemConfig_h
#define __smtk_SystemConfig_h
//Windows specific stuff
#if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
......@@ -41,4 +41,4 @@
typedef superclass Superclass;\
SMTK_BASE_TYPE(thisclass)
#endif //__smtk_util_SystemConfig_h
#endif //__smtk_SystemConfig_h
......@@ -275,7 +275,7 @@ void Attribute::removeAllAssociations()
unsigned long attribId = this->id();
if (modelMgr)
{
smtk::util::UUIDs::const_iterator mit;
smtk::common::UUIDs::const_iterator mit;
for (
mit = this->m_modelEntities.begin();
mit != this->m_modelEntities.end();
......@@ -290,7 +290,7 @@ void Attribute::removeAllAssociations()
/**\brief Is the model \a entity associated with this attribute?
*
*/
bool Attribute::isEntityAssociated(const smtk::util::UUID& entity) const
bool Attribute::isEntityAssociated(const smtk::common::UUID& entity) const
{
return (this->m_modelEntities.find(entity) != this->m_modelEntities.end());
}
......@@ -326,7 +326,7 @@ bool Attribute::isEntityAssociated(const smtk::model::Cursor& cursor) const
* successful. It may return false if the association is prohibited.
* (This is not currently implemented.)
*/
bool Attribute::associateEntity(const smtk::util::UUID& entity)
bool Attribute::associateEntity(const smtk::common::UUID& entity)
{
if (this->isEntityAssociated(entity))
{
......@@ -341,11 +341,21 @@ bool Attribute::associateEntity(const smtk::util::UUID& entity)
modelMgr->attachAttribute(this->id(), entity);
return true; // Entity may be and is now associated.
}
/**\brief Associate a new-style model ID (a Cursor) with this attribute.
*
* This function returns true when the association is valid and
* successful. It may return false if the association is prohibited.
* (This is not currently implemented.)
*/
bool Attribute::associateEntity(const smtk::model::Cursor& entity)
{
return this->associateEntity(entity.entity());
}
//----------------------------------------------------------------------------
/**\brief Disassociate a new-style model ID (a UUID) from this attribute.
*
*/
void Attribute::disassociateEntity(const smtk::util::UUID& entity, bool reverse)
void Attribute::disassociateEntity(const smtk::common::UUID& entity, bool reverse)
{
if (!this->isEntityAssociated(entity))
{
......@@ -364,6 +374,14 @@ void Attribute::disassociateEntity(const smtk::util::UUID& entity, bool reverse)
}
}
//----------------------------------------------------------------------------
/**\brief Disassociate a new-style model entity (a Cursor) from this attribute.
*
*/
void Attribute::disassociateEntity(const smtk::model::Cursor& entity, bool reverse)
{
this->disassociateEntity(entity.entity(), reverse);
}
//----------------------------------------------------------------------------
smtk::attribute::ConstItemPtr Attribute::find(const std::string &inName) const
{
int i = this->m_definition->findItemPosition(inName);
......
......@@ -29,7 +29,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "smtk/SMTKCoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/util/UUID.h" // for template associatedModelEntities()
#include "smtk/common/UUID.h" // for template associatedModelEntities()
#include <map>
#include <set>
......@@ -126,16 +126,18 @@ namespace smtk
void references(std::vector<smtk::attribute::ItemPtr> &list) const;
bool isEntityAssociated(const smtk::util::UUID& entity) const;
bool isEntityAssociated(const smtk::common::UUID& entity) const;
bool isEntityAssociated(const smtk::model::Cursor& cursor) const;
smtk::util::UUIDs associatedModelEntityIds() const
smtk::common::UUIDs associatedModelEntityIds() const
{return this->m_modelEntities;}
template<typename T> T associatedModelEntities() const;
bool associateEntity(const smtk::util::UUID& entity);
bool associateEntity(const smtk::common::UUID& entity);
bool associateEntity(const smtk::model::Cursor& entity);
void disassociateEntity(const smtk::util::UUID& entity, bool reverse = true);
void disassociateEntity(const smtk::common::UUID& entity, bool reverse = true);
void disassociateEntity(const smtk::model::Cursor& entity, bool reverse = true);
void removeAllAssociations();
// These methods only applies to Attributes whose
......@@ -154,9 +156,9 @@ namespace smtk
smtk::attribute::Manager *manager() const;
smtk::model::ManagerPtr modelManager() const;
void setUserData(const std::string &key, smtk::util::UserDataPtr value)
void setUserData(const std::string &key, smtk::simulation::UserDataPtr value)
{this->m_userData[key] = value;}
smtk::util::UserDataPtr userData(const std::string &key) const;
smtk::simulation::UserDataPtr userData(const std::string &key) const;
void clearUserData(const std::string &key)
{this->m_userData.erase(key);}
void clearAllUserData()
......@@ -187,12 +189,12 @@ namespace smtk
std::vector<smtk::attribute::ItemPtr> m_items;
smtk::attribute::AttributeId m_id;
smtk::attribute::DefinitionPtr m_definition;
smtk::util::UUIDs m_modelEntities;
smtk::common::UUIDs m_modelEntities;
std::map<smtk::attribute::RefItem *, std::set<std::size_t> > m_references;
bool m_appliesToBoundaryNodes;
bool m_appliesToInteriorNodes;
bool m_isColorSet;
std::map<std::string, smtk::util::UserDataPtr > m_userData;
std::map<std::string, smtk::simulation::UserDataPtr > m_userData;
// We need something to indicate that the attribute is in process of
// being deleted - this is used skip certain clean up steps that
// would need to be done otherwise
......@@ -203,11 +205,11 @@ namespace smtk
};
//----------------------------------------------------------------------------
inline smtk::util::UserDataPtr Attribute::userData(const std::string &key) const
inline smtk::simulation::UserDataPtr Attribute::userData(const std::string &key) const
{
std::map<std::string, smtk::util::UserDataPtr >::const_iterator it =
std::map<std::string, smtk::simulation::UserDataPtr >::const_iterator it =
this->m_userData.find(key);
return ((it == this->m_userData.end()) ? smtk::util::UserDataPtr() : it->second);
return ((it == this->m_userData.end()) ? smtk::simulation::UserDataPtr() : it->second);
}
//----------------------------------------------------------------------------
inline void Attribute::setColor(double r, double g, double b, double a)
......@@ -226,7 +228,7 @@ namespace smtk
if (!modelMgr) { // No attached manager means we cannot make cursors.
return result;
}
smtk::util::UUIDs::const_iterator it;
smtk::common::UUIDs::const_iterator it;
for (it = this->m_modelEntities.begin(); it != this->m_modelEntities.end(); ++it) {
typename T::value_type entry(modelMgr, *it);
if (entry.isValid()) {
......
......@@ -32,7 +32,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "smtk/SMTKCoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/util/SharedFromThis.h" // For smtkTypeMacro.
#include "smtk/SharedFromThis.h" // For smtkTypeMacro.
#include "smtk/model/EntityTypeBits.h" // for BitFlags type
#include "smtk/model/Cursor.h" //for Cursor version of canBeAssociated
......
......@@ -29,7 +29,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "smtk/SMTKCoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/util/SharedFromThis.h"
#include "smtk/SharedFromThis.h"
#include <map>
#include <queue>
#include <string>
......@@ -145,9 +145,9 @@ namespace smtk
bool usingDefinitionAdvanceLevel(int mode=0) const
{return (mode==1 ? this->m_usingDefAdvanceLevelInfo[1] : this->m_usingDefAdvanceLevelInfo[0]);}
void setUserData(const std::string &key, smtk::util::UserDataPtr value)
void setUserData(const std::string &key, smtk::simulation::UserDataPtr value)
{this->m_userData[key] = value;}
smtk::util::UserDataPtr userData(const std::string &key) const;
smtk::simulation::UserDataPtr userData(const std::string &key) const;
void clearUserData(const std::string &key)
{this->m_userData.erase(key);}
void clearAllUserData()
......@@ -181,17 +181,17 @@ namespace smtk
bool m_isEnabled;
mutable std::string m_tempString;
smtk::attribute::ConstItemDefinitionPtr m_definition;
std::map<std::string, smtk::util::UserDataPtr > m_userData;
std::map<std::string, smtk::simulation::UserDataPtr > m_userData;
private:
bool m_usingDefAdvanceLevelInfo[2];
int m_advanceLevel[2];
};
//----------------------------------------------------------------------------
inline smtk::util::UserDataPtr Item::userData(const std::string &key) const
inline smtk::simulation::UserDataPtr Item::userData(const std::string &key) const
{
std::map<std::string, smtk::util::UserDataPtr >::const_iterator it =
std::map<std::string, smtk::simulation::UserDataPtr >::const_iterator it =
this->m_userData.find(key);
return ((it == this->m_userData.end()) ? smtk::util::UserDataPtr() : it->second);
return ((it == this->m_userData.end()) ? smtk::simulation::UserDataPtr() : it->second);
}
}
}
......
......@@ -32,7 +32,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "smtk/SMTKCoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/util/SharedFromThis.h" // For smtkTypeMacro.
#include "smtk/SharedFromThis.h" // For smtkTypeMacro.
#include "smtk/attribute/Item.h" // For Item Types.
#include <queue>
......
......@@ -30,7 +30,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "smtk/attribute/ValueItem.h"
#include "smtk/attribute/ValueItemDefinition.h"
#include "smtk/model/Manager.h"
#include "smtk/util/UUID.h"
#include "smtk/common/UUID.h"
#include "smtk/view/Root.h"
#include <iostream>
#include <sstream>
......@@ -55,10 +55,10 @@ Manager::~Manager()
}
//----------------------------------------------------------------------------
smtk::util::Resource::Type
smtk::common::Resource::Type
Manager::resourceType() const
{
return smtk::util::Resource::ATTRIBUTE;
return smtk::common::Resource::ATTRIBUTE;
}
//----------------------------------------------------------------------------
......@@ -910,8 +910,8 @@ bool Manager::copyAttributeImpl(smtk::attribute::AttributePtr sourceAtt,
// But only if the models are the same
if (info.IsSameModel && ((options & COPY_ASSOCIATIONS) == COPY_ASSOCIATIONS))
{
smtk::util::UUIDs uuidSet = sourceAtt->associatedModelEntityIds();
smtk::util::UUIDs::const_iterator it;
smtk::common::UUIDs uuidSet = sourceAtt->associatedModelEntityIds();
smtk::common::UUIDs::const_iterator it;
for (it=uuidSet.begin(); it != uuidSet.end(); it++)
{
newAtt->associateEntity(*it);
......
......@@ -27,7 +27,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#ifndef __smtk_attribute_Manager_h
#define __smtk_attribute_Manager_h
#include "smtk/util/Resource.h" // base class
#include "smtk/common/Resource.h" // base class
#include "smtk/attribute/ItemDefinition.h"
#include "smtk/SMTKCoreExports.h"
#include "smtk/PublicPointerDefs.h"
......@@ -50,7 +50,7 @@ namespace smtk
{
class Attribute;
class Definition;
class SMTKCORE_EXPORT Manager : public smtk::util::Resource
class SMTKCORE_EXPORT Manager : public smtk::common::Resource
{
public:
enum CopyOptions
......@@ -62,7 +62,7 @@ namespace smtk
Manager();
virtual ~Manager();
virtual smtk::util::Resource::Type resourceType() const;
virtual smtk::common::Resource::Type resourceType() const;
smtk::attribute::DefinitionPtr createDefinition(const std::string &typeName,
const std::string &baseTypeName = "");
......
......@@ -44,7 +44,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
namespace smtk
{
namespace util { class UUID; }
namespace common { class UUID; }
namespace attribute
{
......
......@@ -29,7 +29,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "smtk/model/Cursor.h"
#include "smtk/model/GroupEntity.h"
#include "smtk/model/Manager.h"
#include "smtk/util/UUID.h"
#include "smtk/common/UUID.h"
using namespace smtk::attribute;
......
......@@ -27,7 +27,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#ifndef __smtk_attribute_ModelEntityItemDefinition_h
#define __smtk_attribute_ModelEntityItemDefinition_h
#include "smtk/util/UUID.h"
#include "smtk/common/UUID.h"
#include "smtk/attribute/ItemDefinition.h"
#include "smtk/model/EntityTypeBits.h" // for smtk::model::BitFlags
......
......@@ -7,10 +7,10 @@
#include "smtk/model/Manager.h"
#include "smtk/model/Vertex.h"
#include "smtk/util/testing/cxx/helpers.h"
#include "smtk/common/testing/cxx/helpers.h"
using namespace smtk::attribute;
using namespace smtk::util;
using namespace smtk::common;
using namespace smtk;
int main()
......
......@@ -32,14 +32,14 @@ int main()
int status = 0;
smtk::attribute::Manager manager;
std::cout << "Manager Created\n";
smtk::util::Resource::Type t = manager.resourceType();
if (t != smtk::util::Resource::ATTRIBUTE)
smtk::common::Resource::Type t = manager.resourceType();
if (t != smtk::common::Resource::ATTRIBUTE)
{
std::cout << "ERROR: Returned wrong resource type";
status++;
}
std::cout << "Resource type: "
<< smtk::util::Resource::type2String(t) << "\n";
<< smtk::common::Resource::type2String(t) << "\n";
smtk::attribute::DefinitionPtr def = manager.createDefinition("testDef");
if (def)
{
......
......@@ -35,9 +35,11 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "smtk/attribute/StringItem.h"
#include "smtk/attribute/StringItemDefinition.h"
#include "smtk/attribute/VoidItemDefinition.h"
#include "smtk/model/EntityTypeBits.h"
#include "smtk/util/AttributeWriter.h"
#include "smtk/util/Logger.h"
#include "smtk/io/AttributeWriter.h"
#include "smtk/io/Logger.h"
#include <iostream>
......@@ -184,8 +186,8 @@ int main(int argc, char *argv[])
// Find the expression enabled item
item = att->item(2);
vitem = smtk::dynamic_pointer_cast<smtk::attribute::ValueItem>(item);
smtk::util::AttributeWriter writer;
smtk::util::Logger logger;
smtk::io::AttributeWriter writer;
smtk::io::Logger logger;
if (writer.write(manager, argv[1],logger))
{
std::cerr << "Errors encountered creating Attribute File:\n";
......