|
cgma
|
#include <CAEntityColor.hpp>
Public Member Functions | |
| virtual | ~CAEntityColor () |
| CAEntityColor (RefEntity *, const CubitSimpleAttrib &) | |
| CubitStatus | actuate () |
| CubitStatus | update () |
| CubitStatus | reset () |
| void | merge_owner (CubitAttrib *deletable_attrib) |
| CubitSimpleAttrib | cubit_simple_attrib () |
| int | int_attrib_type () |
| int | color () |
| void | print () |
Private Attributes | |
| int | entityColor |
Definition at line 16 of file CAEntityColor.hpp.
| CAEntityColor::~CAEntityColor | ( | ) | [virtual] |
Definition at line 32 of file CAEntityColor.cpp.
{
}
| CAEntityColor::CAEntityColor | ( | RefEntity * | new_attrib_owner, |
| const CubitSimpleAttrib & | csa_ptr | ||
| ) |
Definition at line 18 of file CAEntityColor.cpp.
: CubitAttrib(new_attrib_owner) { entityColor = 0; if(!csa_ptr.isEmpty()) { const std::vector<int>& i_list = csa_ptr.int_data_list(); assert(i_list.size() > 0); entityColor = i_list[0]; } }
| CubitStatus CAEntityColor::actuate | ( | ) | [virtual] |
Implements CubitAttrib.
Definition at line 37 of file CAEntityColor.cpp.
{
if ( hasActuated)
return CUBIT_SUCCESS;
if ( !attribOwnerEntity )
return CUBIT_FAILURE;
deleteAttrib = CUBIT_FALSE;
//- If actuating after import, change the color. Else (auto actuated) color is already changed...
if( attribOwnerEntity->color() == CUBIT_DEFAULT_COLOR_INDEX ||
dynamic_cast<RefVolume*>(attribOwnerEntity) )
{
attribOwnerEntity->color(entityColor);
}
hasActuated = CUBIT_TRUE;
return CUBIT_SUCCESS;
}
| int CAEntityColor::color | ( | ) | [inline] |
Definition at line 44 of file CAEntityColor.hpp.
{return entityColor;}
| CubitSimpleAttrib CAEntityColor::cubit_simple_attrib | ( | ) | [virtual] |
Implements CubitAttrib.
Definition at line 94 of file CAEntityColor.cpp.
{
std::vector<CubitString> cs_list;
std::vector<int> i_list;
i_list.push_back ( entityColor );
cs_list.push_back(att_internal_name());
return CubitSimpleAttrib(&cs_list, NULL, &i_list);
}
| int CAEntityColor::int_attrib_type | ( | ) | [inline, virtual] |
| void CAEntityColor::merge_owner | ( | CubitAttrib * | deletable_attrib | ) | [virtual] |
Reimplemented from CubitAttrib.
Definition at line 85 of file CAEntityColor.cpp.
{
// take the id with the lowest value
CAEntityColor *other_caecolor = CAST_TO(deletable_attrib, CAEntityColor);
if (other_caecolor)
entityColor = other_caecolor->color();
}
| void CAEntityColor::print | ( | ) | [virtual] |
Reimplemented from CubitAttrib.
Definition at line 106 of file CAEntityColor.cpp.
{
// print info on this attribute
PRINT_INFO("CAEntityColor: owner = %s %d: color ",
attribOwnerEntity->class_name(), attribOwnerEntity->id());
if ( entityColor > -1 )
PRINT_INFO(" %d\n",
entityColor);
else
PRINT_INFO("\n");
}
| CubitStatus CAEntityColor::reset | ( | ) | [inline, virtual] |
| CubitStatus CAEntityColor::update | ( | ) | [virtual] |
Implements CubitAttrib.
Definition at line 58 of file CAEntityColor.cpp.
{
delete_attrib(CUBIT_TRUE);
return CUBIT_SUCCESS;
/*
if ( hasUpdated )
return CUBIT_SUCCESS;
if ( !attribOwnerEntity)
return CUBIT_FAILURE;
entityColor = attribOwnerEntity->color();
// set the updated flag
hasUpdated = CUBIT_TRUE;
if( entityColor == -1 )
{
delete_attrib(CUBIT_TRUE);
return CUBIT_SUCCESS;
}
return CUBIT_SUCCESS;
*/
}
int CAEntityColor::entityColor [private] |
Definition at line 20 of file CAEntityColor.hpp.