oos::attribute_counter Class Reference

Counts the number of attributes within an object. More...

#include <attribute_counter.hpp>

Inherits oos::generic_object_writer< attribute_counter >.

Public Member Functions

 attribute_counter ()
 
unsigned long count (object *o, bool with_container=false)
 
- Public Member Functions inherited from oos::object_writer
virtual void write (const char *, char)=0
 Write a single character to the atomizer. More...
 
virtual void write (const char *, float)=0
 Write a float to the atomizer. More...
 
virtual void write (const char *, double)=0
 Write a double to the atomizer. More...
 
virtual void write (const char *, short)=0
 Write a short to the atomizer. More...
 
virtual void write (const char *, int)=0
 Write a int to the atomizer. More...
 
virtual void write (const char *, long)=0
 Write a long to the atomizer. More...
 
virtual void write (const char *, unsigned char)=0
 Write a unsigned char to the atomizer. More...
 
virtual void write (const char *, unsigned short)=0
 Write a unsigned short to the atomizer. More...
 
virtual void write (const char *, unsigned int)=0
 Write a unsigned to the atomizer. More...
 
virtual void write (const char *, unsigned long)=0
 Write a unsigned long to the atomizer. More...
 
virtual void write (const char *, bool)=0
 Write a bool to the atomizer. More...
 
virtual void write (const char *, const char *, int)=0
 Write a const char pointer to the atomizer. More...
 
virtual void write (const char *, const std::string &)=0
 Write a std::string to the atomizer. More...
 
virtual void write (const char *, const varchar_base &)=0
 Write a std::string to the atomizer. More...
 
virtual void write (const char *, const object_base_ptr &)=0
 Write a object_base_ptr to the atomizer. More...
 
virtual void write (const char *, const object_container &)=0
 Write a object_container to the atomizer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from oos::generic_object_writer< attribute_counter >
 generic_object_writer (attribute_counter *writer)
 

Detailed Description

Counts the number of attributes within an object.

This class counts all attribute for the given object. With a flag one can indicate that also container attributes are considered for the counting. The default is false.

Constructor & Destructor Documentation

oos::attribute_counter::attribute_counter ( )
inline

Creates a new attribute counter.

Member Function Documentation

unsigned long oos::attribute_counter::count ( object o,
bool  with_container = false 
)
inline

Counts all attributes for the given object. If the flag is set to true all container attributes are also considered for the counting.

Parameters
oThe object.
with_containerIndicates wether container are considered or not.
Returns
The number of attributes.

The documentation for this class was generated from the following file:
  • object/attribute_counter.hpp