X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fatomicentity.cpp;fp=src%2Fbase%2Fatomicentity.cpp;h=0000000000000000000000000000000000000000;hb=9f6ad3fe0b9cb30115a5d38e8af3aebed0d70c08;hp=ee164c0ee135c89d4141186adf5d84ccfd7f87d0;hpb=43c13b052d069ba435277d93867380d00c04931f;p=architektonas diff --git a/src/base/atomicentity.cpp b/src/base/atomicentity.cpp deleted file mode 100644 index ee164c0..0000000 --- a/src/base/atomicentity.cpp +++ /dev/null @@ -1,192 +0,0 @@ -// atomicentity.cpp -// -// Part of the Architektonas Project -// Originally part of QCad Community Edition by Andrew Mustun -// Extensively rewritten and refactored by James L. Hammons -// Portions copyright (C) 2001-2003 RibbonSoft -// Copyright (C) 2010 Underground Software -// See the README and GPLv2 files for licensing and warranty information -// -// JLH = James L. Hammons -// -// Who When What -// --- ---------- ----------------------------------------------------------- -// JLH 05/08/2010 Moved implementation from header to this file. :-) -// - -#include "atomicentity.h" - -/** - * Construtor. - */ -AtomicEntity::AtomicEntity(EntityContainer * parent/*= NULL*/): Entity(parent) -{ -} - -/** - * Destrutor. - */ -/*virtual*/ AtomicEntity::~AtomicEntity() -{ -} - -/** - * @return false because entities made from subclasses are - * atomic entities. - */ -/*virtual*/ bool AtomicEntity::isContainer() const -{ - return false; -} - -/** - * @return true because entities made from subclasses are - * atomic entities. - */ -/*virtual*/ bool AtomicEntity::isAtomic() const -{ - return true; -} - -/** - * @return Always 1 for atomic entities. - */ -/*virtual*/ unsigned long int AtomicEntity::count() -{ - return 1; -} - -/** - * @return Always 1 for atomic entities. - */ -/*virtual*/ unsigned long int AtomicEntity::countDeep() -{ - return 1; -} - -/** - * Implementation must return the endpoint of the entity or - * an invalid vector if the entity has no endpoint. - */ -/*virtual*/ Vector AtomicEntity::getEndpoint() const -{ - return Vector(false); -} - -/** - * Implementation must return the startpoint of the entity or - * an invalid vector if the entity has no startpoint. - */ -/*virtual*/ Vector AtomicEntity::getStartpoint() const -{ - return Vector(false); -} - -/** - * Implementation must return the angle in which direction the entity starts. - */ -/*virtual*/ double AtomicEntity::getDirection1() const -{ - return 0.0; -} - -/** - * Implementation must return the angle in which direction the entity starts the opposite way. - */ -/*virtual*/ double AtomicEntity::getDirection2() const -{ - return 0.0; -} - -/** - * (De-)selects startpoint. - */ -/*virtual*/ void AtomicEntity::setStartpointSelected(bool select) -{ - if (select) - setFlag(RS2::FlagSelected1); - else - delFlag(RS2::FlagSelected1); -} - -/** - * (De-)selects endpoint. - */ -/*virtual*/ void AtomicEntity::setEndpointSelected(bool select) -{ - if (select) - setFlag(RS2::FlagSelected2); - else - delFlag(RS2::FlagSelected2); -} - -/** - * @return True if the entities startpoint is selected. - */ -bool AtomicEntity::isStartpointSelected() const -{ - return getFlag(RS2::FlagSelected1); -} - -/** - * @return True if the entities endpoint is selected. - */ -bool AtomicEntity::isEndpointSelected() const -{ - return getFlag(RS2::FlagSelected2); -} - -/** - * Implementation must move the startpoint of the entity to - * the given position. - */ -/*virtual*/ void AtomicEntity::moveStartpoint(const Vector & /*pos*/) -{ -} - -/** - * Implementation must move the endpoint of the entity to - * the given position. - */ -/*virtual*/ void AtomicEntity::moveEndpoint(const Vector & /*pos*/) -{ -} - -/** - * Implementation must trim the startpoint of the entity to - * the given position. - */ -/*virtual*/ void AtomicEntity::trimStartpoint(const Vector & pos) -{ - moveStartpoint(pos); -} - -/** -* Implementation must trim the endpoint of the entity to -* the given position. -*/ -/*virtual*/ void AtomicEntity::trimEndpoint(const Vector & pos) -{ - moveEndpoint(pos); -} - -/** -* Implementation must return which ending of the entity will -* be trimmed if 'coord' is the coordinate chosen to indicate the -* trim entity and 'trimPoint' is the point to which the entity will -* be trimmed. -*/ -/*virtual*/ RS2::Ending AtomicEntity::getTrimPoint(const Vector & /*coord*/, const Vector & /*trimPoint*/) -{ - return RS2::EndingNone; -} - -/*virtual*/ void AtomicEntity::reverse() -{ -} - -/*virtual*/ void AtomicEntity::moveSelectedRef(const Vector & ref, const Vector & offset) -{ - if (isSelected()) - moveRef(ref, offset); -}