Commit 58feb869 authored by Bob Obara's avatar Bob Obara

ENH:Added all leave components and code now compiles

parent c628772f
......@@ -29,6 +29,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "AttributeExports.h"
#include <tr1/memory>
#include <map>
#include <set>
#include <string>
......@@ -54,6 +55,9 @@ namespace slctk
friend class slctk::attribute::Definition;
friend class slctk::attribute::Manager;
public:
Attribute(const std::string &myName,
slctk::attribute::Cluster *myCluster, unsigned long myId);
virtual ~Attribute();
// NOTE: To rename an attribute use the manager!
const std::string &name() const
{ return this->m_name;}
......@@ -110,9 +114,6 @@ namespace slctk
{return this->m_cluster;}
protected:
Attribute(const std::string &myName,
slctk::attribute::Cluster *myCluster, unsigned long myId);
virtual ~Attribute();
void removeAllComponents();
void addComponent(slctk::attribute::Component *component);
void setName(const std::string &newname)
......@@ -122,7 +123,10 @@ namespace slctk
{this->m_references.insert(comp);}
void unregisterComponent(slctk::attribute::AttributeReferenceComponent *comp)
{this->m_references.erase(comp);}
struct internal_no_copy_data
{
};
std::string m_name;
std::vector<slctk::attribute::Component *> m_components;
std::map<std::string, slctk::attribute::Component *> m_componentLookUp;
......@@ -132,6 +136,8 @@ namespace slctk
std::set<slctk::attribute::AttributeReferenceComponent *> m_references;
bool m_appliesToBoundaryNodes;
bool m_appliesToInteriorNodes;
std::tr1::shared_ptr<internal_no_copy_data> Data;
private:
};
......
......@@ -31,7 +31,7 @@ using namespace slctk::attribute;
//----------------------------------------------------------------------------
AttributeReferenceComponent::
AttributeReferenceComponent(AttributeReferenceComponentDefinition *def):
AttributeReferenceComponent(const AttributeReferenceComponentDefinition *def):
ValueComponent(def)
{
int n = def->numberOfValues();
......
......@@ -39,8 +39,9 @@ namespace slctk
class AttributeReferenceComponentDefinition;
class SLCTKATTRIBUTE_EXPORT AttributeReferenceComponent : public ValueComponent
{
friend class AttributeReferenceComponentDefinition;
public:
AttributeReferenceComponent(const AttributeReferenceComponentDefinition *def);
virtual ~AttributeReferenceComponent();
virtual Component::Type type() const;
slctk::attribute::Attribute *value() const
{return this->m_values[0];}
......@@ -57,8 +58,6 @@ namespace slctk
virtual const std::string &valueAsString(int element, const std::string &format) const;
protected:
AttributeReferenceComponent(AttributeReferenceComponentDefinition *def);
virtual ~AttributeReferenceComponent();
virtual void updateDiscreteValue(int element);
std::vector<Attribute *>m_values;
private:
......
......@@ -59,7 +59,7 @@ bool AttributeReferenceComponentDefinition::isValueValid(Attribute *att) const
return true;
}
//----------------------------------------------------------------------------
Component *AttributeReferenceComponentDefinition::createComponent()
Component *AttributeReferenceComponentDefinition::buildComponent() const
{
return new AttributeReferenceComponent(this);
}
......
......@@ -54,7 +54,7 @@ namespace slctk
bool isValueValid(slctk::attribute::Attribute *att) const;
virtual slctk::attribute::Component *createComponent();
virtual slctk::attribute::Component *buildComponent() const;
protected:
slctk::attribute::Definition *m_definition;
private:
......
......@@ -8,6 +8,12 @@ set(headers
Component.h
ComponentDefinition.h
Definition.h
DoubleComponent.h
DoubleComponentDefinition.h
IntegerComponent.h
IntegerComponentDefinition.h
StringComponent.h
StringComponentDefinition.h
ValueComponent.h
ValueComponentDefinition.h
ValueComponentDefinitionTemplate.h
......@@ -22,6 +28,12 @@ set(attribute_srcs
Component.cxx
ComponentDefinition.cxx
Definition.cxx
DoubleComponent.cxx
DoubleComponentDefinition.cxx
IntegerComponent.cxx
IntegerComponentDefinition.cxx
StringComponent.cxx
StringComponentDefinition.cxx
ValueComponent.cxx
ValueComponentDefinition.cxx
)
......
......@@ -42,6 +42,9 @@ namespace slctk
{
public:
friend class Manager;
Cluster(slctk::attribute::Manager *myManager, slctk::attribute::Cluster *myParent,
slctk::attribute::Definition *def);
virtual ~Cluster();
const std::string &type() const;
slctk::attribute::Manager *manager() const
{return this->m_manager;}
......@@ -54,9 +57,6 @@ namespace slctk
slctk::attribute::Attribute *find(const std::string &name) const;
bool rename(slctk::attribute::Attribute *att, const std::string &newName);
protected:
Cluster(slctk::attribute::Manager *myManager, slctk::attribute::Cluster *myParent,
slctk::attribute::Definition *def);
virtual ~Cluster();
// Add an attribute to the cluster. Note that the cluster
// now owns and manages it
void add(slctk::attribute::Attribute *att);
......
......@@ -28,7 +28,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
using namespace slctk::attribute;
//----------------------------------------------------------------------------
Component::Component(ComponentDefinition *def):
Component::Component(const ComponentDefinition *def):
m_isEnabled(true), m_definition(def)
{
}
......
......@@ -39,7 +39,6 @@ namespace slctk
class ComponentDefinition;
class SLCTKATTRIBUTE_EXPORT Component
{
friend class Attribute;
public:
enum Type
{
......@@ -52,6 +51,8 @@ namespace slctk
NUMBER_OF_TYPES
};
Component(const slctk::attribute::ComponentDefinition *def);
virtual ~Component();
const std::string &name() const;
virtual Component::Type type() const = 0;
const slctk::attribute::ComponentDefinition *definition() const
......@@ -73,10 +74,10 @@ namespace slctk
static Component::Type string2Type(const std::string &s);
protected:
Component(slctk::attribute::ComponentDefinition *def);
virtual ~Component();
// This method allows any Component to delete another - USE WITH CARE!
void deleteComponent();
bool m_isEnabled;
ComponentDefinition *m_definition;
const ComponentDefinition *m_definition;
private:
};
......
......@@ -23,7 +23,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "attribute/ComponentDefinition.h"
using namespace slck::attribute;
using namespace slctk::attribute;
//----------------------------------------------------------------------------
ComponentDefinition::ComponentDefinition(const std::string &myName,
......@@ -31,7 +31,7 @@ ComponentDefinition::ComponentDefinition(const std::string &myName,
{
this->m_id = myId;
this->m_name = myName;
this->version = 0;
this->m_version = 0;
this->m_advanceLevel = 0;
this->m_isOptional = false;
}
......@@ -43,12 +43,14 @@ ComponentDefinition::~ComponentDefinition()
//----------------------------------------------------------------------------
bool ComponentDefinition::isMemberOf(const std::vector<std::string> &catagories) const
{
size_type i, n = this->m_catagories.size();
std::size_t i, n = catagories.size();
for (i = 0; i < n; i++)
{
if (this->isMemberOf(this->m_catagories[i]))
if (this->isMemberOf(catagories[i]))
{
return true;
}
}
return false;
return false;
}
//----------------------------------------------------------------------------
......@@ -30,6 +30,7 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "AttributeExports.h"
#include <string>
#include <set>
#include <vector>
namespace slctk
{
......@@ -37,9 +38,13 @@ namespace slctk
{
class Cluster;
class Component;
class Definition;
class SLCTKATTRIBUTE_EXPORT ComponentDefinition
{
public:
ComponentDefinition(const std::string &myname,
unsigned long myId);
virtual ~ComponentDefinition();
const std::string &name() const
{ return this->m_name;}
......@@ -94,12 +99,8 @@ namespace slctk
void setBriefDescription(const std::string &text)
{this->m_briefDescription = text;}
virtual slctk::attribute::Component *createComponent() = 0;
virtual slctk::attribute::Component *buildComponent() const = 0;
protected:
// ComponentDefinitions can only be created by an attribute manager
ComponentDefinition(const std::string &myname,
unsigned long myId);
virtual ~ComponentDefinition();
int m_version;
bool m_isOptional;
......
......@@ -27,7 +27,8 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "attribute/Attribute.h"
#include "attribute/Cluster.h"
#include "attribute/ComponentDefinition.h"
using namespace slck::attribute;
using namespace slctk::attribute;
//----------------------------------------------------------------------------
Definition::Definition(const std::string &myType, Cluster *myCluster,
......@@ -35,8 +36,8 @@ Definition::Definition(const std::string &myType, Cluster *myCluster,
{
this->m_id = myId;
this->m_type = myType;
this-m_cluster = myCluster;
this->version = 0;
this->m_cluster = myCluster;
this->m_version = 0;
this->m_isNodal = false;
this->m_advanceLevel = 0;
this->m_isUnique = true;
......@@ -47,14 +48,14 @@ Definition::Definition(const std::string &myType, Cluster *myCluster,
//----------------------------------------------------------------------------
Definition::~Definition()
{
std::size_t i, n = this->m_componentsDefs.size();
std::size_t i, n = this->m_componentDefs.size();
for (i = 0; i < n; i++)
{
delete this->m_componentsDefs[i];
delete this->m_componentDefs[i];
}
}
//----------------------------------------------------------------------------
Definition *Definition::baseDefinition() const
const Definition *Definition::baseDefinition() const
{
if (this->m_cluster && this->m_cluster->parent())
{
......@@ -63,14 +64,14 @@ Definition *Definition::baseDefinition() const
return NULL;
}
//----------------------------------------------------------------------------
bool Definition::isA(Definition *targetDef) const
bool Definition::isA(const Definition *targetDef) const
{
// Walk up the inheritence tree until we either hit the root or
// encounter this definition
Definition *def = this;
const Definition *def = this;
for (def = this; def != NULL; def = def->baseDefinition())
{
if (def == target)
if (def == targetDef)
{
return true;
}
......@@ -95,18 +96,18 @@ bool Definition::conflicts(Definition *def) const
}
// Get the most "basic" definition that is unique
Definition *baseDef = this->findIsUnqueBaseClass();
const Definition *baseDef = this->findIsUniqueBaseClass();
// See if the other definition is derived from this base defintion.
// If it is not then we know there is no conflict
return def->isA(baseDef);
}
//----------------------------------------------------------------------------
Definition *Definition::findIsUnqueBaseClass()
const Definition *Definition::findIsUniqueBaseClass() const
{
Definition *uDef = this, *def;
const Definition *uDef = this, *def;
while (1)
{
def = uDef->baseDefintion();
def = uDef->baseDefinition();
if ((def == NULL) || (!def->isUnique()))
{
return uDef;
......@@ -127,15 +128,16 @@ Definition::canBeAssociated(slctk::ModelEntity *entity,
// model's dimension to call the appropriate method. - return false if it can't.
// 2. Get a list of attributes on the entity and call conflicts method with each
// definition. All conflicting attributes gets added to the list.
return false;
}
//----------------------------------------------------------------------------
void Definition::BuildAttribute(Attribute *att)
void Definition::buildAttribute(Attribute *att) const
{
// If there is a super definition have it prep the attribute and add its components
Definition *bdef = this->baseDefinition();
const Definition *bdef = this->baseDefinition();
if (bdef)
{
bdef->BuildAttribute(att);
bdef->buildAttribute(att);
}
else
{
......@@ -150,17 +152,17 @@ void Definition::BuildAttribute(Attribute *att)
std::size_t i, n = this->m_componentDefs.size();
for (i = 0; i < n; i++)
{
comp = this->m_componentDefs[i].create();
comp = this->m_componentDefs[i]->buildComponent();
att->addComponent(comp);
}
}
//----------------------------------------------------------------------------
bool Definition::isMemberOf(const std::vector<std::string> &catagories) const
{
std::size_t i, n = this->m_catagories.size();
std::size_t i, n = catagories.size();
for (i = 0; i < n; i++)
{
if (this->isMemberOf(this->m_catagories[i]))
if (this->isMemberOf(catagories[i]))
return true;
}
return false;
......
......@@ -30,21 +30,26 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "AttributeExports.h"
#include <string>
#include <set>
#include <vector>
namespace slctk
{
class ModelEntity;
namespace attribute
{
class Attribute;
class Cluster;
class ComponentDefinition;
class Manager;
class SLCTKATTRIBUTE_EXPORT Definition
{
friend class slctk::attribute::Cluster;
friend class slctk::attribute::Manager;
public:
// Definitions can only be created by an attribute manager
Definition(const std::string &myType, slctk::attribute::Cluster *myCluster,
unsigned long myId);
virtual ~Definition();
const std::string &type() const
{ return this->m_type;}
......@@ -59,8 +64,8 @@ namespace slctk
unsigned long id() const
{ return this->m_id;}
Definition *baseDefinition() const;
bool isA(slctk::attribute::Definition *def) const;
const Definition *baseDefinition() const;
bool isA(const slctk::attribute::Definition *def) const;
int version() const
{return this->m_version;}
......@@ -145,13 +150,9 @@ namespace slctk
void setBriefDescription(const std::string &text)
{this->m_briefDescription = text;}
void buildAttribute(slctk::attribute::Attribute *attribute);
slctk::attribute::Definition *findIsUniqueBaseClass() const;
void buildAttribute(slctk::attribute::Attribute *attribute) const;
const slctk::attribute::Definition *findIsUniqueBaseClass() const;
protected:
// Definitions can only be created by an attribute manager
Definition(const std::string &myType, slctk::attribute::Cluster *myCluster,
unsigned long myId);
virtual ~Definition();
int m_version;
bool m_isAbstract;
......
/*=========================================================================
Copyright (c) 1998-2012 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.
All rights reserved. No part of this software may be reproduced, distributed,
or modified, in any form or by any means, without permission in writing from
Kitware Inc.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "attribute/DoubleComponent.h"
#include "attribute/DoubleComponentDefinition.h"
using namespace slctk::attribute;
//----------------------------------------------------------------------------
DoubleComponent::DoubleComponent(const DoubleComponentDefinition *def):
ValueComponentTemplate<double>(def)
{
}
//----------------------------------------------------------------------------
DoubleComponent::~DoubleComponent()
{
}
//----------------------------------------------------------------------------
Component::Type DoubleComponent::type() const
{
return DOUBLE;
}
/*=========================================================================
Copyright (c) 1998-2012 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.
All rights reserved. No part of this software may be reproduced, distributed,
or modified, in any form or by any means, without permission in writing from
Kitware Inc.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME DoubleComponent.h -
// .SECTION Description
// .SECTION See Also
#ifndef __slctk_attribute_DoubleComponent_h
#define __slctk_attribute_DoubleComponent_h
#include "attribute/ValueComponentTemplate.h"
#include "AttributeExports.h"
namespace slctk
{
namespace attribute
{
class Attribute;
class DoubleComponentDefinition;
class SLCTKATTRIBUTE_EXPORT DoubleComponent :
public ValueComponentTemplate<double>
{
friend class DoubleComponentDefinition;
public:
DoubleComponent(const DoubleComponentDefinition *def);
virtual ~DoubleComponent();
virtual Component::Type type() const;
protected:
private:
};
};
};
#endif /* __slctk_attribute_DoubleComponent_h */
/*=========================================================================
Copyright (c) 1998-2012 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.
All rights reserved. No part of this software may be reproduced, distributed,
or modified, in any form or by any means, without permission in writing from
Kitware Inc.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "attribute/DoubleComponentDefinition.h"
#include "attribute/DoubleComponent.h"
using namespace slctk::attribute;
//----------------------------------------------------------------------------
DoubleComponentDefinition::DoubleComponentDefinition(const std::string &myName,
unsigned long myId):
ValueComponentDefinitionTemplate<double>(myName, myId)
{
}
//----------------------------------------------------------------------------
DoubleComponentDefinition::~DoubleComponentDefinition()
{
}
//----------------------------------------------------------------------------
Component *DoubleComponentDefinition::buildComponent() const
{
return new DoubleComponent(this);
}
/*=========================================================================
Copyright (c) 1998-2012 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.
All rights reserved. No part of this software may be reproduced, distributed,
or modified, in any form or by any means, without permission in writing from
Kitware Inc.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME DoubleComponentDefinition.h -
// .SECTION Description
// .SECTION See Also
#ifndef __slctk_attribute_DoubleComponentDefinition_h
#define __slctk_attribute_DoubleComponentDefinition_h
#include "ValueComponentDefinitionTemplate.h"
namespace slctk
{
namespace attribute
{
class SLCTKATTRIBUTE_EXPORT DoubleComponentDefinition :
public ValueComponentDefinitionTemplate<double>
{
public:
DoubleComponentDefinition(const std::string &myName,
unsigned long myId);
virtual ~DoubleComponentDefinition();
virtual slctk::attribute::Component *buildComponent() const;
protected:
private:
};
};
};
#endif /* __slctk_attribute_DoubleComponentDefinition_h */
/*=========================================================================
Copyright (c) 1998-2012 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.
All rights reserved. No part of this software may be reproduced, distributed,
or modified, in any form or by any means, without permission in writing from
Kitware Inc.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "attribute/IntegerComponent.h"
#include "attribute/IntegerComponentDefinition.h"
using namespace slctk::attribute;
//----------------------------------------------------------------------------
IntegerComponent::IntegerComponent(const IntegerComponentDefinition *def):
ValueComponentTemplate<int>(def)
{
}
//----------------------------------------------------------------------------
IntegerComponent::~IntegerComponent()
{
}
//----------------------------------------------------------------------------
Component::Type IntegerComponent::type() const
{
return INTEGER;
}
/*=========================================================================
Copyright (c) 1998-2012 Kitware Inc. 28 Corporate Drive,
Clifton Park, NY, 12065, USA.
All rights reserved. No part of this software may be reproduced, distributed,
or modified, in any form or by any means, without permission in writing from
Kitware Inc.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF,
EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO
PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME IntegerComponent.h -
// .SECTION Description
// .SECTION See Also
#ifndef __slctk_attribute_IntegerComponent_h
#define __slctk_attribute_IntegerComponent_h
#include "attribute/ValueComponentTemplate.h"
#include "AttributeExports.h"
namespace slctk
{
namespace attribute
{
class Attribute;
class IntegerComponentDefinition;
class SLCTKATTRIBUTE_EXPORT IntegerComponent :
public ValueComponentTemplate<int>
{
friend class IntegerComponentDefinition;
public:
IntegerComponent(const IntegerComponentDefinition *def);
virtual ~IntegerComponent();
virtual Component::Type type() const;
protected:
private:
};
};
};
#endif /* __slctk_attribute_IntegerComponent_h */
/*=========================================================================