MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Conv< vector< T > > Class Template Reference

#include <Conv.h>

+ Collaboration diagram for Conv< vector< T > >:

Static Public Member Functions

static const vector< T > buf2val (double **buf)
 
static string rttiType ()
 
static unsigned int size (const vector< T > &val)
 
static void str2val (vector< T > &val, const string &s)
 
static void val2buf (const vector< T > &val, double **buf)
 
static void val2str (string &s, const vector< T > &val)
 

Detailed Description

template<class T>
class Conv< vector< T > >

Trying to do a partial specialization. This works with anything that has a uniform size. Assume strings are the only exception. The first double in the vector vec_ holds the # of data entries that follow it. This excludes the space for the size entry itself.

Definition at line 564 of file Conv.h.

Member Function Documentation

template<class T >
static const vector< T > Conv< vector< T > >::buf2val ( double **  buf)
inlinestatic

Definition at line 579 of file Conv.h.

References numEntries.

580  {
581  static vector< T > ret;
582  ret.clear();
583  unsigned int numEntries = (unsigned int)**buf; // first entry is vec size
584  (*buf)++;
585  for ( unsigned int i = 0; i < numEntries; ++i )
586  ret.push_back( Conv< T >::buf2val( buf ) );
587  return ret;
588  }
const int numEntries
Definition: proc.cpp:60
Definition: Conv.h:30
template<class T >
static string Conv< vector< T > >::rttiType ( )
inlinestatic

Definition at line 607 of file Conv.h.

References Conv< T >::rttiType().

607  {
608  string ret = "vector<" + Conv< T >::rttiType() + ">";
609  return ret;
610  }
static string rttiType()
Definition: Conv.h:82

+ Here is the call graph for this function:

template<class T >
static unsigned int Conv< vector< T > >::size ( const vector< T > &  val)
inlinestatic

Size of returned array in doubles.

Definition at line 570 of file Conv.h.

References Conv< T >::size().

571  {
572  unsigned int ret = 1;
573  for ( unsigned int i = 0; i < val.size(); ++i ) {
574  ret += Conv< T >::size( val[i] );
575  }
576  return ret;
577  }
static unsigned int size(const T &val)
Definition: Conv.h:38

+ Here is the call graph for this function:

template<class T >
static void Conv< vector< T > >::str2val ( vector< T > &  val,
const string &  s 
)
inlinestatic

Definition at line 600 of file Conv.h.

600  {
601  cout << "Specialized Conv< vector< T > >::str2val not done\n";
602  }
template<class T >
static void Conv< vector< T > >::val2buf ( const vector< T > &  val,
double **  buf 
)
inlinestatic

Definition at line 590 of file Conv.h.

References Conv< T >::val2buf().

591  {
592  double* temp = *buf;
593  *temp++ = val.size();
594  for( unsigned int i = 0; i < val.size(); ++i ) {
595  Conv< T >::val2buf( val[i], &temp );
596  }
597  *buf = temp;
598  }
static void val2buf(const T &val, double **buf)
Definition: Conv.h:56

+ Here is the call graph for this function:

template<class T >
static void Conv< vector< T > >::val2str ( string &  s,
const vector< T > &  val 
)
inlinestatic

Definition at line 604 of file Conv.h.

604  {
605  cout << "Specialized Conv< vector< T > >::val2str not done\n";
606  }

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