Commit 6f3e6eca authored by Bob Obara's avatar Bob Obara

ENH: Renamed Integer to Int

parent 13e9ef18
......@@ -50,8 +50,8 @@ namespace slctk
class DoubleItemDefinition;
class GroupItem;
class GroupItemDefinition;
class IntegerItem;
class IntegerItemDefinition;
class IntItem;
class IntItemDefinition;
class Manager;
class StringItem;
class StringItemDefinition;
......@@ -78,8 +78,8 @@ namespace slctk
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::ValueItem> ValueItemPtr;
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::DoubleItem> DoubleItemPtr;
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::DoubleItemDefinition> DoubleItemDefinitionPtr;
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::IntegerItem> IntegerItemPtr;
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::IntegerItemDefinition> IntegerItemDefinitionPtr;
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::IntItem> IntItemPtr;
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::IntItemDefinition> IntItemDefinitionPtr;
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::StringItem> StringItemPtr;
typedef @POINTER_NAMESPACE@::shared_ptr<attribute::StringItemDefinition> StringItemDefinitionPtr;
......
......@@ -12,8 +12,8 @@ set(headers
DoubleItemDefinition.h
GroupItem.h
GroupItemDefinition.h
IntegerItem.h
IntegerItemDefinition.h
IntItem.h
IntItemDefinition.h
Manager.h
StringItem.h
StringItemDefinition.h
......@@ -35,8 +35,8 @@ set(attribute_srcs
DoubleItemDefinition.cxx
GroupItem.cxx
GroupItemDefinition.cxx
IntegerItem.cxx
IntegerItemDefinition.cxx
IntItem.cxx
IntItemDefinition.cxx
Manager.cxx
StringItem.cxx
StringItemDefinition.cxx
......
......@@ -22,22 +22,22 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "attribute/IntegerItem.h"
#include "attribute/IntegerItemDefinition.h"
#include "attribute/IntItem.h"
#include "attribute/IntItemDefinition.h"
using namespace slctk::attribute;
//----------------------------------------------------------------------------
IntegerItem::IntegerItem()
IntItem::IntItem()
{
}
//----------------------------------------------------------------------------
IntegerItem::~IntegerItem()
IntItem::~IntItem()
{
}
//----------------------------------------------------------------------------
Item::Type IntegerItem::type() const
Item::Type IntItem::type() const
{
return INTEGER;
return INT;
}
......@@ -20,12 +20,12 @@ PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME IntegerItem.h -
// .NAME IntItem.h -
// .SECTION Description
// .SECTION See Also
#ifndef __slctk_attribute_IntegerItem_h
#define __slctk_attribute_IntegerItem_h
#ifndef __slctk_attribute_IntItem_h
#define __slctk_attribute_IntItem_h
#include "attribute/ValueItemTemplate.h"
#include "AttributeExports.h"
......@@ -35,14 +35,14 @@ namespace slctk
namespace attribute
{
class Attribute;
class IntegerItemDefinition;
class SLCTKATTRIBUTE_EXPORT IntegerItem :
class IntItemDefinition;
class SLCTKATTRIBUTE_EXPORT IntItem :
public ValueItemTemplate<int>
{
friend class IntegerItemDefinition;
friend class IntItemDefinition;
public:
IntegerItem();
virtual ~IntegerItem();
IntItem();
virtual ~IntItem();
virtual Item::Type type() const;
protected:
......@@ -52,4 +52,4 @@ namespace slctk
};
};
#endif /* __slctk_attribute_IntegerItem_h */
#endif /* __slctk_attribute_IntItem_h */
......@@ -22,22 +22,22 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
#include "attribute/IntegerItemDefinition.h"
#include "attribute/IntegerItem.h"
#include "attribute/IntItemDefinition.h"
#include "attribute/IntItem.h"
using namespace slctk::attribute;
//----------------------------------------------------------------------------
IntegerItemDefinition::IntegerItemDefinition(const std::string &myName):
IntItemDefinition::IntItemDefinition(const std::string &myName):
ValueItemDefinitionTemplate<int>(myName)
{
}
//----------------------------------------------------------------------------
IntegerItemDefinition::~IntegerItemDefinition()
IntItemDefinition::~IntItemDefinition()
{
}
//----------------------------------------------------------------------------
slctk::AttributeItemPtr IntegerItemDefinition::buildItem() const
slctk::AttributeItemPtr IntItemDefinition::buildItem() const
{
return slctk::AttributeItemPtr(new IntegerItem());
return slctk::AttributeItemPtr(new IntItem());
}
......@@ -20,12 +20,12 @@ PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN
PROVIDE
MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
=========================================================================*/
// .NAME IntegerItemDefinition.h -
// .NAME IntItemDefinition.h -
// .SECTION Description
// .SECTION See Also
#ifndef __slctk_attribute_IntegerItemDefinition_h
#define __slctk_attribute_IntegerItemDefinition_h
#ifndef __slctk_attribute_IntItemDefinition_h
#define __slctk_attribute_IntItemDefinition_h
#include "ValueItemDefinitionTemplate.h"
......@@ -33,12 +33,12 @@ namespace slctk
{
namespace attribute
{
class SLCTKATTRIBUTE_EXPORT IntegerItemDefinition :
class SLCTKATTRIBUTE_EXPORT IntItemDefinition :
public ValueItemDefinitionTemplate<int>
{
public:
IntegerItemDefinition(const std::string &myName);
virtual ~IntegerItemDefinition();
IntItemDefinition(const std::string &myName);
virtual ~IntItemDefinition();
virtual slctk::AttributeItemPtr buildItem() const;
protected:
......
......@@ -88,8 +88,8 @@ std::string Item::type2String(Item::Type t)
return "Double";
case GROUP:
return "Group";
case INTEGER:
return "Integer";
case INT:
return "Int";
case STRING:
return "String";
case VOID:
......@@ -114,9 +114,9 @@ Item::Type Item::string2Type(const std::string &s)
{
return GROUP;
}
if (s == "Integer")
if (s == "Int")
{
return INTEGER;
return INT;
}
if (s == "String")
{
......
......@@ -46,7 +46,7 @@ namespace slctk
ATTRIBUTE_REFERENCE,
DOUBLE,
GROUP,
INTEGER,
INT,
STRING,
VOID,
NUMBER_OF_TYPES
......
......@@ -24,8 +24,8 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "attribute/Manager.h"
#include "attribute/Definition.h"
#include "attribute/Attribute.h"
#include "attribute/IntegerItem.h"
#include "attribute/IntegerItemDefinition.h"
#include "attribute/IntItem.h"
#include "attribute/IntItemDefinition.h"
#include "attribute/DoubleItem.h"
#include "attribute/DoubleItemDefinition.h"
#include "attribute/StringItem.h"
......@@ -49,9 +49,9 @@ int main()
status = -1;
}
// Lets add some item definitions
slctk::IntegerItemDefinitionPtr icompdef(new slctk::attribute::IntegerItemDefinition("IntComp1"));
slctk::IntItemDefinitionPtr icompdef(new slctk::attribute::IntItemDefinition("IntComp1"));
def->addItemDefinition(icompdef);
slctk::IntegerItemDefinitionPtr icompdef2(new slctk::attribute::IntegerItemDefinition("IntComp2"));
slctk::IntItemDefinitionPtr icompdef2(new slctk::attribute::IntItemDefinition("IntComp2"));
icompdef2->setDefaultValue(10);
def->addItemDefinition(icompdef2);
slctk::AttributeDefinitionPtr def1 = manager.createDefinition("testDef");
......@@ -94,10 +94,10 @@ int main()
}
else
{
slctk::IntegerItemPtr icptr;
icptr = slctk::dynamicCastPointer<slctk::attribute::IntegerItem>(att->item(0));
slctk::IntItemPtr icptr;
icptr = slctk::dynamicCastPointer<slctk::attribute::IntItem>(att->item(0));
std::cout << "Found IntComp1 - value = " << icptr->valueAsString(" %d") << std::endl;
icptr = slctk::dynamicCastPointer<slctk::attribute::IntegerItem>(att->item(1));
icptr = slctk::dynamicCastPointer<slctk::attribute::IntItem>(att->item(1));
std::cout << "Found IntComp2 - value = " << icptr->valueAsString(" %d") << std::endl;
}
......
......@@ -24,8 +24,8 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "attribute/Manager.h"
#include "attribute/Definition.h"
#include "attribute/Attribute.h"
#include "attribute/IntegerItem.h"
#include "attribute/IntegerItemDefinition.h"
#include "attribute/IntItem.h"
#include "attribute/IntItemDefinition.h"
#include "attribute/DoubleItem.h"
#include "attribute/DoubleItemDefinition.h"
#include "attribute/StringItem.h"
......@@ -36,7 +36,7 @@ int main()
{
int status = 0;
{
typedef slctk::attribute::IntegerItemDefinition IntCompDef;
typedef slctk::attribute::IntItemDefinition IntCompDef;
typedef slctk::attribute::DoubleItemDefinition DoubleCompDef;
typedef slctk::attribute::StringItemDefinition StringCompDef;
typedef slctk::attribute::ValueItem ValueComp;
......@@ -46,9 +46,9 @@ int main()
std::cout << "Manager Created\n";
slctk::AttributeDefinitionPtr base = manager.createDefinition("BaseDef");
// Lets add some item definitions
slctk::IntegerItemDefinitionPtr icompdef(new IntCompDef("IntComp1"));
slctk::IntItemDefinitionPtr icompdef(new IntCompDef("IntComp1"));
base->addItemDefinition(icompdef);
slctk::IntegerItemDefinitionPtr icompdef2(new IntCompDef("IntComp2"));
slctk::IntItemDefinitionPtr icompdef2(new IntCompDef("IntComp2"));
icompdef2->setDefaultValue(10);
base->addItemDefinition(icompdef2);
......@@ -96,7 +96,7 @@ int main()
case AttComp::DOUBLE:
std::cout << " Value = " << vcomp->valueAsString("%g") << "\n";
break;
case AttComp::INTEGER:
case AttComp::INT:
std::cout << " Value = " << vcomp->valueAsString("%d") << "\n";
break;
case AttComp::STRING:
......
......@@ -24,8 +24,8 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "attribute/Manager.h"
#include "attribute/Definition.h"
#include "attribute/Attribute.h"
#include "attribute/IntegerItem.h"
#include "attribute/IntegerItemDefinition.h"
#include "attribute/IntItem.h"
#include "attribute/IntItemDefinition.h"
#include "attribute/DoubleItem.h"
#include "attribute/DoubleItemDefinition.h"
#include "attribute/StringItem.h"
......@@ -36,7 +36,7 @@ int main()
{
int status;
{
typedef slctk::attribute::IntegerItemDefinition IntCompDef;
typedef slctk::attribute::IntItemDefinition IntCompDef;
typedef slctk::attribute::DoubleItemDefinition DoubleCompDef;
typedef slctk::attribute::StringItemDefinition StringCompDef;
typedef slctk::attribute::ValueItem ValueComp;
......@@ -51,9 +51,9 @@ int main()
slctk::AttributeDefinitionPtr base = manager.createDefinition("BaseDef");
// Lets add some item definitions
slctk::IntegerItemDefinitionPtr icompdef(new IntCompDef("IntComp1"));
slctk::IntItemDefinitionPtr icompdef(new IntCompDef("IntComp1"));
base->addItemDefinition(icompdef);
slctk::IntegerItemDefinitionPtr icompdef2(new IntCompDef("IntComp2"));
slctk::IntItemDefinitionPtr icompdef2(new IntCompDef("IntComp2"));
icompdef2->setDefaultValue(10);
base->addItemDefinition(icompdef2);
......@@ -131,7 +131,7 @@ int main()
case AttComp::DOUBLE:
std::cout << " Value = " << vcomp->valueAsString("%g") << "\n";
break;
case AttComp::INTEGER:
case AttComp::INT:
std::cout << " Value = " << vcomp->valueAsString("%d") << "\n";
break;
case AttComp::STRING:
......
......@@ -24,8 +24,8 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "attribute/Manager.h"
#include "attribute/Definition.h"
#include "attribute/Attribute.h"
#include "attribute/IntegerItem.h"
#include "attribute/IntegerItemDefinition.h"
#include "attribute/IntItem.h"
#include "attribute/IntItemDefinition.h"
#include "attribute/DoubleItem.h"
#include "attribute/DoubleItemDefinition.h"
#include "attribute/StringItem.h"
......@@ -36,7 +36,7 @@ int main()
{
int status;
{
typedef slctk::attribute::IntegerItemDefinition IntCompDef;
typedef slctk::attribute::IntItemDefinition IntCompDef;
typedef slctk::attribute::DoubleItemDefinition DoubleCompDef;
typedef slctk::attribute::StringItemDefinition StringCompDef;
typedef slctk::attribute::ValueItem ValueComp;
......@@ -54,9 +54,9 @@ int main()
slctk::AttributeDefinitionPtr base = manager.createDefinition("BaseDef");
// Lets add some item definitions
slctk::IntegerItemDefinitionPtr icompdef(new IntCompDef("IntComp1"));
slctk::IntItemDefinitionPtr icompdef(new IntCompDef("IntComp1"));
base->addItemDefinition(icompdef);
slctk::IntegerItemDefinitionPtr icompdef2(new IntCompDef("IntComp2"));
slctk::IntItemDefinitionPtr icompdef2(new IntCompDef("IntComp2"));
icompdef2->setDefaultValue(10);
base->addItemDefinition(icompdef2);
......
Markdown is supported
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