Added ability to separate words by underscore in generated names
This commit is contained in:
parent
366c4cd3ff
commit
6719b82077
|
@ -1,42 +1,24 @@
|
|||
a
|
||||
aa
|
||||
aaa
|
||||
aac
|
||||
aaliyah
|
||||
aaron
|
||||
ab
|
||||
aba
|
||||
abandon
|
||||
abandoned
|
||||
abatement
|
||||
abba
|
||||
abbey
|
||||
abbott
|
||||
abandoning
|
||||
abbreivate
|
||||
abbreviated
|
||||
abbreviation
|
||||
abbreviations
|
||||
abby
|
||||
abc
|
||||
abdominal
|
||||
abdul
|
||||
abe
|
||||
aberdeen
|
||||
abi
|
||||
abide
|
||||
abigail
|
||||
abilities
|
||||
ability
|
||||
abit
|
||||
able
|
||||
abn
|
||||
abnormal
|
||||
abnormalities
|
||||
aboard
|
||||
aboriginal
|
||||
abort
|
||||
aborted
|
||||
aborting
|
||||
abortion
|
||||
about
|
||||
above
|
||||
abraham
|
||||
abramoff
|
||||
abroad
|
||||
abs
|
||||
absence
|
||||
|
@ -48,29 +30,28 @@ absorbed
|
|||
absorbing
|
||||
absorption
|
||||
abstract
|
||||
abstracted
|
||||
abstracting
|
||||
abstraction
|
||||
abstracts
|
||||
absurd
|
||||
abt
|
||||
abu
|
||||
abundance
|
||||
abundant
|
||||
abundantly
|
||||
abuse
|
||||
abused
|
||||
abuses
|
||||
abusive
|
||||
ac
|
||||
aca
|
||||
acad
|
||||
academia
|
||||
academic
|
||||
academics
|
||||
academies
|
||||
academy
|
||||
acapulco
|
||||
acc
|
||||
accel
|
||||
accelerate
|
||||
accelerated
|
||||
accelerating
|
||||
acceleration
|
||||
accelerator
|
||||
accent
|
||||
|
@ -98,10 +79,13 @@ acclaim
|
|||
acclaimed
|
||||
accolades
|
||||
accommodate
|
||||
accommodates
|
||||
accommodating
|
||||
accommodation
|
||||
accommodations
|
||||
accomodation
|
||||
accompanied
|
||||
accompanies
|
||||
accompany
|
||||
accompanying
|
||||
accomplish
|
||||
|
@ -123,6 +107,7 @@ accounting
|
|||
accounts
|
||||
accreditation
|
||||
accredited
|
||||
accrue
|
||||
accrued
|
||||
acct
|
||||
accumulate
|
||||
|
@ -133,8 +118,6 @@ accurate
|
|||
accurately
|
||||
accused
|
||||
accustomed
|
||||
acdbentity
|
||||
acdbline
|
||||
ace
|
||||
acer
|
||||
aces
|
||||
|
@ -147,22 +130,18 @@ achieves
|
|||
achieving
|
||||
acid
|
||||
acids
|
||||
ack
|
||||
acknowledge
|
||||
acknowledged
|
||||
acknowledgement
|
||||
acknowledgements
|
||||
acknowledges
|
||||
acknowledging
|
||||
acknowledgments
|
||||
acl
|
||||
aclu
|
||||
acm
|
||||
acme
|
||||
acne
|
||||
acorn
|
||||
acoustic
|
||||
acoustics
|
||||
acp
|
||||
acquire
|
||||
acquired
|
||||
acquires
|
||||
|
@ -177,9 +156,7 @@ acronym
|
|||
acronyms
|
||||
across
|
||||
acrylic
|
||||
acs
|
||||
act
|
||||
acta
|
||||
acted
|
||||
acting
|
||||
action
|
||||
|
@ -189,38 +166,23 @@ activated
|
|||
activation
|
||||
active
|
||||
actively
|
||||
activex
|
||||
activism
|
||||
activist
|
||||
activists
|
||||
activities
|
||||
activity
|
||||
actor
|
||||
actors
|
||||
actress
|
||||
actresses
|
||||
acts
|
||||
actual
|
||||
actually
|
||||
actuarial
|
||||
acupuncture
|
||||
acura
|
||||
acute
|
||||
acxiom
|
||||
ad
|
||||
ada
|
||||
adam
|
||||
adams
|
||||
adapt
|
||||
adaptation
|
||||
adaptec
|
||||
adapted
|
||||
adapter
|
||||
adapters
|
||||
adaptive
|
||||
adaptor
|
||||
adaptors
|
||||
adc
|
||||
add
|
||||
added
|
||||
addendum
|
||||
|
@ -229,7 +191,6 @@ addicted
|
|||
addiction
|
||||
addictive
|
||||
adding
|
||||
addison
|
||||
addition
|
||||
additional
|
||||
additionally
|
||||
|
@ -242,19 +203,14 @@ addressed
|
|||
addresses
|
||||
addressing
|
||||
adds
|
||||
adelaide
|
||||
adequacy
|
||||
adequate
|
||||
adequately
|
||||
adhd
|
||||
adhere
|
||||
adherence
|
||||
adhesion
|
||||
adhesive
|
||||
adhesives
|
||||
adidas
|
||||
adipex
|
||||
adj
|
||||
adjacent
|
||||
adjoining
|
||||
adjourned
|
||||
|
@ -265,8 +221,6 @@ adjusted
|
|||
adjusting
|
||||
adjustment
|
||||
adjustments
|
||||
adler
|
||||
adm
|
||||
admin
|
||||
administer
|
||||
administered
|
||||
|
@ -291,13 +245,8 @@ adopted
|
|||
adopting
|
||||
adoption
|
||||
adorable
|
||||
adp
|
||||
adr
|
||||
adrenaline
|
||||
adrian
|
||||
ads
|
||||
adsense
|
||||
adsl
|
||||
adult
|
||||
adults
|
||||
adv
|
||||
|
@ -336,22 +285,13 @@ advisory
|
|||
advocacy
|
||||
advocate
|
||||
advocates
|
||||
adware
|
||||
ae
|
||||
aerial
|
||||
aero
|
||||
aerobic
|
||||
aerosmith
|
||||
aerosol
|
||||
aerospace
|
||||
aes
|
||||
aest
|
||||
aesthetic
|
||||
aesthetics
|
||||
af
|
||||
afb
|
||||
afc
|
||||
aff
|
||||
affair
|
||||
affairs
|
||||
affect
|
||||
|
@ -372,22 +312,12 @@ affirmed
|
|||
afford
|
||||
affordable
|
||||
afforded
|
||||
afghan
|
||||
afghanistan
|
||||
afl
|
||||
aforementioned
|
||||
afp
|
||||
afraid
|
||||
africa
|
||||
african
|
||||
afro
|
||||
aft
|
||||
after
|
||||
aftermarket
|
||||
aftermath
|
||||
afternoon
|
||||
afterwards
|
||||
ag
|
||||
again
|
||||
against
|
||||
age
|
||||
|
@ -408,28 +338,17 @@ aggressive
|
|||
agile
|
||||
agility
|
||||
aging
|
||||
agnes
|
||||
ago
|
||||
agp
|
||||
agree
|
||||
agreed
|
||||
agreeing
|
||||
agreement
|
||||
agreements
|
||||
agrees
|
||||
agri
|
||||
agricultural
|
||||
agriculture
|
||||
aguilera
|
||||
ah
|
||||
ahead
|
||||
ahmad
|
||||
ahmed
|
||||
ai
|
||||
aid
|
||||
aide
|
||||
aided
|
||||
aides
|
||||
aids
|
||||
aim
|
||||
aimed
|
||||
|
@ -440,106 +359,39 @@ airborne
|
|||
aircraft
|
||||
aired
|
||||
aires
|
||||
airfare
|
||||
airfares
|
||||
airline
|
||||
airlines
|
||||
airmail
|
||||
airplane
|
||||
airplanes
|
||||
airport
|
||||
airports
|
||||
airsoft
|
||||
airway
|
||||
airways
|
||||
aisle
|
||||
aix
|
||||
aj
|
||||
ajax
|
||||
ak
|
||||
aka
|
||||
akin
|
||||
akon
|
||||
akron
|
||||
al
|
||||
ala
|
||||
alabama
|
||||
aladdin
|
||||
alain
|
||||
alameda
|
||||
alamo
|
||||
alan
|
||||
alarm
|
||||
alarms
|
||||
alas
|
||||
alaska
|
||||
alaskan
|
||||
alba
|
||||
albania
|
||||
albanian
|
||||
albany
|
||||
albeit
|
||||
albert
|
||||
alberta
|
||||
alberto
|
||||
albion
|
||||
album
|
||||
albums
|
||||
albuquerque
|
||||
alcatel
|
||||
alchemy
|
||||
alcohol
|
||||
alcoholic
|
||||
alcoholism
|
||||
ale
|
||||
alec
|
||||
alert
|
||||
alerts
|
||||
alex
|
||||
alexa
|
||||
alexander
|
||||
alexandra
|
||||
alexandre
|
||||
alexandria
|
||||
alexis
|
||||
alfa
|
||||
alfred
|
||||
algae
|
||||
algebra
|
||||
algebraic
|
||||
algeria
|
||||
algorithm
|
||||
algorithms
|
||||
ali
|
||||
alias
|
||||
aliases
|
||||
alibaba
|
||||
alibris
|
||||
alicante
|
||||
alice
|
||||
alicia
|
||||
alien
|
||||
aliens
|
||||
alienware
|
||||
align
|
||||
aligned
|
||||
aligning
|
||||
alignment
|
||||
aligns
|
||||
alike
|
||||
alison
|
||||
alito
|
||||
alive
|
||||
alkaline
|
||||
all
|
||||
alla
|
||||
allah
|
||||
allan
|
||||
alle
|
||||
allegations
|
||||
alleged
|
||||
allegedly
|
||||
allegiance
|
||||
allegra
|
||||
allegro
|
||||
allen
|
||||
allergic
|
||||
allergies
|
||||
allergy
|
||||
|
@ -549,7 +401,6 @@ alliance
|
|||
alliances
|
||||
allied
|
||||
allies
|
||||
allison
|
||||
allocate
|
||||
allocated
|
||||
allocation
|
||||
|
@ -564,34 +415,23 @@ allows
|
|||
alloy
|
||||
alloys
|
||||
ally
|
||||
alma
|
||||
almanac
|
||||
almighty
|
||||
almond
|
||||
almost
|
||||
aloe
|
||||
aloha
|
||||
alone
|
||||
along
|
||||
alongside
|
||||
alot
|
||||
aloud
|
||||
alpha
|
||||
alphabet
|
||||
alphabetical
|
||||
alphabetically
|
||||
alpine
|
||||
alprazolam
|
||||
alps
|
||||
alr
|
||||
already
|
||||
alright
|
||||
als
|
||||
also
|
||||
alt
|
||||
alta
|
||||
altar
|
||||
altavista
|
||||
alter
|
||||
alteration
|
||||
alterations
|
||||
|
@ -602,62 +442,28 @@ alternating
|
|||
alternative
|
||||
alternatively
|
||||
alternatives
|
||||
although
|
||||
altitude
|
||||
alto
|
||||
altogether
|
||||
alton
|
||||
aluminium
|
||||
aluminum
|
||||
alumni
|
||||
alvin
|
||||
always
|
||||
alzheimer
|
||||
am
|
||||
ama
|
||||
amanda
|
||||
amarillo
|
||||
amateur
|
||||
amateurs
|
||||
amatuer
|
||||
amature
|
||||
amazed
|
||||
amazing
|
||||
amazingly
|
||||
amazon
|
||||
ambassador
|
||||
amber
|
||||
ambien
|
||||
ambient
|
||||
ambiguous
|
||||
ambition
|
||||
ambitious
|
||||
ambulance
|
||||
amc
|
||||
amd
|
||||
amelia
|
||||
amen
|
||||
amend
|
||||
amended
|
||||
amending
|
||||
amendment
|
||||
amendments
|
||||
amenities
|
||||
amer
|
||||
america
|
||||
american
|
||||
americana
|
||||
americans
|
||||
americas
|
||||
ames
|
||||
amethyst
|
||||
amex
|
||||
amg
|
||||
amherst
|
||||
ami
|
||||
amid
|
||||
amiga
|
||||
amino
|
||||
ammo
|
||||
ammonia
|
||||
ammunition
|
||||
|
@ -3534,6 +3340,7 @@ colonies
|
|||
colony
|
||||
color
|
||||
colorado
|
||||
coloration
|
||||
colored
|
||||
colorful
|
||||
coloring
|
||||
|
@ -20005,6 +19812,7 @@ zz
|
|||
7
|
||||
8
|
||||
9
|
||||
accel
|
||||
anim
|
||||
annihilate
|
||||
annihilator
|
||||
|
@ -20017,9 +19825,13 @@ collide
|
|||
collusion
|
||||
commando
|
||||
contraption
|
||||
dampen
|
||||
dampened
|
||||
dampening
|
||||
darkburst
|
||||
deactivate
|
||||
deactivated
|
||||
despawn
|
||||
diddy
|
||||
entangler
|
||||
fursuit
|
||||
|
@ -20035,6 +19847,7 @@ lightburst
|
|||
looped
|
||||
looping
|
||||
mech
|
||||
melee
|
||||
metaree
|
||||
metroid
|
||||
missle
|
||||
|
@ -20070,6 +19883,9 @@ trooper
|
|||
toad
|
||||
turret
|
||||
typedef
|
||||
undampen
|
||||
undampened
|
||||
undampening
|
||||
unsorted
|
||||
wasp
|
||||
wisp
|
|
@ -130,6 +130,11 @@ void CPropertyNameGenerator::Generate(const SPropertyNameGenerationParameters& r
|
|||
for (; RecalcIndex < WordCache.size(); RecalcIndex++)
|
||||
{
|
||||
int Index = WordCache[RecalcIndex].WordIndex;
|
||||
|
||||
// Add an underscore if needed
|
||||
if (RecalcIndex > 0 && rkParams.UseUnderscores)
|
||||
LastValidHash.Hash("_");
|
||||
|
||||
LastValidHash.Hash( *mWords[Index].Word );
|
||||
WordCache[RecalcIndex].Hash = LastValidHash;
|
||||
}
|
||||
|
@ -156,6 +161,12 @@ void CPropertyNameGenerator::Generate(const SPropertyNameGenerationParameters& r
|
|||
for (int WordIdx = 0; WordIdx < WordCache.size(); WordIdx++)
|
||||
{
|
||||
int Index = WordCache[WordIdx].WordIndex;
|
||||
|
||||
if (WordIdx > 0 && rkParams.UseUnderscores)
|
||||
{
|
||||
PropertyName.Name += "_";
|
||||
}
|
||||
|
||||
PropertyName.Name += mWords[Index].Word;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ struct SPropertyNameGenerationParameters
|
|||
/** List of valid type suffixes */
|
||||
std::vector<TString> TypeNames;
|
||||
|
||||
/** Whether to separate words with underscores */
|
||||
bool UseUnderscores;
|
||||
|
||||
/** Whether to print the output from the generation process to the log */
|
||||
bool PrintToLog;
|
||||
};
|
||||
|
|
|
@ -311,7 +311,7 @@ const char* HashablePropTypeName(EPropertyType Prop)
|
|||
case eBoolProperty: return "bool";
|
||||
case eLongProperty: return "int";
|
||||
case eEnumProperty: return "enum";
|
||||
case eBitfieldProperty: return "bitfield";
|
||||
case eBitfieldProperty: return "Flags";
|
||||
case eFloatProperty: return "float";
|
||||
case eStringProperty: return "string";
|
||||
case eColorProperty: return "Color";
|
||||
|
|
|
@ -100,6 +100,7 @@ void CGeneratePropertyNamesDialog::StartGeneration()
|
|||
Params.MaxWords = mpUI->NumWordsSpinBox->value();
|
||||
Params.Prefix = TO_TSTRING( mpUI->PrefixLineEdit->text() );
|
||||
Params.Suffix = TO_TSTRING( mpUI->SuffixLineEdit->text() );
|
||||
Params.UseUnderscores = mpUI->UseUnderscoresCheckBox->isChecked();
|
||||
Params.PrintToLog = mpUI->LogOutputCheckBox->isChecked();
|
||||
|
||||
// Run the task and configure ourselves so we can update correctly
|
||||
|
|
|
@ -68,6 +68,13 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="UseUnderscoresCheckBox">
|
||||
<property name="text">
|
||||
<string>Use underscores</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="LogOutputCheckBox">
|
||||
<property name="text">
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue