Files
AAS_NewGeneration/src/database/Soundbank.kt
rdkartono 2fe4a46e3e commit 15/10/2025
Network monitoring beres
2025-10-15 12:14:57 +07:00

41 lines
967 B
Kotlin

package database
data class Soundbank(
var index: UInt,
var Description: String,
var TAG : String,
var Category: String,
var Language: String,
var VoiceType: String,
var Path: String,
){
/**
* Check if all fields are not empty
*/
fun isNotEmpty(): Boolean{
return Description.isNotEmpty() && TAG.isNotEmpty() && Category.isNotEmpty() && Language.isNotEmpty() && VoiceType.isNotEmpty() && Path.isNotEmpty()
}
/**
* Check if Category is valid
*/
fun ValidCategory() : Boolean{
return content.Category.entries.any{ it.name == this.Category}
}
/**
* Check if VoiceType is valid
*/
fun ValidVoiceType() : Boolean{
return content.VoiceType.entries.any{ it.name == this.VoiceType}
}
/**
* Check if Language is valid
*/
fun ValidLanguage() : Boolean{
return content.Language.entries.any{ it.name == this.Language}
}
}