Fission FSN
Loading...
Searching...
No Matches
fsCNameComponent.h
Go to the documentation of this file.
1/********************************************************************
2*
3* Created: 8/4/2014 14:59
4*
5* File: fsCNameComponent.h
6*
7* Author: Mick Waites
8*
9* Purpose: Calculates and stores information about a HOG entity
10* based on the name of the entity.
11*
12*********************************************************************/
13
14#ifndef fsCNameComponenthdr
15#define fsCNameComponenthdr
16
18
20
21
23{
24 friend class fsCComponentFactory;
25
26public:
27
28 static fsCNameComponent* get(const fsCEntity* pEntity);
29 static fsCNameComponent* get(const fsIComponent* pComponent);
30
31 static fsStr localisedNameCalculate(const fsStr& pLayerName);
32 static fsStr nameSansSuffixCalculate(const fsStr& pLayerName);
33 static fsStr nameSansPrefixCalculate(const fsStr& pLayerName);
34
35 const fsStr& nameSansSuffixGet() const;
36 const fsStr& nameSansPrefixGet() const;
37 const fsStr& localisedNameGet() const;
38
39 static const fsChar mHiddenPrefix;
40 static const fsChar mVisiblePrefix;
41 static const fsStr mTaskChar;
42 static const fsCUniqueId mTypeId;
43
44protected:
45
46 static fsIComponent* create(fsCEntity* pParent);
47
49 virtual ~fsCNameComponent();
50
54
55private:
56
57 void initialise();
58
59 static void localisedNameCalculate(const fsStr& pFullName, const fsStr& pStrippedName, fsStr& pLocalisedName);
60};
61
62#endif
Definition fsCEntity.h:39
fsCNameComponent(fsCEntity *pParent)
Definition fsCNameComponent.cpp:124
const fsStr & localisedNameGet() const
Definition fsCNameComponent.cpp:39
static const fsChar mHiddenPrefix
Definition fsCNameComponent.h:39
friend class fsCComponentFactory
Definition fsCNameComponent.h:24
static fsCNameComponent * get(const fsCEntity *pEntity)
Definition fsCNameComponent.cpp:16
const fsStr & nameSansSuffixGet() const
Definition fsCNameComponent.cpp:29
static fsStr nameSansPrefixCalculate(const fsStr &pLayerName)
Definition fsCNameComponent.cpp:82
virtual ~fsCNameComponent()
Definition fsCNameComponent.cpp:129
static const fsChar mVisiblePrefix
Definition fsCNameComponent.h:40
static fsStr localisedNameCalculate(const fsStr &pLayerName)
Definition fsCNameComponent.cpp:51
static const fsStr mTaskChar
Definition fsCNameComponent.h:41
fsStr mLocalisedName
Definition fsCNameComponent.h:53
static const fsCUniqueId mTypeId
Definition fsCNameComponent.h:42
static fsIComponent * create(fsCEntity *pParent)
Definition fsCNameComponent.cpp:117
fsStr mFullName
Definition fsCNameComponent.h:51
fsStr mStrippedName
Definition fsCNameComponent.h:52
const fsStr & nameSansPrefixGet() const
Definition fsCNameComponent.cpp:34
static fsStr nameSansSuffixCalculate(const fsStr &pLayerName)
Definition fsCNameComponent.cpp:61
Definition fsCUniqueId.h:21
void initialise()
Definition fsIComponent.cpp:51
fsIComponent(fsCEntity *pParent)
Definition fsIComponent.cpp:86
Definition fsStr.h:23
char fsChar
Definition fsBaseTypes.h:12