Typelib Namespace Reference


Classes

class  CSVOutput
struct  UnsupportedEndianSwap
class  EndianSwapVisitor
class  CompileEndianSwapVisitor
class  ExportPlugin
class  Exporter
class  ImportError
class  ImportPlugin
class  Importer
struct  plugin_traits
class  GenericIOPlugin
class  Manip
struct  NoLayout
struct  UnknownLayoutBytecode
struct  normalized_numeric_type
struct  normalized_numeric_type< float >
struct  normalized_numeric_type< double >
struct  PluginNotFound
struct  ExportError
class  PluginManager
class  RegistryException
class  Undefined
class  AlreadyDefined
class  BadName
class  DefinitionMismatch
class  Registry
class  RegistryIterator
class  InvalidIndirectName
class  TypeBuilder
class  TypeDisplayVisitor
class  Type
class  NullType
class  OpaqueType
class  Numeric
class  Enum
class  Field
class  Compound
class  Indirect
class  Array
class  Pointer
struct  UnknownContainer
class  Container
struct  TypeException
struct  BadCategory
struct  NullTypeFound
struct  NameSeparator
class  UnsupportedType
class  TypeVisitor
class  Value
class  ValueVisitor
class  BadValueCast
class  CastingVisitor
class  FieldNotFound
class  FieldGetter

Namespaces

namespace  details
namespace  MemLayout
namespace  ValueOps

Typedefs

typedef std::vector< size_t > MemoryLayout
typedef std::string::value_type NamespaceMarkType
typedef boost::tokenizer
< NameSeparator
NameTokenizer

Functions

details::csvheader csv_header (Type const &type, std::string const &basename, std::string const &sep=" ")
details::csvline csv (Type const &type, void *value, std::string const &sep=" ")
void endian_swap (Value v)
void registerIOPlugins (PluginManager &manager)
 BOOST_STATIC_ASSERT ((sizeof(size_t)==sizeof(void *)))
MemoryLayout layout_of (Type const &t, bool accept_pointers=false)
template<typename T>
Numericmake_std_numeric (char const *name)
bool filter_source (std::string const &filter, std::string const &source)
details::do_type_display type_display (Type const &type, std::string const &indent="")
std::ostream & operator<< (std::ostream &stream, Type const &type)
 BOOST_STATIC_ASSERT ((sizeof(FindSizeOfEnum)==sizeof(Enum::integral_type)))
bool isAbsoluteName (const string &identifier)
bool isValidTypename (const std::string &name, bool absolute)
bool isValidNamespace (const string &name, bool absolute)
bool isInNamespace (const string &type, const std::string &nspace, bool recursive)
std::string getNormalizedNamespace (const std::string &name)
std::string getTypename (const std::string &name)
std::string getRelativeName (std::string const &name, std::string const &ns)
std::string getNamespace (const std::string &name)
bool isAbsoluteName (const std::string &name)
bool isValidNamespace (const std::string &name, bool absolute)
bool isInNamespace (const std::string &type, const std::string &nspace, bool recursive=false)
template<typename T>
T & value_cast (Value v)
template<typename T>
T & value_cast (void *ptr, Type const &type)
void init (Value v)
void destroy (Value v)
void copy (Value dst, Value src)
bool compare (Value dst, Value src)
std::vector< uint8_t > dump (Value v)
void dump (Value v, std::vector< uint8_t > &buffer)
void dump (Value v, std::vector< uint8_t > &buffer, MemoryLayout const &ops)
void dump (uint8_t *v, std::vector< uint8_t > &buffer, MemoryLayout const &ops)
void load (Value v, std::vector< uint8_t > const &buffer)
void load (Value v, std::vector< uint8_t > const &buffer, MemoryLayout const &ops)
void load (uint8_t *v, std::vector< uint8_t > const &buffer, MemoryLayout const &ops)
is not a field of the base type
Get the Value object for a named field in v
Exceptions:
FieldNotFound if


Value value_get_field (Value v, std::string const &name)
is not a field of the base type
Get the Value object for a named field in v
Exceptions:
FieldNotFound if


Value value_get_field (void *ptr, Type const &type, std::string const &name)

Variables

static const NamespaceMarkType NamespaceMark = '/'
static const char * NamespaceMarkString = "/"


Typedef Documentation

typedef std::vector<size_t> Typelib::MemoryLayout

typedef std::string::value_type Typelib::NamespaceMarkType

typedef boost::tokenizer<NameSeparator> Typelib::NameTokenizer


Function Documentation

Typelib::@24::BOOST_STATIC_ASSERT ( (sizeof(FindSizeOfEnum)==sizeof(Enum::integral_type))   )  [static]

Typelib::BOOST_STATIC_ASSERT ( (sizeof(size_t)==sizeof(void *))   ) 

bool Typelib::compare ( Value  dst,
Value  src 
)

void Typelib::copy ( Value  dst,
Value  src 
)

details::csvline Typelib::csv ( Type const &  type,
void *  value,
std::string const &  sep = " " 
) [inline]

Display a CSV line for a Type object and some raw data

  • type the data type
  • value the data as a void* pointer
  • sep the separator to use

