The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CPerformanceDataSchema::Object Class Reference

Collaboration diagram for CPerformanceDataSchema::Object:

List of all members.

Public Types

typedef LONG Scale
 The scale used in perfmon for the values of this counter.
typedef
CPerformanceDataSchema::DataLength 
DataLength
 Used to determine the length of an instance name.

Public Member Functions

 Object (const Object &rhs)
Objectoperator= (const Object &rhs)
void AddSupportedLanguage (const JetByteTools::Core::_tstring &languageId, const JetByteTools::Core::_tstring &name, const JetByteTools::Core::_tstring &help)
 Adds name and help messages in the specified languageId to the object. Note that the schema must already have had support for this languageId added by calling CPerformanceDataSchema::AddSupportedLanguage().
void AddCounter (const JetByteTools::Core::_tstring &name, const JetByteTools::Core::_tstring &help, DetailLevel detailLevel, Scale defaultScale, CounterTypes type)
 Adds a counter to the performance object. The name and help messages are in the schema's default language.
void AddLinkedPerSecondCounter (const JetByteTools::Core::_tstring &name, const JetByteTools::Core::_tstring &help, DetailLevel detailLevel, Scale defaultScale)
 Adds a per second counter that uses the previously added counter as the actual counter. Useful if you have a total and a rate as only one value needs to be adjusted and both counters are reported.
void AddSupportedLanguageToLastCounterAdded (const JetByteTools::Core::_tstring &languageId, const JetByteTools::Core::_tstring &name, const JetByteTools::Core::_tstring &help)
 Adds name and help messages for the last counter to be added to this performance object in the specified languageId. Note that the schema must already have had support for this languageId added by calling CPerformanceDataSchema::AddSupportedLanguage().
void SetDefaultCounter ()
 Sets the last counter added as the default counter for this performance object. The default counter is the one that is highlighted when you first select a performance object in some versions of perfmon.
void ValidateSchema () const
 Throws an exception if the schema for this object is invalid. For a performance object to be valid it must have at least one counter defined for it.
DataLength GetSizeRequired () const
 Returns the total size, in bytes, required in a CPerformanceDataBlock to store the counters that are defined by this object. This is the size of the object definition and the size of the data required for the maximum number of instances.
DataLength GetObjectDefinitionSize () const
 Returns the size, in bytes, required in a CPerformanceDataBlock to store just the object definitions.
DataLength GetCounterSize () const
 Returns the size, in bytes, required in a CPerformanceDataBlock to store just the data required for the maximum number of object instances.
DWORD GetNumberOfCounters () const
 Returns the number of counters defined in this object.
DWORD WriteTo (BYTE *pDestination, size_t size, DWORD &stringIndex, IAllocateCounterStorage &counterStorageAllocator) const
 Writes the object definition and counter layout to the supplied byte buffer.
JetByteTools::Core::_tstring GetName () const
 Returns the name of the object in the schema's default language.
JetByteTools::Core::_tstring GetName (const JetByteTools::Core::_tstring &languageId) const
 Returns the name of the object in the requested language. If the name is not found in the specified language then the default language version is returned.
JetByteTools::Core::_tstring GetHelp () const
 Returns the help message for the object in the schema's default language.
JetByteTools::Core::_tstring GetHelp (const JetByteTools::Core::_tstring &languageId) const
 Returns the help message for the object in the requested language. If the help message is not found in the specified language then the default language version is returned.
void GetCounterNames (JetByteTools::Core::StringVector &names) const
 Returns a list of counter names for this object in the schema's default language.
void GetCounterNames (const JetByteTools::Core::_tstring &languageId, JetByteTools::Core::StringVector &names) const
 Returns a list of counter names for this object in the requested language. If a counter name is not available in the specified language then the default language version is returned.
void GetCounterHelp (JetByteTools::Core::StringVector &help) const
 Returns a list of counter help messages for this object in the schema's default language.
void GetCounterHelp (const JetByteTools::Core::_tstring &languageId, JetByteTools::Core::StringVector &help) const
 Returns a list of counter help messages for this object in the requested language. If a help message is not available in the specified language then the default language version is returned.
bool SupportsInstances () const

Friends

class CPerformanceDataSchema


Member Typedef Documentation

typedef LONG Scale

The scale used in perfmon for the values of this counter.

