SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
toolpp::FGD Class Reference

#include <FGD.h>

Collaboration diagram for toolpp::FGD:

Classes

struct  Entity
struct  AutoVisGroup

Public Member Functions

 FGD ()=default
 FGD (const std::filesystem::path &fgdPath)
void load (const std::filesystem::path &fgdPath)
 Can be called multiple times in succession to load multiple FGD files.
int getVersion () const
sourcepp::math::Vec2i getMapSize () const
const std::unordered_map< std::string_view, Entity > & getEntities () const
const std::vector< std::string_view > & getMaterialExclusionDirs () const
const std::vector< AutoVisGroup > & getAutoVisGroups () const

Protected Member Functions

void readEntities (BufferStreamReadOnly &stream, const std::filesystem::path &path, std::vector< std::filesystem::path > &seenPaths)

Protected Attributes

std::list< std::string > backingData
int version = 0
sourcepp::math::Vec2i mapSize {}
std::unordered_map< std::string_view, Entityentities
std::vector< std::string_view > materialExclusionDirs
std::vector< AutoVisGroupautoVisGroups

Detailed Description

Definition at line 16 of file FGD.h.

Constructor & Destructor Documentation

◆ FGD() [1/2]

toolpp::FGD::FGD ( )
default

◆ FGD() [2/2]

FGD::FGD ( const std::filesystem::path & fgdPath)
explicit

Definition at line 511 of file FGD.cpp.

Member Function Documentation

◆ getAutoVisGroups()

const std::vector< FGD::AutoVisGroup > & FGD::getAutoVisGroups ( ) const
nodiscard

Definition at line 544 of file FGD.cpp.

◆ getEntities()

const std::unordered_map< std::string_view, FGD::Entity > & FGD::getEntities ( ) const
nodiscard

Definition at line 536 of file FGD.cpp.

◆ getMapSize()

math::Vec2i FGD::getMapSize ( ) const
nodiscard

Definition at line 532 of file FGD.cpp.

◆ getMaterialExclusionDirs()

const std::vector< std::string_view > & FGD::getMaterialExclusionDirs ( ) const
nodiscard

Definition at line 540 of file FGD.cpp.

◆ getVersion()

int FGD::getVersion ( ) const
nodiscard

Definition at line 528 of file FGD.cpp.

◆ load()

void FGD::load ( const std::filesystem::path & fgdPath)

Can be called multiple times in succession to load multiple FGD files.

The FGD file data will be merged with previously loaded data.

Parameters
fgdPathThe path to the FGD to load

Definition at line 515 of file FGD.cpp.

◆ readEntities()

void FGD::readEntities ( BufferStreamReadOnly & stream,
const std::filesystem::path & path,
std::vector< std::filesystem::path > & seenPaths )
protected

Definition at line 549 of file FGD.cpp.

Member Data Documentation

◆ autoVisGroups

std::vector<AutoVisGroup> toolpp::FGD::autoVisGroups
protected

Definition at line 120 of file FGD.h.

◆ backingData

std::list<std::string> toolpp::FGD::backingData
protected

Definition at line 114 of file FGD.h.

◆ entities

std::unordered_map<std::string_view, Entity> toolpp::FGD::entities
protected

Definition at line 118 of file FGD.h.

◆ mapSize

sourcepp::math::Vec2i toolpp::FGD::mapSize {}
protected

Definition at line 117 of file FGD.h.

◆ materialExclusionDirs

std::vector<std::string_view> toolpp::FGD::materialExclusionDirs
protected

Definition at line 119 of file FGD.h.

◆ version

int toolpp::FGD::version = 0
protected

Definition at line 116 of file FGD.h.


The documentation for this class was generated from the following files: