34 for(
unsigned idx = 0; idx <
m_tbTexts.GetCount(); idx++ )
45 aFormatter->
Print( aNestLevel,
"(title_block\n" );
48 aFormatter->
Print( aNestLevel+1,
"(title %s)\n",
52 aFormatter->
Print( aNestLevel+1,
"(date %s)\n",
56 aFormatter->
Print( aNestLevel+1,
"(rev %s)\n",
60 aFormatter->
Print( aNestLevel+1,
"(company %s)\n",
63 for(
int ii = 0; ii < 9; ii++ )
66 aFormatter->
Print( aNestLevel+1,
"(comment %d %s)\n", ii+1,
70 aFormatter->
Print( aNestLevel,
")\n\n" );
78 aVars->push_back( wxT(
"ISSUE_DATE" ) );
79 aVars->push_back( wxT(
"CURRENT_DATE" ) );
80 aVars->push_back( wxT(
"REVISION" ) );
81 aVars->push_back( wxT(
"TITLE" ) );
82 aVars->push_back( wxT(
"COMPANY" ) );
83 aVars->push_back( wxT(
"COMMENT1" ) );
84 aVars->push_back( wxT(
"COMMENT2" ) );
85 aVars->push_back( wxT(
"COMMENT3" ) );
86 aVars->push_back( wxT(
"COMMENT4" ) );
87 aVars->push_back( wxT(
"COMMENT5" ) );
88 aVars->push_back( wxT(
"COMMENT6" ) );
89 aVars->push_back( wxT(
"COMMENT7" ) );
90 aVars->push_back( wxT(
"COMMENT8" ) );
91 aVars->push_back( wxT(
"COMMENT9" ) );
98 bool tokenUpdated =
false;
99 wxString originalToken = *aToken;
101 auto getCurrentDate =
110 return wxDateTime::Now().FormatISODate();
113 if( aToken->IsSameAs( wxT(
"ISSUE_DATE" ) ) )
118 else if( aToken->IsSameAs( wxT(
"CURRENT_DATE" ) ) )
120 *aToken = getCurrentDate();
123 else if( aToken->IsSameAs( wxT(
"REVISION" ) ) )
128 else if( aToken->IsSameAs( wxT(
"TITLE" ) ) )
133 else if( aToken->IsSameAs( wxT(
"COMPANY" ) ) )
138 else if( aToken->Left( aToken->Len() - 1 ).IsSameAs( wxT(
"COMMENT" ) ) )
140 wxChar c = aToken->Last();
160 if( aToken->IsSameAs( wxT(
"CURRENT_DATE" ) ) )
161 *aToken = getCurrentDate();
166 if( *aToken == wxT(
"${" ) + originalToken + wxT(
"}" ) )
Container for project specific data.
const wxString & GetCompany() const
bool TextVarResolver(wxString *aToken, const PROJECT *aProject) const
virtual void Format(OUTPUTFORMATTER *aFormatter, int aNestLevel, int aControlBits) const
Output the object to aFormatter in s-expression form.
const wxString & GetRevision() const
const wxString & GetDate() const
const wxString & GetComment(int aIdx) const
const wxString & GetTitle() const
static void GetContextualTextVars(wxArrayString *aVars)
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject)
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.