VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
DtSimulationObjectCategoryInformation Class Reference

The DtSimulationObjectCategoryInformation class is a class that will read the comma delimited category information file as well as provide access for adding, removing and saving informatiion.

Classes

struct  CategoryInformation
 

Public Types

typedef std::map< DtString,
CategoryInformation
Categories
 

Public Member Functions

 DtSimulationObjectCategoryInformation ()
 
 DtSimulationObjectCategoryInformation (const DtSimulationObjectCategoryInformation &)
 
virtual ~DtSimulationObjectCategoryInformation ()
 
virtual bool load (const DtFilename &, bool clear=false)
 
virtual void clear ()
 
virtual bool save (const DtFilename &)
 
virtual void addCategoryInformation (const DtString &, int rank=100, int topLevelTag=0, const DtString &iconFilename="", bool visible=true, const DtString &displayName="", bool organizeOnListView=false, const DtRwColor &color=DtRwColor())
 
virtual void addCategoryInformation (const DtString &, const CategoryInformation &cat)
 
virtual void removeCategoryInformation (const DtString &)
 
virtual bool hasCategory (const DtString &) const
 
virtual int topLevelTag (const DtString &cat) const
 
virtual std::set< DtStringtopLevelTags (int level=1) const
 
virtual CategoryInformation categoryInformation (const DtString &) const
 
const Categoriescategories () const
 
DtSimulationObjectCategoryInformationoperator= (const DtSimulationObjectCategoryInformation &)
 
bool operator== (const DtSimulationObjectCategoryInformation &) const
 
bool operator!= (const DtSimulationObjectCategoryInformation &orig) const
 

Static Public Member Functions

static DtFilename categoriesFilename ()
 
static void setCategoriesFilename (const DtFilename &)
 

Protected Attributes

Categories myCategories
 

Member Typedef Documentation

Constructor & Destructor Documentation

DtSimulationObjectCategoryInformation::DtSimulationObjectCategoryInformation ( )

CTOR.

DtSimulationObjectCategoryInformation::DtSimulationObjectCategoryInformation ( const DtSimulationObjectCategoryInformation )
virtual DtSimulationObjectCategoryInformation::~DtSimulationObjectCategoryInformation ( )
virtual

DTOR.

Member Function Documentation

virtual bool DtSimulationObjectCategoryInformation::load ( const DtFilename &  ,
bool  clear = false 
)
virtual

Loads the given file. Will merge information read from the file with current information. If you want to load and then clear in the process of loading set the clear flag to true. Note that the first line of the file is assumed to be the columns of the data of the file.

virtual void DtSimulationObjectCategoryInformation::clear ( )
virtual

Clears category information.

virtual bool DtSimulationObjectCategoryInformation::save ( const DtFilename &  )
virtual

Saves category information to the given file.

virtual void DtSimulationObjectCategoryInformation::addCategoryInformation ( const DtString ,
int  rank = 100,
int  topLevelTag = 0,
const DtString iconFilename = "",
bool  visible = true,
const DtString displayName = "",
bool  organizeOnListView = false,
const DtRwColor color = DtRwColor() 
)
virtual

Adds a row of category information. If the information exists will overwrite. If displayName is empty, category name will be used for display (and possibly run through Qt translation). The displayName will not be – it will be taken as is. Only top level items can nor cannot be organized on the list view.

virtual void DtSimulationObjectCategoryInformation::addCategoryInformation ( const DtString ,
const CategoryInformation cat 
)
virtual
virtual void DtSimulationObjectCategoryInformation::removeCategoryInformation ( const DtString )
virtual

Removes a category row.

virtual bool DtSimulationObjectCategoryInformation::hasCategory ( const DtString ) const
virtual

Returns true if the category exists.

virtual int DtSimulationObjectCategoryInformation::topLevelTag ( const DtString cat) const
virtual

Returns true if this is a top level tag.

virtual std::set<DtString> DtSimulationObjectCategoryInformation::topLevelTags ( int  level = 1) const
virtual

Returns a set of top level tags at the given level.

virtual CategoryInformation DtSimulationObjectCategoryInformation::categoryInformation ( const DtString ) const
virtual

Returns category information for the given category.

const Categories& DtSimulationObjectCategoryInformation::categories ( ) const
inline

Returns the category information as a map.

DtSimulationObjectCategoryInformation& DtSimulationObjectCategoryInformation::operator= ( const DtSimulationObjectCategoryInformation )
bool DtSimulationObjectCategoryInformation::operator== ( const DtSimulationObjectCategoryInformation ) const
bool DtSimulationObjectCategoryInformation::operator!= ( const DtSimulationObjectCategoryInformation orig) const
inline
static DtFilename DtSimulationObjectCategoryInformation::categoriesFilename ( )
static

Accessors for global categories filename. Default is categories.csv.

static void DtSimulationObjectCategoryInformation::setCategoriesFilename ( const DtFilename &  )
static

Member Data Documentation

Categories DtSimulationObjectCategoryInformation::myCategories
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)