#include <packageinfo.h>
Inheritance diagram for wxPackageInfo:
Public Member Functions | |
wxPackageInfo () | |
Default constructor. | |
virtual | ~wxPackageInfo () |
Default destructor. | |
bool | HasSameIdOf (const wxPackageInfo &pkg) const |
wxString | GetDescription () const |
wxArrayString | GetKeywords () const |
wxString | GetKeywordsStr () const |
wxString | GetWebsite () const |
wxDateTime | GetCreationDate () const |
wxPackageCategory | GetPrimaryCategory () const |
wxPackageCategory | GetSecondaryCategory () const |
wxString | GetPrimaryCategoryStr () const |
wxString | GetSecondaryCategoryStr () const |
wxString | GetRelativeRoot () const |
wxString | GetOutputFileName () const |
wxArrayString | GetExcluded (wxPackageExcludeMode type) const |
wxPackageCompressionMode | GetCompressionMode () const |
wxString | GetCompressionModeStr () const |
wxString | GetUploadDestination () const |
wxString | GetProjectFolder (const wxString &wxppath) const |
wxPackageBuildSystemType | GetBuildSystemType () const |
wxPackageDevelopmentStatus | GetDevelopmentStatus () const |
wxPackageProgLanguage | GetProgLanguage () const |
wxString | GetBuildSystemTypeStr () const |
wxString | GetDevelopmentStatusStr () const |
wxString | GetProgLanguageStr () const |
wxString | GetRSSHref () const |
wxArrayString | GetDownloadHref () const |
wxString | GetDownloadHref (size_t n) const |
wxString | GetRepoDownloadLink () const |
wxString | GetDownloadLink () const |
wxPackageDataWithRef | GetLogoRef () const |
wxPackageDataWithRefArray | GetDocumentation () const |
wxPackageDataWithRef | GetDocumentation (size_t n) const |
wxPackageDataWithRefArray | GetScreenshots () const |
wxPackageDataWithRef | GetScreenshot (size_t n) const |
size_t | GetNumberOfSamples () const |
wxULongLong | GetCompressedSize () const |
wxString | GetMD5 () const |
wxPackageDataWithRef | GetLicenseRef () const |
wxString | GetLicenseTypeStr () const |
wxPackageLicenseType | GetLicenseType () const |
wxString | GetOrganization () const |
wxString | GetOrganizationHref () const |
wxString | GetCost () const |
wxArrayString | GetAuthors () const |
wxArrayString | GetAuthorsHref () const |
wxArrayString | GetMaintainers () const |
wxArrayString | GetMaintainersHref () const |
wxString | GetCredits () const |
wxString | GetCopyright () const |
long | GetSupportedPortFlag () const |
long | GetTestedPortFlag () const |
wxArrayInt | GetSupportedPorts () const |
wxArrayInt | GetTestedPorts () const |
wxVersionRangeArray | GetSupportedVersions () const |
wxVersionRangeArray | GetTestedVersions () const |
wxPackageDependencyArray | GetDependencies () const |
bool | SupportsWxPort (wxPortId p, const wxVersion &ver) const |
bool | HasSameSupportedPortVersions () const |
bool | HasSameTestedPortVersions () const |
wxPackageCommandArray & | GetCmdForStage (wxPackageBuildSystemStage stage) |
const wxPackageCommandArray & | GetCmdForStage (wxPackageBuildSystemStage stage) const |
wxPackageCommandOptionArray & | GetBuildSysOptions () |
const wxPackageCommandOptionArray & | GetBuildSysOptions () const |
long | GetSupportedBuildSysFormats () const |
wxString | GetBuildSystemHref () const |
wxPackageCommandArray | GetSubstCmdForStage (wxPackageBuildSystemStage stage, long flags, const wxPackageCondition &cond=wxEmptyPackageCondition) const |
wxPackageCommandOptionArray | GetSubstBuildSysOptions () const |
bool | SupportsBuildSysFormat (wxPackageCompilerFormat fmt) const |
Returns true if this package supports the given compiler format. | |
wxArrayString | GetUsedOptionPresets () const |
wxString | GetUsedCommandPreset (wxStringHashMap &h) const |
void | SetDescription (const wxString &str) |
void | SetKeywords (const wxString &str) |
void | SetKeywords (const wxArrayString &arr) |
void | SetWebsite (const wxString &str) |
void | SetCreationDate (const wxDateTime &date) |
void | SetCreationDate (const wxString &str) |
void | SetCategories (wxPackageCategory primary, wxPackageCategory secondary) |
void | SetPrimaryCategoryStr (const wxString &str) |
void | SetSecondaryCategoryStr (const wxString &str) |
void | SetRoot (const wxString &root) |
void | SetFileName (const wxString &filename) |
void | SetExcluded (wxPackageExcludeMode mode, const wxArrayString &arr) |
void | SetCompressionMode (wxPackageCompressionMode mode) |
void | SetCompressModeStr (const wxString &str) |
void | SetUploadDestination (const wxString &str) |
void | SetLicenseRef (const wxPackageDataWithRef &ref) |
void | SetLicenseType (wxPackageLicenseType t) |
void | SetLicenseTypeStr (const wxString &str) |
void | SetOrganization (const wxString &str, const wxString &href) |
void | SetCost (const wxString &str) |
void | SetCredits (const wxString &str) |
void | SetCopyright (const wxString &str) |
void | SetAuthors (const wxArrayString &name, const wxArrayString &href) |
void | AddAuthor (const wxString &name, const wxString &href) |
void | SetMaintainers (const wxArrayString &name, const wxArrayString &href) |
void | AddMaintainer (const wxString &name, const wxString &href) |
void | SetDevelopmentStatus (wxPackageDevelopmentStatus t) |
void | SetDevelopmentStatusStr (const wxString &str) |
void | SetProgLanguage (wxPackageProgLanguage t) |
void | SetProgLanguageStr (const wxString &str) |
void | SetRSSHref (const wxString &str) |
void | AddMirror (const wxString &href) |
void | SetRepoDownloadLink (const wxString &href) |
void | AddDoc (const wxPackageDataWithRef &ref) |
void | AddDoc (const wxString &type, const wxString &href, const wxString &localref) |
void | AddScreenshot (const wxPackageDataWithRef &ref) |
void | AddScreenshot (const wxString &href, const wxString &localref) |
void | SetLogoRef (const wxPackageDataWithRef &ref) |
void | SetLogo (const wxString &href, const wxString &localref) |
void | SetNumberOfSamples (size_t n) |
void | SetCompressedSize (wxULongLong n) |
void | SetMD5 (const wxString &md5) |
void | AddSupportedPort (wxPortId port, const wxVersionRange &version) |
void | AddTestedPort (wxPortId port, const wxVersionRange &version) |
void | AddSupportedPort (const wxString &port, const wxVersionRange &version) |
void | AddTestedPort (const wxString &port, const wxVersionRange &version) |
void | SetSupportedPorts (const wxArrayInt &port, const wxVersionRangeArray &version) |
void | SetTestedPorts (const wxArrayInt &port, const wxVersionRangeArray &version) |
void | AddDependency (const wxPackageDependency &toadd) |
void | SetDependencies (const wxPackageDependencyArray &arr) |
void | AddBuildSysOption (const wxPackageCommandOption &opt) |
void | AddBuildSysOptions (const wxPackageCommandOptionArray &arr) |
void | AddBuildSysCommand (long stages, const wxPackageCommand &cmd) |
void | AddBuildSysCommands (const wxPackageCommandArray &arr) |
void | SetBuildSysOptions (const wxPackageCommandOptionArray &arr) |
void | SetBuildSysCommands (wxPackageBuildSystemStage stage, const wxPackageCommandArray &arr) |
void | SetBuildSysHref (const wxString &href) |
void | SetBuildSystemType (wxPackageBuildSystemType t) |
void | SetBuildSystemTypeStr (const wxString &str) |
void | SetSupportedFormats (long n) |
bool | IsOk () const |
virtual wxString | SubstituteInfo (const wxString &str, wxPackageSubstituteInfoContext ctx=wxPSIC_WXHTML) const |
void | UpdateSubstitutionHashMap (wxPackageSubstituteInfoContext ctx=wxPSIC_INVALID) |
wxStringHashMap | GetSubstitutionHashMap (wxPackageSubstituteInfoContext ctx) const |
Returns the substitution hashmap for the given context. | |
bool | IsCachedSubstitutionHashMapValid (wxPackageSubstituteInfoContext ctx) const |
void | InvalidateCachedSubstHashMap (wxPackageSubstituteInfoContext ctx=wxPSIC_INVALID) |
Static Public Member Functions | |
static bool | LoadStandardOutputFormats (const wxString &dirbase) |
Loads the standard output formats of wxPackage API. | |
static wxStringHashMap | GetStandardSubstitutionHashMap () |
static wxString | SubstituteStandard (const wxString &str) |
Static Public Attributes | |
static wxPackageHTMLOutputFormatHashMap | s_hashmapHTMLFormats |
static wxStringHashMap | s_hashmapKeywords |
Protected Member Functions | |
virtual void | DoUpdateSubstitutionHashMap (wxPackageSubstituteInfoContext ctx) |
See UpdateSubstitutionHashMap for more info. | |
virtual wxPackageCommand | GetCmd (const wxPackageCommand &cmd, wxPackageBuildSystemStage stage, long flags, const wxPackageCondition &cond) const |
Protected Attributes | |
wxArrayString | m_arrKeywords |
wxString | m_strDescription |
wxString | m_strWebsite |
wxDateTime | m_creationDate |
wxPackageCategory | m_catPrimary |
wxPackageCategory | m_catSecondary |
wxString | m_strRoot |
wxString | m_strFileName |
wxString | m_strUpload |
wxArrayString | m_arrExcluded [wxPEM_MAX] |
wxPackageCompressionMode | m_compressMode |
wxPackageDataWithRef | m_refLicense |
wxPackageLicenseType | m_nLicenseType |
wxString | m_strOrganization |
wxString | m_strOrganizationHref |
wxString | m_strCost |
wxArrayString | m_arrAuthorName |
wxArrayString | m_arrAuthorHref |
wxArrayString | m_arrMaintainerName |
wxArrayString | m_arrMaintainerHref |
wxString | m_strCredits |
wxString | m_strCopyright |
wxPackageDevelopmentStatus | m_devStatus |
wxPackageProgLanguage | m_language |
wxString | m_strRSSHref |
wxArrayString | m_arrDownloadHref |
wxString | m_strDownloadFromRepoHref |
wxPackageDataWithRef | m_refLogo |
wxPackageDataWithRefArray | m_arrDocumentation |
wxPackageDataWithRefArray | m_arrScreenshots |
size_t | m_nSamples |
wxULongLong | m_nCompressedSize |
wxString | m_strMD5 |
wxVersionRangeArray | m_arrSupportedVersion |
wxVersionRangeArray | m_arrTestedVersion |
wxArrayInt | m_arrSupportedPort |
wxArrayInt | m_arrTestedPort |
wxPackageDependencyArray | m_arrDependencies |
wxPackageBuildSystemType | m_buildSystemType |
The build system supported by this package. | |
wxString | m_strBuildSystemHref |
long | m_nSupportedFormats |
wxPackageCommandOptionArray | m_opt |
The options for the build system stages of this package. | |
wxPackageCommandArray | m_arrCommands [wxPBSS_MAX] |
wxStringHashMap | m_hashmapSubstitution [wxPSIC_MAX] |
Friends | |
class | wxPackageArray |
Definition at line 162 of file packageinfo.h.
wxPackageCommandArray wxPackageInfo::GetSubstCmdForStage | ( | wxPackageBuildSystemStage | stage, | |
long | flags, | |||
const wxPackageCondition & | cond = wxEmptyPackageCondition | |||
) | const |
Returns the array of commands for the given stage. The wxPKGCMD_* flags define which operations should be done on the array before returning it.
Definition at line 274 of file packageinfo.cpp.
References wxPackageCommandArray::CopyTargets(), GetCmd(), wxPackageCommandArray::GetSubstitutedCmd(), and m_arrCommands.
Referenced by wxExtCmdProgressPanel::UpdateCachedCommands(), and wxExtCmdOptionsPanel::UpdateCommands().
wxPackageCommandOptionArray wxPackageInfo::GetSubstBuildSysOptions | ( | ) | const |
Returns the array of options for this package with the default and the selected values substituted.
Definition at line 297 of file packageinfo.cpp.
References wxPackageCommandOptionArray::Add(), wxPackageCommandOptionArray::GetDescription(), m_opt, wxPackageCommandOptionArray::SetDescription(), and SubstituteInfo().
Referenced by wxExtCmdOptionsPanel::SelectWxBuild(), and wxExtCmdOptionsPanel::SetPackage().
wxArrayString wxPackageInfo::GetUsedOptionPresets | ( | ) | const |
Returns the names of the option presets used by this package or an empty array if no option presets are used.
Definition at line 368 of file packageinfo.cpp.
References wxPackageCommandOptionArray::Contains(), m_opt, and wxPresetXMLDescriptor::s_hashmapOptions.
Referenced by wxPackageXMLDescriptor::SetPackageInfo().
wxString wxPackageInfo::GetUsedCommandPreset | ( | wxStringHashMap & | h | ) | const |
Returns the name (multiple command presets are not supported) of the command preset used by this package or wxEmptyString if no command presets are in use. When returning a non-empty string, the given hashmap is filled with the names & values of the command presets' variables used by this package.
Definition at line 386 of file packageinfo.cpp.
References m_arrCommands, and wxPresetXMLDescriptor::s_hashmapCommands.
Referenced by wxPackageXMLDescriptor::SetPackageInfo().
wxString wxPackageInfo::SubstituteInfo | ( | const wxString & | str, | |
wxPackageSubstituteInfoContext | ctx = wxPSIC_WXHTML | |||
) | const [virtual] |
Substitutes various keywords (e.g. , , etc) in the given string and then returns it. Note that to be sure the substituted infos are up2date with package's info, you need to call the (time-consuming) UpdateSubstitutionHashMap function first.
Definition at line 573 of file packageinfo.cpp.
References IsCachedSubstitutionHashMapValid(), and m_hashmapSubstitution.
Referenced by wxPackage::Compress(), wxPackage::GetCmd(), wxPackageHTMLOutputFormat::GetDetailsFor(), GetDownloadHref(), GetDownloadLink(), GetRepoDownloadLink(), GetSubstBuildSysOptions(), and wxPackageHTMLOutputFormat::GetSummaryFor().
void wxPackageInfo::UpdateSubstitutionHashMap | ( | wxPackageSubstituteInfoContext | ctx = wxPSIC_INVALID |
) |
Rebuilds the m_hashmapSubstitution hash tables will all infos to substitute for the given context. Rebuilds all tables if wxPSIC_INVALID is given.
Definition at line 598 of file packageinfo.cpp.
References DoUpdateSubstitutionHashMap(), and m_hashmapSubstitution.
bool wxPackageInfo::IsCachedSubstitutionHashMapValid | ( | wxPackageSubstituteInfoContext | ctx | ) | const [inline] |
Returns true if the substitution hashmap is updated with all current values of the info stored in this wxPackageInfo object:
Definition at line 621 of file packageinfo.h.
References m_hashmapSubstitution.
Referenced by SubstituteInfo().
void wxPackageInfo::InvalidateCachedSubstHashMap | ( | wxPackageSubstituteInfoContext | ctx = wxPSIC_INVALID |
) |
Invalidates the substitution hashmap cache forcing an update on the next call to SubstituteInfo. Invalidates all hashmaps if wxPSIC_INVALID is given.
Definition at line 586 of file packageinfo.cpp.
References m_hashmapSubstitution.
Referenced by wxExtCmdOptionsPanel::UpdateCommands().
wxStringHashMap wxPackageInfo::GetStandardSubstitutionHashMap | ( | ) | [static] |
Returns the standard substitution hashmap: i.e. the s_hashmapKeywords hashmap merged with some standard constant keys.
Definition at line 788 of file packageinfo.cpp.
References s_hashmapKeywords.
Referenced by DoUpdateSubstitutionHashMap(), and SubstituteStandard().
static wxString wxPackageInfo::SubstituteStandard | ( | const wxString & | str | ) | [inline, static] |
Returns the given string with some standard strings (e.g. , etc) substituted by their constant values.
Definition at line 641 of file packageinfo.h.
References GetStandardSubstitutionHashMap().
wxPackageCommand wxPackageInfo::GetCmd | ( | const wxPackageCommand & | cmd, | |
wxPackageBuildSystemStage | stage, | |||
long | flags, | |||
const wxPackageCondition & | cond | |||
) | const [protected, virtual] |
Uses the current option values and the given stage to substitute variables inside the given wxPackageCommand and then returns it.
Reimplemented in wxPackage.
Definition at line 322 of file packageinfo.cpp.
References wxPackageCommand::GetCommand(), wxPackageCommandOptionArray::GetSubstitutionOptionsHashMap(), m_opt, and wxPackageCommand::SetCommand().
Referenced by wxPackage::GetCmd(), and GetSubstCmdForStage().
wxStringHashMap wxPackageInfo::s_hashmapKeywords [static] |
A static, i.e. global, set of keywords and relative values which are substituted by SubstituteStandard.
Definition at line 633 of file packageinfo.h.
Referenced by GetStandardSubstitutionHashMap().
wxString wxPackageInfo::m_strBuildSystemHref [protected] |
The local reference to the build system's main file of this package. This is a localref to a .bkl file for Bakefile, to a CMakeLists.txt for CMake and to an SConstruct file for Scons. NOTE: this info is (at least currently) unused by wxWPM tools but it may still be useful to have it for e.g. other tools which want/need to parse WXP files.
Definition at line 746 of file packageinfo.h.
Referenced by GetBuildSystemHref(), and SetBuildSysHref().
long wxPackageInfo::m_nSupportedFormats [protected] |
The wxPackageCompilerFormats supported by this package for the build system m_buildSystemType.
Definition at line 750 of file packageinfo.h.
Referenced by GetSupportedBuildSysFormats(), SetSupportedFormats(), SupportsBuildSysFormat(), and wxPackageInfo().
wxPackageCommandArray wxPackageInfo::m_arrCommands[wxPBSS_MAX] [protected] |
The array of commands for the various stages of this package. Each command is associated with a wxPackageCondition which specifies to which stage it applies and for which format, etc.
Definition at line 758 of file packageinfo.h.
Referenced by AddBuildSysCommand(), GetCmdForStage(), GetSubstCmdForStage(), GetUsedCommandPreset(), IsOk(), and SetBuildSysCommands().
wxStringHashMap wxPackageInfo::m_hashmapSubstitution[wxPSIC_MAX] [protected] |
The hashmap containing the keys & relative values for substitution. See UpdateSubstitutionHashMap for more info.
Definition at line 764 of file packageinfo.h.
Referenced by DoUpdateSubstitutionHashMap(), wxPackage::DoUpdateSubstitutionHashMap(), GetSubstitutionHashMap(), InvalidateCachedSubstHashMap(), IsCachedSubstitutionHashMapValid(), SubstituteInfo(), and UpdateSubstitutionHashMap().