#include <PBProperties.h>
Definition at line 660 of file PBProperties.h.
◆ PBProperties() [1/3]
PBProperties::PBProperties |
( |
| ) |
|
|
inline |
◆ PBProperties() [2/3]
Definition at line 811 of file PBProperties.h.
812 {
813 m_pParent = other.m_pParent;
814
815 if ( other.m_pProperties !=
TNULL )
816 {
817 m_pProperties =
new PBProperty[ other.m_iCount ];
818
819 for (
TSIZE i = 0; i < other.m_iCount; i++ )
820 {
821 m_pProperties[ i ] = other.m_pProperties[ i ];
822 auto pValue = m_pProperties[ i ].
GetValue();
823
825 {
826 pValue->GetProperties()->m_pParent = this;
827 }
828 }
829 }
830 else
831 {
832 m_pProperties = other.m_pProperties;
833 }
834
835 m_iCount = other.m_iCount;
836 }
PBPropertyValue * GetValue()
◆ PBProperties() [3/3]
Definition at line 838 of file PBProperties.h.
839 {
840 m_pParent = other.m_pParent;
841 m_pProperties = other.m_pProperties;
842 m_iCount = other.m_iCount;
843 other.m_pParent =
TNULL;
844 other.m_pProperties =
TNULL;
845 other.m_iCount = 0;
846 }
◆ ~PBProperties()
PBProperties::~PBProperties |
( |
| ) |
|
|
inline |
◆ AddProperties()
PBProperty * PBProperties::AddProperties |
( |
const Toshi::TString8 & | a_Name | ) |
|
|
inline |
Definition at line 966 of file PBProperties.h.
967 {
969 pProperties->m_pParent = this;
970
971 return AllocProperty(
PBProperty( a_Name, pProperties ) );
972 }
◆ AddProperty() [1/5]
PBProperty * PBProperties::AddProperty |
( |
const Toshi::TString8 & | a_Name, |
|
|
const Toshi::TString8 & | a_sValue ) |
|
inline |
◆ AddProperty() [2/5]
◆ AddProperty() [3/5]
PBProperty * PBProperties::AddProperty |
( |
const Toshi::TString8 & | a_Name, |
|
|
TFLOAT | a_fValue ) |
|
inline |
◆ AddProperty() [4/5]
PBProperty * PBProperties::AddProperty |
( |
const Toshi::TString8 & | a_Name, |
|
|
TINT | a_iValue ) |
|
inline |
◆ AddProperty() [5/5]
PBProperty * PBProperties::AddProperty |
( |
const Toshi::TString8 & | a_Name, |
|
|
TUINT32 | a_uiValue ) |
|
inline |
◆ AddPropertyArray()
PBProperty * PBProperties::AddPropertyArray |
( |
const Toshi::TString8 & | a_Name | ) |
|
|
inline |
Definition at line 974 of file PBProperties.h.
975 {
976 PBPropertyValueArray* pArray = new PBPropertyValueArray;
977
978 return AllocProperty(
PBProperty( a_Name, pArray ) );
979 }
◆ AddPropertyBool()
PBProperty * PBProperties::AddPropertyBool |
( |
const Toshi::TString8 & | a_Name, |
|
|
TBOOL | a_bValue ) |
|
inline |
◆ Begin() [1/2]
◆ Begin() [2/2]
◆ End() [1/2]
Definition at line 858 of file PBProperties.h.
859 {
860 return m_pProperties + m_iCount;
861 }
◆ End() [2/2]
Definition at line 868 of file PBProperties.h.
869 {
870 return m_pProperties + m_iCount;
871 }
◆ GetOptionalPropertyValue()
template<typename T>
TBOOL PBProperties::GetOptionalPropertyValue |
( |
T & | a_rOutValue, |
|
|
const TCHAR * | a_szName ) const |
|
inline |
Definition at line 898 of file PBProperties.h.
899 {
900 const PBPropertyValue* pFoundProperty =
GetProperty( a_szName );
901
902 if ( pFoundProperty && pFoundProperty->
GetType() == PBPropertiesTypeCast<T>::type )
903 {
905 a_rOutValue = pFoundProperty->
GetFloat();
911 a_rOutValue = pFoundProperty->
GetUINT32();
913 a_rOutValue = pFoundProperty->
GetString();
914 else
915 {
916 void* rawValue = pFoundProperty->
GetRaw();
917 a_rOutValue = *(T*)( &rawValue );
918 }
919
921 }
922
924 }
TUINT32 GetUINT32() const
const TCHAR * GetString() const
const PBPropertyValue * GetProperty(const TCHAR *a_szName) const
◆ GetParentProperties()
const PBProperties * PBProperties::GetParentProperties |
( |
| ) |
const |
|
inline |
◆ GetProperty()
Definition at line 884 of file PBProperties.h.
885 {
886 for (
TSIZE i = 0; i < m_iCount; i++ )
887 {
888 if ( m_pProperties[ i ].GetName() == a_szName )
889 {
890 return m_pProperties[ i ].GetValue();
891 }
892 }
893
895 }
◆ GetPropertyByIndex()
const PBProperty * PBProperties::GetPropertyByIndex |
( |
TSIZE | a_iIndex | ) |
const |
|
inline |
Definition at line 873 of file PBProperties.h.
874 {
875 TASSERT( m_iCount > a_iIndex );
876 return &m_pProperties[ a_iIndex ];
877 }
◆ GetPropertyCount()
TUINT32 PBProperties::GetPropertyCount |
( |
| ) |
const |
|
inline |
◆ GetPropertyValue()
Definition at line 879 of file PBProperties.h.
880 {
882 }
const PBProperty * GetPropertyByIndex(TSIZE a_iIndex) const
◆ PPropertiesWriter
◆ TRB_SECTION_NAME
const TCHAR* PBProperties::TRB_SECTION_NAME = "Main" |
|
staticconstexpr |
The documentation for this class was generated from the following file:
- D:/_dev/OpenBarnyard/Source/Toshi/Source/Plugins/PPropertyParser/PBProperties.h