Used to determine the length of an instance name.


Constructor & Destructor Documentation

Object ( const Object rhs  ) 


Member Function Documentation

Object& operator= ( const Object rhs  ) 

void AddSupportedLanguage ( const JetByteTools::Core::_tstring languageId,
const JetByteTools::Core::_tstring name,
const JetByteTools::Core::_tstring help 
)

Adds name and help messages in the specified languageId to the object. Note that the schema must already have had support for this languageId added by calling CPerformanceDataSchema::AddSupportedLanguage().

void AddCounter ( const JetByteTools::Core::_tstring name,
const JetByteTools::Core::_tstring help,
DetailLevel  detailLevel,
Scale  defaultScale,
CounterTypes  type 
)

Adds a counter to the performance object. The name and help messages are in the schema's default language.

void AddLinkedPerSecondCounter ( const JetByteTools::Core::_tstring name,
const JetByteTools::Core::_tstring help,
DetailLevel  detailLevel,
Scale  defaultScale 
)

Adds a per second counter that uses the previously added counter as the actual counter. Useful if you have a total and a rate as only one value needs to be adjusted and both counters are reported.

void AddSupportedLanguageToLastCounterAdded ( const JetByteTools::Core::_tstring languageId,
const JetByteTools::Core::_tstring name,
const JetByteTools::Core::_tstring help 
)

Adds name and help messages for the last counter to be added to this performance object in the specified languageId. Note that the schema must already have had support for this languageId added by calling CPerformanceDataSchema::AddSupportedLanguage().

void SetDefaultCounter (  ) 

Sets the last counter added as the default counter for this performance object. The default counter is the one that is highlighted when you first select a performance object in some versions of perfmon.

void ValidateSchema (  )  const

Throws an exception if the schema for this object is invalid. For a performance object to be valid it must have at least one counter defined for it.

CPerformanceDataSchema::DataLength GetSizeRequired (  )  const

Returns the total size, in bytes, required in a CPerformanceDataBlock to store the counters that are defined by this object. This is the size of the object definition and the size of the data required for the maximum number of instances.

CPerformanceDataSchema::DataLength GetObjectDefinitionSize (  )  const

Returns the size, in bytes, required in a CPerformanceDataBlock to store just the object definitions.

CPerformanceDataSchema::DataLength GetCounterSize (  )  const

Returns the size, in bytes, required in a CPerformanceDataBlock to store just the data required for the maximum number of object instances.

DWORD GetNumberOfCounters (  )  const

Returns the number of counters defined in this object.

DWORD WriteTo ( BYTE pDestination,
size_t  size,
DWORD stringIndex,
IAllocateCounterStorage counterStorageAllocator 
) const

Writes the object definition and counter layout to the supplied byte buffer.

need to access the parent and get the stringIndex for it :(

_tstring GetName (  )  const

Returns the name of the object in the schema's default language.

JetByteTools::Core::_tstring GetName ( const JetByteTools::Core::_tstring languageId  )  const

Returns the name of the object in the requested language. If the name is not found in the specified language then the default language version is returned.

_tstring GetHelp (  )  const

Returns the help message for the object in the schema's default language.

JetByteTools::Core::_tstring GetHelp ( const JetByteTools::Core::_tstring languageId  )  const

Returns the help message for the object in the requested language. If the help message is not found in the specified language then the default language version is returned.

void GetCounterNames ( JetByteTools::Core::StringVector names  )  const

Returns a list of counter names for this object in the schema's default language.

void GetCounterNames ( const JetByteTools::Core::_tstring languageId,
JetByteTools::Core::StringVector names 
) const

Returns a list of counter names for this object in the requested language. If a counter name is not available in the specified language then the default language version is returned.

void GetCounterHelp ( JetByteTools::Core::StringVector help  )  const

Returns a list of counter help messages for this object in the schema's default language.

void GetCounterHelp ( const JetByteTools::Core::_tstring languageId,
JetByteTools::Core::StringVector help 
) const

Returns a list of counter help messages for this object in the requested language. If a help message is not available in the specified language then the default language version is returned.

bool SupportsInstances (  )  const


Friends And Related Function Documentation

friend class CPerformanceDataSchema [friend]


Generated on Sun Sep 12 19:09:52 2021 for The Server Framework - v7.4 by doxygen 1.5.3