This commit is contained in:
Misaki
2025-12-04 19:11:29 +08:00
commit bb600bbbc4
2741 changed files with 364700 additions and 0 deletions
+71
View File
@@ -0,0 +1,71 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
#pragma once
#include "Type/csmString.hpp"
namespace Live2D { namespace Cubism { namespace Framework {
class CubismIdManager;
/**
* Handles the ID of parameters, parts, and drawing objects.
*/
struct CubismId
{
friend class CubismIdManager;
/**
* Returns the ID.
*
* @return ID
*/
const csmString& GetString() const;
/**
* Assigns the ID held by another CubismId to this ID.
*
* @param c CubismId object to assign
*
* @return Reference to this object after assignment
*/
CubismId& operator=(const CubismId& c);
/**
* Compares if the ID held by another CubismId is equal to the ID held by this object.
*
* @param c CubismId object to compare
*
* @return true if the IDs are equal; otherwise false.
*/
csmBool operator==(const CubismId& c) const;
/**
* Compares if the ID held by another CubismId is not equal to the ID held by this object.
*
* @param c CubismId object to compare
*
* @return true if the IDs are not equal; otherwise false.
*/
csmBool operator!=(const CubismId& c) const;
private:
CubismId();
CubismId(const csmChar* id);
~CubismId();
CubismId(const CubismId& c);
csmString _id;
};
typedef const CubismId* CubismIdHandle;
}}}