Commit 770888da authored by Bob Obara's avatar Bob Obara

Initial Commint of Attributes

parents
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
## This CMake script checks source files for the appropriate copyright
## statement, which is stored in:
## Remus_SOURCE_DIR/CMake/CopyrightStatement.txt
## To run this script, execute CMake as follows:
cmake_minimum_required(VERSION 2.8)
set(FILES_TO_CHECK
*.h
*.cxx
)
if (NOT Remus_SOURCE_DIR)
message(SEND_ERROR "Remus_SOURCE_DIR not defined.")
endif (NOT Remus_SOURCE_DIR)
set(copyright_file ${Remus_SOURCE_DIR}/CMake/CopyrightStatement.txt)
if (NOT EXISTS ${copyright_file})
message(SEND_ERROR "Cannot find CopyrightStatement.txt")
endif (NOT EXISTS ${copyright_file})
# Gets the current year (if possible).
function (get_year var)
if (UNIX)
execute_process(COMMAND "date" "+%Y" OUTPUT_VARIABLE result)
string(REGEX REPLACE "(....).*" "\\1" result "${result}")
elseif (WIN32)
execute_process(COMMAND "date" "/T" OUTPUT_VARIABLE result)
string(REGEX REPLACE ".*../../(....).*" "\\1" result "${result}")
else (UNIX)
message("Don't know how to get date.")
set(result "20XX")
endif (UNIX)
set(${var} "${result}" PARENT_SCOPE)
endfunction (get_year)
set(copyright_file_year 2012)
get_year(current_year)
# Escapes ';' characters (list delimiters) and splits the given string into
# a list of its lines without newlines.
function (list_of_lines var string)
string(REGEX REPLACE ";" "\\\\;" conditioned_string "${string}")
string(REGEX REPLACE "\n" ";" conditioned_string "${conditioned_string}")
set(${var} "${conditioned_string}" PARENT_SCOPE)
endfunction (list_of_lines)
# Read in copyright statement file.
file(READ ${copyright_file} COPYRIGHT_STATEMENT)
# Remove trailing whitespace and ending lines. They are sometimes hard to
# see or remove in editors.
string(REGEX REPLACE "[ \t]*\n" "\n" COPYRIGHT_STATEMENT "${COPYRIGHT_STATEMENT}")
string(REGEX REPLACE "\n+$" "" COPYRIGHT_STATEMENT "${COPYRIGHT_STATEMENT}")
# Get a list of lines in the copyright statement.
list_of_lines(COPYRIGHT_LINE_LIST "${COPYRIGHT_STATEMENT}")
# Comment regular expression characters that we want to match literally.
string(REPLACE "." "\\." COPYRIGHT_LINE_LIST "${COPYRIGHT_LINE_LIST}")
string(REPLACE "(" "\\(" COPYRIGHT_LINE_LIST "${COPYRIGHT_LINE_LIST}")
string(REPLACE ")" "\\)" COPYRIGHT_LINE_LIST "${COPYRIGHT_LINE_LIST}")
# Introduce regular expression for years we want to be generic.
string(REPLACE
"${copyright_file_year}"
"20[0-9][0-9]"
COPYRIGHT_LINE_LIST
"${COPYRIGHT_LINE_LIST}"
)
# Replace year in COPYRIGHT_STATEMENT with current year.
string(REPLACE
"${copyright_file_year}"
"${current_year}"
COPYRIGHT_STATEMENT
"${COPYRIGHT_STATEMENT}"
)
# Print an error concerning the missing copyright in the given file.
function(missing_copyright filename comment_prefix)
message("${filename} does not have the appropriate copyright statement:\n")
# Condition the copyright statement
string(REPLACE
"\n"
"\n${comment_prefix} "
comment_copyright
"${COPYRIGHT_STATEMENT}"
)
set(comment_copyright "${comment_prefix} ${comment_copyright}")
string(REPLACE
"\n${comment_prefix} \n"
"\n${comment_prefix}\n"
comment_copyright
"${comment_copyright}"
)
message("${comment_prefix}=============================================================================")
message("${comment_prefix}")
message("${comment_copyright}")
message("${comment_prefix}")
message("${comment_prefix}=============================================================================\n")
message(SEND_ERROR
"Please add the previous statement to the beginning of ${filename}"
)
endfunction(missing_copyright)
# Check the given file for the appropriate copyright statement.
function(check_copyright filename)
set(comment_prefix "//")
# Read in the first 2000 characters of the file and split into lines.
# This is roughly equivalent to the file STRINGS command except that we
# also escape semicolons (list separators) in the input, which the file
# STRINGS command does not currently do.
file(READ "${filename}" header_contents LIMIT 2000)
list_of_lines(header_lines "${header_contents}")
# Check each copyright line.
foreach (copyright_line IN LISTS COPYRIGHT_LINE_LIST)
set(match)
# My original algorithm tried to check the order by removing items from
# header_lines as they were encountered. Unfortunately, CMake 2.8's
# list REMOVE_AT command removed the escaping on the ; in one of the
# header_line's items and cause the compare to fail.
foreach (header_line IN LISTS header_lines)
if (copyright_line)
string(REGEX MATCH
"^${comment_prefix}[ \t]*${copyright_line}[ \t]*$"
match
"${header_line}"
)
else (copyright_line)
if (NOT header_line)
set(match TRUE)
endif (NOT header_line)
endif (copyright_line)
if (match)
break()
endif (match)
endforeach (header_line)
if (NOT match)
message(STATUS "Could not find match for `${copyright_line}'")
missing_copyright("${filename}" "${comment_prefix}")
endif (NOT match)
endforeach (copyright_line)
endfunction(check_copyright)
foreach (glob_expression ${FILES_TO_CHECK})
file(GLOB_RECURSE file_list
RELATIVE "${Remus_SOURCE_DIR}/remus"
"${Remus_SOURCE_DIR}/remus/${glob_expression}"
)
foreach (file ${file_list})
message("Checking ${file}")
check_copyright("${Remus_SOURCE_DIR}/remus/${file}")
endforeach (file)
endforeach (glob_expression)
Copyright (c) Kitware, Inc.
All rights reserved.
See LICENSE.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
#=========================================================================
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the above copyright notice for more information.
#
#=========================================================================
# Utility to build a kit name from the current directory.
function(ms_get_kit_name kitvar)
string(REPLACE "${Slctk_SOURCE_DIR}/" "" dir_prefix ${CMAKE_CURRENT_SOURCE_DIR})
string(REPLACE "/" "_" kit "${dir_prefix}")
set(${kitvar} "${kit}" PARENT_SCOPE)
# Optional second argument to get dir_prefix.
if (${ARGC} GREATER 1)
set(${ARGV1} "${dir_prefix}" PARENT_SCOPE)
endif (${ARGC} GREATER 1)
endfunction(ms_get_kit_name)
# Builds a source file and an executable that does nothing other than
# compile the given header files.
function(ms_add_header_test name dir_prefix)
set(hfiles ${ARGN})
set(suffix ".cxx")
set(cxxfiles)
foreach (header ${ARGN})
string(REPLACE "${CMAKE_CURRENT_BINARY_DIR}" "" header "${header}")
get_filename_component(headername ${header} NAME_WE)
set(src ${CMAKE_CURRENT_BINARY_DIR}/TestBuild_${name}_${headername}${suffix})
configure_file(${Slctk_SOURCE_DIR}/CMake/TestBuild.cxx.in ${src} @ONLY)
set(cxxfiles ${cxxfiles} ${src})
endforeach (header)
include_directories(${sysTools_BINARY_DIR})
#include the build directory for the export header
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_library(TestBuild_${name} ${cxxfiles} ${hfiles})
target_link_libraries(TestBuild_${name} sysTools)
set_source_files_properties(${hfiles}
PROPERTIES HEADER_FILE_ONLY TRUE
)
endfunction(ms_add_header_test)
# Declare a list of header files. Will make sure the header files get
# compiled and show up in an IDE. Also makes sure we install the headers
# into the include folder
function(slctk_public_headers)
ms_get_kit_name(name dir_prefix)
ms_add_header_test("${name}" "${dir_prefix}" ${ARGN})
install (FILES ${ARGN} DESTINATION include/${dir_prefix})
endfunction(slctk_public_headers)
# Declare a list of header files. Will make sure the header files get
# compiled and show up in an IDE.
function(slctk_private_headers)
ms_get_kit_name(name dir_prefix)
ms_add_header_test("${name}" "${dir_prefix}" ${ARGN})
endfunction(slctk_private_headers)
# Declare a library as needed to be installed
function(slctk_install_library target)
install(TARGETS ${target} DESTINATION lib EXPORT Slctk-targets)
endfunction(slctk_install_library)
#setup include directories as target properties
function(slctk_set_includes target)
#attach the current build and source directory
set(full_includes ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${ARGN}
)
#include everything
include_directories(${full_includes})
#set up a property on the passed in target
set_property(TARGET ${target} PROPERTY SAVED_INCLUDE_DIRS ${full_includes})
endfunction(slctk_set_includes)
#read the include directory proptery for a target and create a variable
#in the callers scope with the name past names as the variable includes_var_name
function(slctk_get_includes target includes_var_name)
get_property(saved_includes TARGET ${target} PROPERTY SAVED_INCLUDE_DIRS)
set(${includes_var_name} ${saved_includes} PARENT_SCOPE)
endfunction(slctk_get_includes)
#generate an export header and create an install target for it
function(slctk_export_header target file)
ms_get_kit_name(name dir_prefix)
generate_export_header(${target} EXPORT_FILE_NAME ${file})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file} DESTINATION include/${dir_prefix})
endfunction(slctk_export_header)
#include <@dir_prefix@/@header@>
int @headername@()
{
return 0;
}
cmake_minimum_required (VERSION 2.8)
project(Slctk)
# include some cmake code that builds automatic header tests
# and can targets for unit tests
include(CMake/SlctkMacros.cmake)
# include export header so that we can easily expose symbols
# in dynamic libraries
include(GenerateExportHeader)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${Slctk_SOURCE_DIR}/CMake)
#option(Slctk_ENABLE_TESTING "Enable Testing" ON)
#option(Slctk_ENABLE_EXAMPLES "Enable Examples" ON)
#turn on ctest if we want testing
if (Slctk_ENABLE_TESTING)
enable_testing()
include(CTest)
endif()
## Set the directory where the binaries will be stored
set( EXECUTABLE_OUTPUT_PATH
${PROJECT_BINARY_DIR}/bin
CACHE PATH
"Directory where all executable will be stored"
)
## Set the directory where the libraries will be stored
set( LIBRARY_OUTPUT_PATH
${PROJECT_BINARY_DIR}/libs
CACHE PATH
"Directory where all the libraries will be stored"
)
mark_as_advanced(
EXECUTABLE_OUTPUT_PATH
LIBRARY_OUTPUT_PATH)
#add this directory so we can include files like: <slctk/internal/Test.h>
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
#add the actual code
add_subdirectory(attribute)
#add the examples code
if(Slctk_ENABLE_EXAMPLES)
add_subdirectory(Examples)
endif()
/*=========================================================================
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/Attribute.h"
#include "attribute/AttributeReferenceComponent.h"
#include "attribute/Cluster.h"
#include "attribute/Component.h"
using namespace slctk::attribute;
//----------------------------------------------------------------------------
Attribute::Attribute(const std::string &myName, Cluster *myCluster,
unsigned long myId):
m_name(myName), m_cluster(myCluster), m_id(myId)
{
}
//----------------------------------------------------------------------------
Attribute::~Attribute()
{
this->removeAllAssociations();
this->removeAllComponents();
// Tell all references this attribute is going away. Since setting the reference
// to NULL will cause the references set to be modified we need to copy the set first
// and iterate over the copy
std::set<AttributeReferenceComponent *> comps = this->m_references;
std::set<AttributeReferenceComponent *>::iterator it;
for (it = comps.begin(); it != comps.end(); it++)
{
*it->setValue(NULL);
}
}
//----------------------------------------------------------------------------
void Attribute::removeAllComponents()
{
std::size_t i, n = this->m_components.size();
for (i = 0; i < n; i++)
{
delete this->m_components[i];
}
}
//----------------------------------------------------------------------------
const std::string &Attribute::type() const
{
return this->m_cluster->type();
}
//----------------------------------------------------------------------------
const char *Attribute::types() const
{
return this->m_cluster->types();
}
//----------------------------------------------------------------------------
bool Attribute::isA(Definition *def) const
{
return this->m_cluster->isA(def);
}
//----------------------------------------------------------------------------
const Definition *Attribute::definition() const
{
return this->m_cluster->definition();
}
//----------------------------------------------------------------------------
bool Attribute::isMemberOf(const std::string &catagory) const
{
return this->m_cluster->isMemberOf(catagory);
}
//----------------------------------------------------------------------------
bool Attribute::isMemberOf(const std::vector<std::string> &catagories) const
{
return this->m_cluster->isMemberOf(catagories);
}
//----------------------------------------------------------------------------
Manager *Attribute::manager() const
{
return this->m_cluster->manager();
}
//----------------------------------------------------------------------------
void Attribute::associateEntity(slck::ModelEntity *entity)
{
if (this->isEntityAssociated(entity))
{
// Nothing to be done
return;
}
this->m_entities.insert(entity);
//TODO Need to attach attribute to the entity!
}
//----------------------------------------------------------------------------
void Attribute::disassociateEntity(slck::ModelEntity *entity)
{
if (this->m_entities.erase(entity))
{
// TODO Need to detatch the attribute from the entity
}
}
//----------------------------------------------------------------------------
void Attribute::removeAllAssociations()
{
set<slck::ModelEntity *>::iterator it;
for (it = this->m_entities.begin(); it != this->m_entities.end(); it++)
{
// TODO Need to detatch the attribute from the entity
}
}
//----------------------------------------------------------------------------
void Attribute::addComponent(Component *component)
{
this->m_components.push_back(component);
this->m_componentLookUp[component->name(), component);
}
//----------------------------------------------------------------------------
/*=========================================================================
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 slctkAttribute.h - Represents a standalone piece of simulation information
// .SECTION Description
// .SECTION See Also
#ifndef __slctk_attribute_Attribute_h
#define __slctk_attribute_Attribute_h
#include "AttributeExports.h"
#include <map>
#include <set>
#include <string>
#include <vector>
namespace slctk
{
class ModelEntity;
namespace attribute
{
class AttributeReferenceComponent;
class Component;
class Definition;
class Cluster;
class Manager;
class SLCTKATTRIBUTE_EXPORT Attribute
{
friend class slctk::attribute::AttributeReferenceComponent;
friend class slctk::attribute::Definition;
friend class slctk::attribute::Manager;
public:
// NOTE: To rename an attribute use the manager!
const std::string &name() const
{ return this->m_name;}
unsigned long id() const
{ return this->m_id;}
const std::string &type() const;
std::vector<std::string> types() const;
bool isA(slctk::attribute::Definition *def) const;
const slctk::attribute::Definition *definition() const;
bool isMemberOf(const std::string &catagory) const;
bool isMemberOf(const std::vector<std::string> &catagories) const;
slctk::attribute::Component *component(int ith) const
{
return (ith < 0) ? NULL : (ith >= this->m_components.size() ?
NULL : this->m_components[ith]);
}
slctk::attribute::Component *find(const std::string &name) ;
const slctk::attribute::Component *find(const std::string &name) const;
std::size_t numberOfComponents() const
{return this->m_components.size();}
std::size_t numberOfAssociatedEntities() const
{ return this->m_entities.size();}
bool isEntityAssociated(slctk::ModelEntity *entity) const
{ return (this->m_entities.find(entity) != this->m_entities.end());}
std::set<slctk::ModelEntity *>::const_iterator associatedEntities() const
{return this->m_entities.begin();}
void associateEntity(slctk::ModelEntity *entity);
void disassociateEntity(slctk::ModelEntity *entity);
void removeAllAssociations();
// These methods only applies to Attributes whose
// definition returns true for isNodal()
bool appliesToBoundaryNodes() const
{return this->m_appliesToBoundaryNodes;}
void setAppliesToBoundaryNodes(bool appliesValue)
{this->m_appliesToBoundaryNodes = appliesValue;}
bool appliesToInteriorNodes() const
{return this->m_appliesToInteriorNodes;}
void setAppliesToInteriorNodes(bool appliesValue)
{this->m_appliesToInteriorNodes = appliesValue;}
bool isReferenced() const
{return this->m_references.size() != 0;}
slctk::attribute::Manager *manager() const;
slctk::attribute::Cluster *cluster() const
{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)
{this->m_name = newname;}
void registerComponent(slctk::attribute::AttributeReferenceComponent *comp)
{this->m_references.insert(comp);}
void unregisterComponent(slctk::attribute::AttributeReferenceComponent *comp)
{this->m_references.erase(comp);}
std::string m_name;
std::vector<slctk::attribute::Component *> m_components;
std::map<std::string, slctk::attribute::Component *> m_componentLookUp;
unsigned long m_id;
slctk::attribute::Cluster *m_cluster;
std::set<slctk::ModelEntity *> m_entities;
std::set<slctk::attribute::AttributeReferenceComponent *> m_references;
bool m_appliesToBoundaryNodes;
bool m_appliesToInteriorNodes;
private:
};
//----------------------------------------------------------------------------
inline const Component *Attribute::find(const std::string &name) const
{
std::map<std::string, slctk::attribute::Component *>::const_iterator it;
it = this->m_componentLookUp.find(name);
if (it == this->m_componentLookUp.end())
{
return NULL;
}
return it->second;
}
//----------------------------------------------------------------------------
inline Component *Attribute::find(const std::string &name)
{
std::map<std::string, slctk::attribute::Component *>::const_iterator it;
it = this->m_componentLookUp.find(name);
if (it == this->m_componentLookUp.end())
{
return NULL;
}
return it->second;
}
};
};
#endif /* __slctk_attribute_Attribute_h */
project(Slctk_Attribute)
set(headers
Attribute.h
Component.h
ComponentDefinition.h
Definition.h
ValueComponent.h
ValueComponentDefinition.h
ValueComponentDefinitionTemplate.h
ValueComponentTemplate.h
)
set(attribute_srcs
Attribute.cxx
Component.cxx
ComponentDefinition.cxx
Definition.cxx
ValueComponent.cxx
ValueComponentDefinition.cxx
)
add_library(SlctkAttribute ${attribute_srcs} ${headers})
target_link_libraries(SlctkAttribute)
slctk_set_includes(SlctkAttribute ${Slctk_Attribute_INCLUDE_DIRS})
#create the export header symbol exporting
slctk_export_header(SlctkAttribute AttributeExports.h)
#install the library
slctk_install_library(SlctkAttribute)
#install the headers
slctk_public_headers(${headers})
#setup the exports for the library when used from a build tree
export(PACKAGE SlctkAttribute)
export(TARGETS SlctkAttribute FILE SlctkAttribute-exports.cmake)
/*=========================================================================
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/Component.h"
#include "attribute/ComponentDefinition.h"
using namespace slck::attribute;
//----------------------------------------------------------------------------
Component::Component(ComponentDefinition *def):
m_isEnabled(true), m_definition(def)
{
}
//----------------------------------------------------------------------------
Component::~Component()
{
}
//----------------------------------------------------------------------------
const char *Component::name() const
{
return this->m_definition->name();
}
//----------------------------------------------------------------------------
bool Component::isOptional() const
{
return this->m_definition->isOptional();
}
//----------------------------------------------------------------------------=
bool Component::isEnabled() const
{
return this->isOptional() ? this->m_isEnabled : true;
}
//----------------------------------------------------------------------------
bool Component::isMemberOf(const std::string &catagory) const
{
return this->definition->isMemberOf(catagory);
}
//----------------------------------------------------------------------------
bool Component::isMemberOf(const std::vector<std::string> &catagories) const;
{