details::csvheader Typelib::csv_header ( Type const &  type,
std::string const &  basename,
std::string const &  sep = " " 
) [inline]

Display a CSV header matching a Type object

  • type the type to display
  • basename the basename to use. For simple type, it is the variable name. For compound types, names in the header are <basename>.<fieldname>
  • sep the separator to use

void Typelib::destroy ( Value  v  ) 

void Typelib::dump ( uint8_t *  v,
std::vector< uint8_t > &  buffer,
MemoryLayout const &  ops 
)

void Typelib::dump ( Value  v,
std::vector< uint8_t > &  buffer,
MemoryLayout const &  ops 
)

void Typelib::dump ( Value  v,
std::vector< uint8_t > &  buffer 
)

std::vector< uint8_t > Typelib::dump ( Value  v  ) 

Referenced by dump().

void Typelib::endian_swap ( Value  v  ) 

Swaps the endianness of +v+ by using a EndianSwapVisitor

References Typelib::ValueVisitor::apply().

bool Typelib::@17::filter_source ( std::string const &  filter,
std::string const &  source 
) [static]

Referenced by Typelib::Registry::dump().

std::string Typelib::getNamespace ( const std::string &  full_name  ) 

Returns the normalized namespace part of full_name. The returned namespace name starts and ends with the namespace separator '/'.

References NamespaceMark.

Referenced by Typelib::Type::getNamespace(), and Typelib::RegistryIterator::getNamespace().

std::string Typelib::getNormalizedNamespace ( const std::string &  name  ) 

Returns +name+ as a namespace name, valid to build an absolute type name by simple concatenation

References NamespaceMark, and NamespaceMarkString.

Referenced by Typelib::Registry::importNamespace(), isInNamespace(), and Typelib::Registry::setDefaultNamespace().

std::string Typelib::getRelativeName ( std::string const &  full_name,
std::string const &  ns 
)

Returns the relative part of +name+, relative to the given namespace. The returned name does not have any leading namespace separator.

std::string Typelib::getTypename ( const std::string &  full_name  ) 

Removes the namespace part of full_name and returns it

References NamespaceMark.

Referenced by Typelib::Type::getBasename(), and Typelib::RegistryIterator::getBasename().

void Typelib::init ( Value  v  ) 

bool Typelib::isAbsoluteName ( const std::string &  name  ) 

bool Typelib::isAbsoluteName ( const string &  identifier  ) 

References NamespaceMark.

Referenced by Typelib::Registry::getFullName().

bool Typelib::isInNamespace ( const std::string &  type,
const std::string &  nspace,
bool  recursive = false 
)

bool Typelib::isInNamespace ( const string &  type,
const std::string &  nspace,
bool  recursive 
)

bool Typelib::isValidNamespace ( const std::string &  name,
bool  absolute 
)

bool Typelib::isValidNamespace ( const string &  name,
bool  absolute 
)

bool Typelib::isValidTypename ( const std::string &  name,
bool  absolute 
)

MemoryLayout Typelib::layout_of ( Type const &  t,
bool  accept_pointers = false 
) [inline]

void Typelib::load ( uint8_t *  v,
std::vector< uint8_t > const &  buffer,
MemoryLayout const &  ops 
)

void Typelib::load ( Value  v,
std::vector< uint8_t > const &  buffer,
MemoryLayout const &  ops 
)

void Typelib::load ( Value  v,
std::vector< uint8_t > const &  buffer 
)

References Typelib::Value::getType(), and layout_of().

Referenced by load().

template<typename T>
Numeric* Typelib::@17::make_std_numeric ( char const *  name  )  [inline, static]

std::ostream& Typelib::operator<< ( std::ostream &  stream,
Type const &  type 
) [inline]

Pretty prints a type on a given output stream

  • stream the stream to output to
  • indent the type to display

References type_display().

void Typelib::registerIOPlugins ( PluginManager &  manager  ) 

details::do_type_display Typelib::type_display ( Type const &  type,
std::string const &  indent = "" 
) [inline]

stream operator to pretty-print a type on a stream, with indenting std::cout << Typelib::type_display(type, 2) << std::endl;

  • type the type
  • indent base indentation

Referenced by operator<<().

template<typename T>
T& Typelib::value_cast ( void *  ptr,
Type const &  type 
) [inline]

Casts a pointer to a given simple type T using type as the type for *ptr

Exceptions:
BadValueCast 

References value_cast().

template<typename T>
T& Typelib::value_cast ( Value  v  )  [inline]

Casts a Value object to a given simple type T

Exceptions:
BadValueCast 

References Typelib::CastingVisitor< T >::apply().

Referenced by value_cast().

Value Typelib::value_get_field ( void *  ptr,
Type const &  type,
std::string const &  name 
) [inline]

References value_get_field().

Value Typelib::value_get_field ( Value  v,
std::string const &  name 
) [inline]


Variable Documentation

const char* Typelib::NamespaceMarkString = "/" [static]


Generated on Thu Jan 22 16:37:52 2009 for typeLib by doxygen 1.5.6
SourceForge.net Project Page