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  AutoVisGroup
 
struct  Entity
 

Public Member Functions

 FGD ()=default
 
 FGD (const std::string &fgdPath)
 
void load (const std::string &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::string &path, std::vector< std::string > &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 14 of file FGD.h.

Constructor & Destructor Documentation

◆ FGD() [1/2]

toolpp::FGD::FGD ( )
default

◆ FGD() [2/2]

FGD::FGD ( const std::string &  fgdPath)
explicit

Definition at line 502 of file FGD.cpp.

Member Function Documentation

◆ getAutoVisGroups()

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

Definition at line 536 of file FGD.cpp.

◆ getEntities()

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

Definition at line 528 of file FGD.cpp.

◆ getMapSize()

math::Vec2i FGD::getMapSize ( ) const

Definition at line 524 of file FGD.cpp.

◆ getMaterialExclusionDirs()

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

Definition at line 532 of file FGD.cpp.

◆ getVersion()

int FGD::getVersion ( ) const

Definition at line 520 of file FGD.cpp.

◆ load()

void FGD::load ( const std::string &  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 506 of file FGD.cpp.

◆ readEntities()

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

Definition at line 541 of file FGD.cpp.

Member Data Documentation

◆ autoVisGroups

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

Definition at line 118 of file FGD.h.

◆ backingData

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

Definition at line 112 of file FGD.h.

◆ entities

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

Definition at line 116 of file FGD.h.

◆ mapSize

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

Definition at line 115 of file FGD.h.

◆ materialExclusionDirs

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

Definition at line 117 of file FGD.h.

◆ version

int toolpp::FGD::version = 0
protected

Definition at line 114 of file FGD.h.


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