void Actor::SetName(std::string_view name)
{
- mName = ConstString(name);
+ mName = name;
// ATTENTION: string for debug purposes is not thread safe.
- DALI_LOG_SET_OBJECT_STRING(const_cast<SceneGraph::Node*>(&GetNode()), mName.GetCString());
+ DALI_LOG_SET_OBJECT_STRING(const_cast<SceneGraph::Node*>(&GetNode()), mName.c_str());
}
uint32_t Actor::GetId() const
return mParentImpl.GetChildrenInternal();
}
-ActorPtr Actor::FindChildByName(ConstString actorName)
+ActorPtr Actor::FindChildByName(const std::string_view& actorName)
{
return mParentImpl.FindChildByName(actorName);
}
#define DALI_INTERNAL_ACTOR_H
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
std::string_view GetName() const
{
- return mName.GetStringView();
+ return mName;
}
/**
/**
* @copydoc Dali::Internal::ActorParent::FindChildByName
*/
- ActorPtr FindChildByName(ConstString actorName) override;
+ ActorPtr FindChildByName(const std::string_view& actorName) override;
/**
* @copydoc Dali::Internal::ActorParent::FindChildById
Vector3 mTargetScale; ///< Event-side storage for scale
Rect<int> mTouchAreaOffset; ///< touch area offset (left, right, bottom, top)
- ConstString mName; ///< Name of the actor
+ std::string mName; ///< Name of the actor
uint32_t mSortedDepth; ///< The sorted depth index. A combination of tree traversal and sibling order.
int16_t mDepth; ///< The depth in the hierarchy of the actor. Only 32,767 levels of depth are supported
return ((mChildren) ? (*mChildren)[index] : ActorPtr());
}
-ActorPtr ActorParentImpl::FindChildByName(ConstString actorName)
+ActorPtr ActorParentImpl::FindChildByName(const std::string_view& actorName)
{
ActorPtr child = nullptr;
- if(actorName.GetStringView() == mOwner.GetName())
+ if(actorName == mOwner.GetName())
{
child = &mOwner;
}
#ifndef DALI_INTERNAL_ACTOR_PARENT_IMPL_H
#define DALI_INTERNAL_ACTOR_PARENT_IMPL_H
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use actor file except in compliance with the License.
/**
* @copydoc Dali::Actor::FindChildByName
*/
- ActorPtr FindChildByName(ConstString actorName) override;
+ ActorPtr FindChildByName(const std::string_view& actorName) override;
/**
* @copydoc Dali::Actor::FindChildById
#ifndef DALI_INTERNAL_ACTOR_PARENT_H
#define DALI_INTERNAL_ACTOR_PARENT_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use actor file except in compliance with the License.
/**
* @copydoc Dali::Actor::FindChildByName
*/
- virtual ActorPtr FindChildByName(ConstString actorName) = 0;
+ virtual ActorPtr FindChildByName(const std::string_view& actorName) = 0;
/**
* @copydoc Dali::Actor::FindChildById
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Actor Actor::FindChildByName(std::string_view actorName)
{
- Internal::ActorPtr child = GetImplementation(*this).FindChildByName(Internal::ConstString(actorName));
+ Internal::ActorPtr child = GetImplementation(*this).FindChildByName(actorName);
return Actor(child.Get());
}