| 1 | /* melder_app.cpp |
| 2 | * |
| 3 | * Copyright (C) 2024,2025 Paul Boersma |
| 4 | * |
| 5 | * This code is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 3 of the License, or (at |
| 8 | * your option) any later version. |
| 9 | * |
| 10 | * This code is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 13 | * See the GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this work. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #include "melder.h"cxx . . $ `<file>/melder/melder.h`/ |
| 20 | |
| 21 | static autostring32cxx . . $ autostring32# theUpperCaseAppNamecxx . . $ theUpperCaseAppName., theLowerCaseAppNamecxx . . $ theLowerCaseAppName.; |
| 22 | void Melder_setAppNamecxx . . $ Melder_setAppName(ff00d524ab0355ec). (conststring32cxx . . $ conststring32# appName) { |
| 23 | theUpperCaseAppNamecxx . . $ theUpperCaseAppName. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). upperCamelCase_STRcxx . . $ upperCamelCase_STR(87bf156b1f548402). (appName); |
| 24 | theLowerCaseAppNamecxx . . $ theLowerCaseAppName. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). lowerSnakeCase_STRcxx . . $ lowerSnakeCase_STR(87bf156b1f548402). (appName); |
| 25 | } |
| 26 | conststring32cxx . . $ conststring32# Melder_upperCaseAppNamecxx . . $ Melder_upperCaseAppName(1912f6684645c851).() { |
| 27 | return theUpperCaseAppNamecxx . . $ theUpperCaseAppName..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); |
| 28 | } |
| 29 | conststring32cxx . . $ conststring32# Melder_lowerCaseAppNamecxx . . $ Melder_lowerCaseAppName(1912f6684645c851).() { |
| 30 | return theLowerCaseAppNamecxx . . $ theLowerCaseAppName..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); |
| 31 | } |
| 32 | |
| 33 | static autostring32cxx . . $ autostring32# theAppVersionTextcxx . . $ theAppVersionText.; |
| 34 | static integercxx . . $ integer# theAppVersionNumbercxx . . $ theAppVersionNumber.; |
| 35 | void Melder_setAppVersioncxx . . $ Melder_setAppVersion(940f97f64241106a). (conststring32cxx . . $ conststring32# versionText, integercxx . . $ integer# versionNumber) { |
| 36 | theAppVersionTextcxx . . $ theAppVersionText. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (versionText); |
| 37 | theAppVersionNumbercxx . . $ theAppVersionNumber. = versionNumber; |
| 38 | } |
| 39 | conststring32cxx . . $ conststring32# Melder_appVersionSTRcxx . . $ Melder_appVersionSTR(1912f6684645c851).() { |
| 40 | return theAppVersionTextcxx . . $ theAppVersionText..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); |
| 41 | } |
| 42 | integercxx . . $ integer# Melder_appVersioncxx . . $ Melder_appVersion(da6335ded91d79c2).() { |
| 43 | return theAppVersionNumbercxx . . $ theAppVersionNumber.; |
| 44 | } |
| 45 | |
| 46 | static integercxx . . $ integer# theAppYearcxx . . $ theAppYear., theAppMonthcxx . . $ theAppMonth., theAppDaycxx . . $ theAppDay.; |
| 47 | void Melder_setAppDatecxx . . $ Melder_setAppDate(1accef8d191cd3cf). (integercxx . . $ integer# year, integercxx . . $ integer# month, integercxx . . $ integer# day) { |
| 48 | theAppYearcxx . . $ theAppYear. = year; |
| 49 | theAppMonthcxx . . $ theAppMonth. = month; |
| 50 | theAppDaycxx . . $ theAppDay. = day; |
| 51 | } |
| 52 | integercxx . . $ integer# Melder_appYearcxx . . $ Melder_appYear(da6335ded91d79c2).() { |
| 53 | return theAppYearcxx . . $ theAppYear.; |
| 54 | } |
| 55 | integercxx . . $ integer# Melder_appMonthcxx . . $ Melder_appMonth(da6335ded91d79c2).() { |
| 56 | return theAppMonthcxx . . $ theAppMonth.; |
| 57 | } |
| 58 | conststring32cxx . . $ conststring32# Melder_appMonthSTRcxx . . $ Melder_appMonthSTR(1912f6684645c851).() { |
| 59 | static conststring32cxx . . $ conststring32# monthNames [12] = { |
| 60 | U"January", U"February", U"March", U"April", U"May", U"June", |
| 61 | U"July", U"August", U"September", U"October", U"November", U"December" |
| 62 | }; |
| 63 | Melder_assertcxx . . $ `melder/melder_assert.h:39:10`! (theAppMonth > 0 && theAppMonth <= 12); |
| 64 | return monthNames [theAppMonthcxx . . $ theAppMonth.-1]; |
| 65 | } |
| 66 | integercxx . . $ integer# Melder_appDaycxx . . $ Melder_appDay(da6335ded91d79c2).() { |
| 67 | return theAppDaycxx . . $ theAppDay.; |
| 68 | } |
| 69 | |
| 70 | static autostring32cxx . . $ autostring32# theAppContactAddresscxx . . $ theAppContactAddress.; |
| 71 | void Melder_setAppContactAddresscxx . . $ Melder_setAppContactAddress(cc7657622ff166ed). (conststring32cxx . . $ conststring32# firstPartOfEmailAddress, conststring32cxx . . $ conststring32# secondPartOfEmailAdress) { |
| 72 | theAppContactAddresscxx . . $ theAppContactAddress. =cxx . . $ _autostring#`operator=`(f562943cbc4bcf37). Melder_dupcxx . . $ Melder_dup(87bf156b1f548402). (Melder_catcxx . . $ Melder_cat(7fbf27f4d367f442). (firstPartOfEmailAddress, U"@", secondPartOfEmailAdress)); |
| 73 | } |
| 74 | conststring32cxx . . $ conststring32# Melder_appContactAddresscxx . . $ Melder_appContactAddress(1912f6684645c851).() { |
| 75 | return theAppContactAddresscxx . . $ theAppContactAddress..getcxx . . $ _autostring#get(5a2a78a048fb49a8).(); |
| 76 | } |
| 77 | |
| 78 | /* End of file melder_app.cpp */ |